summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/mediatek/pinctrl-mt7981.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andy.shevchenko@gmail.com>2024-05-30 11:55:13 +0300
committerLinus Walleij <linus.walleij@linaro.org>2024-06-17 10:24:05 +0300
commitdc02d925dc1638ba6c3b8082858cb20970fa674f (patch)
treebba9d245bc1f37e2905d818a4bdfc5b910e98764 /drivers/pinctrl/mediatek/pinctrl-mt7981.c
parent7f2a2af08808783d0a6ca8993af795c435a62e05 (diff)
downloadlinux-dc02d925dc1638ba6c3b8082858cb20970fa674f.tar.xz
pinctrl: mediatek: moore: Provide a helper macro PINCTRL_PIN_FUNCTION()
Provide a helper macro to assign the struct function_desc entries. This helps further refactoring. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240530085745.1539925-5-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mediatek/pinctrl-mt7981.c')
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mt7981.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7981.c b/drivers/pinctrl/mediatek/pinctrl-mt7981.c
index ef6123765885..83092be5b614 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c
@@ -978,23 +978,23 @@ static const char *mt7981_ethernet_groups[] = { "smi_mdc_mdio", "gbe_ext_mdc_mdi
static const char *mt7981_ant_groups[] = { "ant_sel", };
static const struct function_desc mt7981_functions[] = {
- {"wa_aice", mt7981_wa_aice_groups, ARRAY_SIZE(mt7981_wa_aice_groups)},
- {"dfd", mt7981_dfd_groups, ARRAY_SIZE(mt7981_dfd_groups)},
- {"jtag", mt7981_jtag_groups, ARRAY_SIZE(mt7981_jtag_groups)},
- {"pta", mt7981_pta_groups, ARRAY_SIZE(mt7981_pta_groups)},
- {"pcm", mt7981_pcm_groups, ARRAY_SIZE(mt7981_pcm_groups)},
- {"udi", mt7981_udi_groups, ARRAY_SIZE(mt7981_udi_groups)},
- {"usb", mt7981_usb_groups, ARRAY_SIZE(mt7981_usb_groups)},
- {"ant", mt7981_ant_groups, ARRAY_SIZE(mt7981_ant_groups)},
- {"eth", mt7981_ethernet_groups, ARRAY_SIZE(mt7981_ethernet_groups)},
- {"i2c", mt7981_i2c_groups, ARRAY_SIZE(mt7981_i2c_groups)},
- {"led", mt7981_led_groups, ARRAY_SIZE(mt7981_led_groups)},
- {"pwm", mt7981_pwm_groups, ARRAY_SIZE(mt7981_pwm_groups)},
- {"spi", mt7981_spi_groups, ARRAY_SIZE(mt7981_spi_groups)},
- {"uart", mt7981_uart_groups, ARRAY_SIZE(mt7981_uart_groups)},
- {"watchdog", mt7981_wdt_groups, ARRAY_SIZE(mt7981_wdt_groups)},
- {"flash", mt7981_flash_groups, ARRAY_SIZE(mt7981_flash_groups)},
- {"pcie", mt7981_pcie_groups, ARRAY_SIZE(mt7981_pcie_groups)},
+ PINCTRL_PIN_FUNCTION("wa_aice", mt7981_wa_aice),
+ PINCTRL_PIN_FUNCTION("dfd", mt7981_dfd),
+ PINCTRL_PIN_FUNCTION("jtag", mt7981_jtag),
+ PINCTRL_PIN_FUNCTION("pta", mt7981_pta),
+ PINCTRL_PIN_FUNCTION("pcm", mt7981_pcm),
+ PINCTRL_PIN_FUNCTION("udi", mt7981_udi),
+ PINCTRL_PIN_FUNCTION("usb", mt7981_usb),
+ PINCTRL_PIN_FUNCTION("ant", mt7981_ant),
+ PINCTRL_PIN_FUNCTION("eth", mt7981_ethernet),
+ PINCTRL_PIN_FUNCTION("i2c", mt7981_i2c),
+ PINCTRL_PIN_FUNCTION("led", mt7981_led),
+ PINCTRL_PIN_FUNCTION("pwm", mt7981_pwm),
+ PINCTRL_PIN_FUNCTION("spi", mt7981_spi),
+ PINCTRL_PIN_FUNCTION("uart", mt7981_uart),
+ PINCTRL_PIN_FUNCTION("watchdog", mt7981_wdt),
+ PINCTRL_PIN_FUNCTION("flash", mt7981_flash),
+ PINCTRL_PIN_FUNCTION("pcie", mt7981_pcie),
};
static const struct mtk_eint_hw mt7981_eint_hw = {