linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@nxp.com>
To: Anson Huang <anson.huang@nxp.com>,
	Aisheng Dong <aisheng.dong@nxp.com>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"stefan@agner.ch" <stefan@agner.ch>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Cc: dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH 1/2] pinctrl: imx: Support building SCU pinctrl driver as module
Date: Fri, 17 Jul 2020 11:39:53 +0300	[thread overview]
Message-ID: <c27109aa-280f-db0d-980b-fbd735bab0a6@nxp.com> (raw)
In-Reply-To: <DB3PR0402MB3916AAEE01257A7F9A25A657F57F0@DB3PR0402MB3916.eurprd04.prod.outlook.com>

On 7/17/20 2:44 AM, Anson Huang wrote:
> Hi, Daniel
>
>
>> Subject: Re: [PATCH 1/2] pinctrl: imx: Support building SCU pinctrl driver as
>> module
>>
>> On 7/16/20 6:21 PM, Anson Huang wrote:
>>> Hi, Daniel
>>>
>>>
>>>> Subject: Re: [PATCH 1/2] pinctrl: imx: Support building SCU pinctrl
>>>> 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 things
>>>>> need to
>>>> be changed:
>>>>>        - Export SCU related functions and use "IS_ENABLED" instead of
>>>>>          "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.
>>>> There are a lot of changes here. I think it would be better to try to
>>>> split them
>>>>
>>>> per functionality. One functional change per patch.
>>> Actually, I ever tried to split them, but the function will be broken.
>>> All the changes are just to support the module build. If split them,
>>> the bisect will have pinctrl build or function broken.
>> Hi Anson,
>>
>>
>> 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).
> You meant in patch #2, the changes in Kconfig and the changes in .c file should
> be split to 2 patches?


No. I mean look at path #1.

The section above should be placed in a separate patch.

  static const struct of_device_id imx8qxp_pinctrl_of_match[] = {
diff --git a/drivers/pinctrl/freescale/pinctrl-scu.c b/drivers/pinctrl/freescale/pinctrl-scu.c
index 9df45d3..59b5f8a 100644
--- a/drivers/pinctrl/freescale/pinctrl-scu.c
+++ b/drivers/pinctrl/freescale/pinctrl-scu.c
@@ -7,6 +7,7 @@
  
  #include <linux/err.h>
  #include <linux/firmware/imx/sci.h>
+#include <linux/module.h>
  #include <linux/of_address.h>
  #include <linux/pinctrl/pinctrl.h>
  #include <linux/platform_device.h>
@@ -123,3 +124,7 @@ void imx_pinctrl_parse_pin_scu(struct imx_pinctrl *ipctl,
  		pin_scu->mux_mode, pin_scu->config);
  }
  EXPORT_SYMBOL_GPL(imx_pinctrl_parse_pin_scu);
+
+MODULE_AUTHOR("Dong Aisheng<aisheng.dong@nxp.com>");
+MODULE_DESCRIPTION("NXP i.MX SCU common pinctrl driver");
+MODULE_LICENSE("GPL v2");


This can be in a separate patch.


  reply	other threads:[~2020-07-17  8:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 15:06 [PATCH 1/2] pinctrl: imx: Support building SCU pinctrl driver as module Anson Huang
2020-07-16 15:06 ` [PATCH 2/2] pinctrl: imx: Support building i.MX " Anson Huang
2020-09-07  8:33   ` Aisheng Dong
2020-09-07  8:35     ` Anson Huang
2020-07-16 15:14 ` [PATCH 1/2] pinctrl: imx: Support building SCU " Daniel Baluta
2020-07-16 15:21   ` Anson Huang
2020-07-16 15:58     ` Daniel Baluta
2020-07-16 23:44       ` Anson Huang
2020-07-17  8:39         ` Daniel Baluta [this message]
2020-07-17  9:22           ` Anson Huang
2020-07-17  9:45             ` Arnd Bergmann
2020-07-17  9:53               ` Anson Huang
2020-09-07  8:17                 ` Aisheng Dong
2020-09-01  2:15 ` Anson Huang
2020-09-07  8:27 ` Aisheng Dong
2020-09-07  8:34   ` Anson Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c27109aa-280f-db0d-980b-fbd735bab0a6@nxp.com \
    --to=daniel.baluta@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=anson.huang@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=stefan@agner.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).