* [PATCH] pinctrl: mxs: avoid defines prefixed with CONFIG
@ 2022-12-15 9:21 Lukas Bulwahn
2022-12-29 1:07 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Bulwahn @ 2022-12-15 9:21 UTC (permalink / raw)
To: Dong Aisheng, Fabio Estevam, Shawn Guo, Jacky Bai,
Pengutronix Kernel Team, Linus Walleij, Sascha Hauer,
NXP Linux Team, linux-gpio, linux-arm-kernel
Cc: kernel-janitors, linux-kernel, Lukas Bulwahn
Defines prefixed with "CONFIG" should be limited to proper Kconfig options,
that are introduced in a Kconfig file.
Here, expressions to convert pin configurations to booleans for pull-up,
voltage and mA are macro definitions that begin with "CONFIG".
To avoid defines prefixed with "CONFIG", rename these defines to begin with
"PIN_CONFIG" instead.
No functional change.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
drivers/pinctrl/freescale/pinctrl-mxs.c | 6 +++---
drivers/pinctrl/freescale/pinctrl-mxs.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/freescale/pinctrl-mxs.c b/drivers/pinctrl/freescale/pinctrl-mxs.c
index 9f78c9b29ddd..cf3f4d2e0c16 100644
--- a/drivers/pinctrl/freescale/pinctrl-mxs.c
+++ b/drivers/pinctrl/freescale/pinctrl-mxs.c
@@ -269,9 +269,9 @@ static int mxs_pinconf_group_set(struct pinctrl_dev *pctldev,
for (n = 0; n < num_configs; n++) {
config = configs[n];
- ma = CONFIG_TO_MA(config);
- vol = CONFIG_TO_VOL(config);
- pull = CONFIG_TO_PULL(config);
+ ma = PIN_CONFIG_TO_MA(config);
+ vol = PIN_CONFIG_TO_VOL(config);
+ pull = PIN_CONFIG_TO_PULL(config);
for (i = 0; i < g->npins; i++) {
bank = PINID_TO_BANK(g->pins[i]);
diff --git a/drivers/pinctrl/freescale/pinctrl-mxs.h b/drivers/pinctrl/freescale/pinctrl-mxs.h
index ab9f834b03e6..5b26511d56aa 100644
--- a/drivers/pinctrl/freescale/pinctrl-mxs.h
+++ b/drivers/pinctrl/freescale/pinctrl-mxs.h
@@ -44,9 +44,9 @@
#define VOL_SHIFT 3
#define MA_PRESENT (1 << 2)
#define MA_SHIFT 0
-#define CONFIG_TO_PULL(c) ((c) >> PULL_SHIFT & 0x1)
-#define CONFIG_TO_VOL(c) ((c) >> VOL_SHIFT & 0x1)
-#define CONFIG_TO_MA(c) ((c) >> MA_SHIFT & 0x3)
+#define PIN_CONFIG_TO_PULL(c) ((c) >> PULL_SHIFT & 0x1)
+#define PIN_CONFIG_TO_VOL(c) ((c) >> VOL_SHIFT & 0x1)
+#define PIN_CONFIG_TO_MA(c) ((c) >> MA_SHIFT & 0x3)
struct mxs_function {
const char *name;
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] pinctrl: mxs: avoid defines prefixed with CONFIG
2022-12-15 9:21 [PATCH] pinctrl: mxs: avoid defines prefixed with CONFIG Lukas Bulwahn
@ 2022-12-29 1:07 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2022-12-29 1:07 UTC (permalink / raw)
To: Lukas Bulwahn
Cc: Dong Aisheng, Fabio Estevam, Shawn Guo, Jacky Bai,
Pengutronix Kernel Team, Sascha Hauer, NXP Linux Team, linux-gpio,
linux-arm-kernel, kernel-janitors, linux-kernel
On Thu, Dec 15, 2022 at 10:30 AM Lukas Bulwahn <lukas.bulwahn@gmail.com> wrote:
> Defines prefixed with "CONFIG" should be limited to proper Kconfig options,
> that are introduced in a Kconfig file.
>
> Here, expressions to convert pin configurations to booleans for pull-up,
> voltage and mA are macro definitions that begin with "CONFIG".
>
> To avoid defines prefixed with "CONFIG", rename these defines to begin with
> "PIN_CONFIG" instead.
>
> No functional change.
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Patch applied.
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-29 1:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-15 9:21 [PATCH] pinctrl: mxs: avoid defines prefixed with CONFIG Lukas Bulwahn
2022-12-29 1:07 ` Linus Walleij
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).