Re: [PATCH v5 1/2] pinctrl: mediatek: make MediaTek pinctrl v2 driver ready for buidling loadable module

From: Light Hsieh
Date: Tue Apr 07 2020 - 02:58:01 EST


On Tue, 2020-03-31 at 14:15 -0700, Sean Wang wrote:
> Hi Light,
> > int mtk_pinconf_bias_set_rev1(struct mtk_pinctrl *hw,
> > const struct mtk_pin_desc *desc, bool pullup)
> > @@ -492,6 +502,7 @@ int mtk_pinconf_bias_set_rev1(struct mtk_pinctrl *hw,
> >
> > return 0;
> > }
> > +EXPORT_SYMBOL_GPL(mtk_pinconf_bias_set_rev1);
> >
> > int mtk_pinconf_bias_get_rev1(struct mtk_pinctrl *hw,
> > const struct mtk_pin_desc *desc, bool pullup,
> > @@ -517,6 +528,7 @@ int mtk_pinconf_bias_get_rev1(struct mtk_pinctrl *hw,
> >
> > return 0;
> > }
> > +EXPORT_SYMBOL_GPL(mtk_pinconf_bias_set_rev1);
> >
>
> I got build error with the patch
>
> ../drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c:529:1: error:
> redefinition of '__ksymtab_mtk_pinconf_bias_set_rev1'
> ../drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c:503:1: note:
> previous definition of '__ksymtab_mtk_pinconf_bias_set_rev1' was here
> make[4]: *** [drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.o] Error 1
>

I will correct it on v6.

> > /* Combo for the following pull register type:
> > * 1. PU + PD
> > @@ -717,6 +729,7 @@ int mtk_pinconf_bias_set_combo(struct mtk_pinctrl *hw,
> > out:
> > return err;
> > }
> > +EXPORT_SYMBOL_GPL(mtk_pinconf_bias_set_combo);
> >
> <snip>
> > diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c
> > index 83bf29c..8823c0c 100644
> > --- a/drivers/pinctrl/mediatek/pinctrl-paris.c
> > +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c
> > @@ -10,6 +10,7 @@
> > */
> >
> > #include <linux/gpio/driver.h>
> > +#include <linux/module.h>
> > #include <dt-bindings/pinctrl/mt65xx.h>
> > #include "pinctrl-paris.h"
> >
> > @@ -633,6 +634,7 @@ ssize_t mtk_pctrl_show_one_pin(struct mtk_pinctrl *hw,
> >
> > return len;
> > }
> > +EXPORT_SYMBOL_GPL(mtk_pctrl_show_one_pin);
> >
> > #define PIN_DBG_BUF_SZ 96
> > static void mtk_pctrl_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s,
> > @@ -1037,3 +1039,7 @@ static int mtk_paris_pinctrl_resume(struct device *device)
> > .suspend_noirq = mtk_paris_pinctrl_suspend,
> > .resume_noirq = mtk_paris_pinctrl_resume,
> > };
> > +EXPORT_SYMBOL_GPL(mtk_paris_pinctrl_probe);
>
> place EXPORT_SYMBOL_GPL(mtk_paris_pinctrl_probe) exactly at the tail
> of mtk_paris_pinctrl_probe definition.
>

I will move it.

> > +
> > +MODULE_LICENSE("GPL v2");
> > +MODULE_DESCRIPTION("MediaTek Pinctrl Common Driver V2 Paris");
> > --
> > 1.8.1.1.dirty