pinctrl: amd: Use PINCTRL_PINGROUP to manage pingroups
authorBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Wed, 1 Jun 2022 15:28:57 +0000 (20:58 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 15 Jun 2022 13:54:20 +0000 (15:54 +0200)
AMD pingroup can be extended to support multi-function pins.
Hence use PINCTRL_PINGROUP to manage and represent larger
number of pingroups inline.

Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220601152900.1012813-4-Basavaraj.Natikar@amd.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-amd.h

index 551dfa664ed856b1cedd5edddc1286d2b1750596..ac3ebfaadb7e3886fa9c0b50102fde9f4a3b961c 100644 (file)
@@ -291,36 +291,12 @@ static const unsigned uart0_pins[] = {135, 136, 137, 138, 139};
 static const unsigned uart1_pins[] = {140, 141, 142, 143, 144};
 
 static const struct pingroup kerncz_groups[] = {
-       {
-               .name = "i2c0",
-               .pins = i2c0_pins,
-               .npins = 2,
-       },
-       {
-               .name = "i2c1",
-               .pins = i2c1_pins,
-               .npins = 2,
-       },
-       {
-               .name = "i2c2",
-               .pins = i2c2_pins,
-               .npins = 2,
-       },
-       {
-               .name = "i2c3",
-               .pins = i2c3_pins,
-               .npins = 2,
-       },
-       {
-               .name = "uart0",
-               .pins = uart0_pins,
-               .npins = 5,
-       },
-       {
-               .name = "uart1",
-               .pins = uart1_pins,
-               .npins = 5,
-       },
+       PINCTRL_PINGROUP("i2c0", i2c0_pins, 2),
+       PINCTRL_PINGROUP("i2c1", i2c1_pins, 2),
+       PINCTRL_PINGROUP("i2c2", i2c2_pins, 2),
+       PINCTRL_PINGROUP("i2c3", i2c3_pins, 2),
+       PINCTRL_PINGROUP("uart0", uart0_pins, 5),
+       PINCTRL_PINGROUP("uart1", uart1_pins, 5),
 };
 
 #endif