Hi, Daniel
Subject: Re: [PATCH 1/2] pinctrl: imx: Support building SCU pinctrl driver asYou meant in patch #2, the changes in Kconfig and the changes in .c file should
module
On 7/16/20 6:21 PM, Anson Huang wrote:
Hi, DanielHi Anson,
Subject: Re: [PATCH 1/2] pinctrl: imx: Support building SCU pinctrlActually, I ever tried to split them, but the function will be broken.
driver as module
Hi Anson,
Few comments inline:
On 7/16/20 6:06 PM, Anson Huang wrote:
To support building i.MX SCU pinctrl driver as module, below thingsbe changed:
need to
- Export SCU related functions and use "IS_ENABLED" instead ofThere are a lot of changes here. I think it would be better to try to
"ifdef" to support SCU pinctrl driver user and itself to be
built as module;
- Use function callbacks for SCU related functions in pinctrl-imx.c
in order to support the scenario of PINCTRL_IMX is built in
while PINCTRL_IMX_SCU is built as module;
- All drivers using SCU pinctrl driver need to initialize the
SCU related function callback;
- Change PINCTR_IMX_SCU to tristate;
- Add module author, description and license.
With above changes, i.MX SCU pinctrl driver can be built as module.
split them
per functionality. One functional change per patch.
All the changes are just to support the module build. If split them,
the bisect will have pinctrl build or function broken.
I see your point and I know that this is a very hard task to get it right from
the first patches.
But let me suggest at least that:
- changes in drivers/pinctrl/freescale/pinctrl-imx.c (include file and
MODULE_ macros should go to a separate patch).
be split to 2 patches?