On Wed 23 Oct 2019 at 14:33, Qianggui Song <qianggui.song@xxxxxxxxxxx> wrote: > On 2019/10/23 17:01, Jerome Brunet wrote: >> >> On Mon 14 Oct 2019 at 12:54, Qianggui Song <qianggui.song@xxxxxxxxxxx> wrote: >> >>> >>> diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c >>> index 8bba9d053d9f..e8f6298fc96a 100644 >>> --- a/drivers/pinctrl/meson/pinctrl-meson.c >>> +++ b/drivers/pinctrl/meson/pinctrl-meson.c >>> @@ -695,6 +695,17 @@ static int meson_pinctrl_parse_dt(struct meson_pinctrl *pc, >>> return 0; >>> } >>> >>> +int meson_pinctrl_parse_dt_extra(struct meson_pinctrl *pc, >>> + struct device_node *node) >> >> This function is the fixup for the a1 family, AFAICT. >> It should be named as such and it belong in pinctrl-meson-a1.c >> >> Every controller performing fixups should have their function as well: >> (1) AO of gxbb, gxl and axg >> (2) AO of g12 and sm >> > OK, Will try to move this function to pinctrl-meson-a1.c. That should be > better than rewriting parse function for each chips EE/AO alone. >>> +{ >>> + int ret; >>> + >>> + ret = meson_pinctrl_parse_dt(pc, node); >> >> As said in previous review, meson_pinctrl_parse_dt() should be called >> for every SoC to parse the *available* regions. >> >> The fixup, if necessary, will be done by providing a callback >> >> IOW, please: >> * rework meson_pinctrl_parse_dt() to only parse the avaialble region >> * don't call meson_pinctrl_parse_dt() from the extra function >> * provided the extra function for the AO controllers of the other SoCs >> > That means I need to move not only ao fixup but ds to extra function for > old chips do not support this.But it will touch other Socs, should I do > this in A1 pinctrl patchset? or do this rework in another patchset. I don't there any problem doing in a single patchset. For example, you can make a first that does the rework for the older SoCs and add the "extra" mechanism then another one adding A1 support >>> + pc->reg_ds = pc->reg_pullen; >>> + >>> + return ret; >>> +}