Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: mxs: avoid defines prefixed with CONFIG

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>
Link: https://lore.kernel.org/r/20221215092128.3954-1-lukas.bulwahn@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Lukas Bulwahn and committed by
Linus Walleij
a3a7482a f3cd465b

+6 -6
+3 -3
drivers/pinctrl/freescale/pinctrl-mxs.c
··· 269 269 for (n = 0; n < num_configs; n++) { 270 270 config = configs[n]; 271 271 272 - ma = CONFIG_TO_MA(config); 273 - vol = CONFIG_TO_VOL(config); 274 - pull = CONFIG_TO_PULL(config); 272 + ma = PIN_CONFIG_TO_MA(config); 273 + vol = PIN_CONFIG_TO_VOL(config); 274 + pull = PIN_CONFIG_TO_PULL(config); 275 275 276 276 for (i = 0; i < g->npins; i++) { 277 277 bank = PINID_TO_BANK(g->pins[i]);
+3 -3
drivers/pinctrl/freescale/pinctrl-mxs.h
··· 44 44 #define VOL_SHIFT 3 45 45 #define MA_PRESENT (1 << 2) 46 46 #define MA_SHIFT 0 47 - #define CONFIG_TO_PULL(c) ((c) >> PULL_SHIFT & 0x1) 48 - #define CONFIG_TO_VOL(c) ((c) >> VOL_SHIFT & 0x1) 49 - #define CONFIG_TO_MA(c) ((c) >> MA_SHIFT & 0x3) 47 + #define PIN_CONFIG_TO_PULL(c) ((c) >> PULL_SHIFT & 0x1) 48 + #define PIN_CONFIG_TO_VOL(c) ((c) >> VOL_SHIFT & 0x1) 49 + #define PIN_CONFIG_TO_MA(c) ((c) >> MA_SHIFT & 0x3) 50 50 51 51 struct mxs_function { 52 52 const char *name;