int i, err;
for (i = 0; i < hw->soc->nfuncs ; i++) {
- const struct function_desc *function = hw->soc->funcs + i;
- const struct pinfunction *func = &function->func;
+ const struct pinfunction *func = hw->soc->funcs + i;
- err = pinmux_generic_add_pinfunction(hw->pctrl, func,
- function->data);
+ err = pinmux_generic_add_pinfunction(hw->pctrl, func, NULL);
if (err < 0) {
dev_err(hw->dev, "Failed to register function %s\n",
func->name);
.data = id##_funcs, \
}
-#define PINCTRL_PIN_FUNCTION(_name_, id) \
- { \
- .func = PINCTRL_PINFUNCTION(_name_, id##_groups, ARRAY_SIZE(id##_groups)), \
- .data = NULL, \
- }
+#define PINCTRL_PIN_FUNCTION(_name_, id) \
+ PINCTRL_PINFUNCTION(_name_, id##_groups, ARRAY_SIZE(id##_groups))
int mtk_moore_pinctrl_probe(struct platform_device *pdev,
const struct mtk_pin_soc *soc);
"uart4_2_rts_cts",};
static const char *mt7622_wdt_groups[] = { "watchdog", };
-static const struct function_desc mt7622_functions[] = {
+static const struct pinfunction mt7622_functions[] = {
PINCTRL_PIN_FUNCTION("antsel", mt7622_antsel),
PINCTRL_PIN_FUNCTION("emmc", mt7622_emmc),
PINCTRL_PIN_FUNCTION("eth", mt7622_ethernet),
"uart3_rts_cts", };
static const char *mt7623_wdt_groups[] = { "watchdog_0", "watchdog_1", };
-static const struct function_desc mt7623_functions[] = {
+static const struct pinfunction mt7623_functions[] = {
PINCTRL_PIN_FUNCTION("audck", mt7623_aud_clk),
PINCTRL_PIN_FUNCTION("disp", mt7623_disp_pwm),
PINCTRL_PIN_FUNCTION("eth", mt7623_ethernet),
static const char *mt7629_wifi_groups[] = { "wf0_5g", "wf0_2g", };
static const char *mt7629_flash_groups[] = { "snfi", "spi_nor" };
-static const struct function_desc mt7629_functions[] = {
+static const struct pinfunction mt7629_functions[] = {
PINCTRL_PIN_FUNCTION("eth", mt7629_ethernet),
PINCTRL_PIN_FUNCTION("i2c", mt7629_i2c),
PINCTRL_PIN_FUNCTION("led", mt7629_led),
"wf0_mode1", "wf0_mode3", "mt7531_int", };
static const char *mt7981_ant_groups[] = { "ant_sel", };
-static const struct function_desc mt7981_functions[] = {
+static const struct pinfunction mt7981_functions[] = {
PINCTRL_PIN_FUNCTION("wa_aice", mt7981_wa_aice),
PINCTRL_PIN_FUNCTION("dfd", mt7981_dfd),
PINCTRL_PIN_FUNCTION("jtag", mt7981_jtag),
static const char *mt7986_wdt_groups[] = { "watchdog", };
static const char *mt7986_wf_groups[] = { "wf_2g", "wf_5g", "wf_dbdc", };
-static const struct function_desc mt7986_functions[] = {
+static const struct pinfunction mt7986_functions[] = {
PINCTRL_PIN_FUNCTION("audio", mt7986_audio),
PINCTRL_PIN_FUNCTION("emmc", mt7986_emmc),
PINCTRL_PIN_FUNCTION("eth", mt7986_ethernet),
"drv_vbus_p1",
};
-static const struct function_desc mt7988_functions[] = {
+static const struct pinfunction mt7988_functions[] = {
PINCTRL_PIN_FUNCTION("audio", mt7988_audio),
PINCTRL_PIN_FUNCTION("jtag", mt7988_jtag),
PINCTRL_PIN_FUNCTION("int_usxgmii", mt7988_int_usxgmii),
unsigned int npins;
const struct group_desc *grps;
unsigned int ngrps;
- const struct function_desc *funcs;
+ const struct pinfunction *funcs;
unsigned int nfuncs;
const struct mtk_eint_regs *eint_regs;
const struct mtk_eint_hw *eint_hw;