Markus Elfring <Markus.Elfring@xxxxxx> 于2024年5月28日周二 19:37写道: > > … > > There are some same function name in different pin groups, … > > names? > refclk [0][1], pwm [2][3] and some others. For example, without this patch, part of the pinmux-functions in the kernel debug fs looks like this root@mt7628:/sys/kernel/debug/pinctrl/pinctrl-ralink-pinmux# cat pinmux-functions function 0: gpio, groups = [ pwm1 pwm0 uart2 uart1 i2c refclk perst wdt spi sdmode uart0 i2s spi cs1 spis gpio0 wled_an p0led_an p1led_an p2led_an p3led_an p4led_an wled_kn p0led_kn p1led_kn p2led_kn p3led_kn p4led_kn ] function 1: sdxc d6, groups = [ pwm1 ] function 2: utif, groups = [ pwm1 ] function 3: gpio, groups = [ pwm1 ] function 4: pwm1, groups = [ pwm1 ] function 5: sdxc d7, groups = [ pwm0 ] function 6: utif, groups = [ pwm0 ] function 7: gpio, groups = [ pwm0 ] function 8: pwm0, groups = [ pwm0 ] function 9: sdxc d5 d4, groups = [ uart2 ] function 10: pwm, groups = [ uart2 ] function 11: gpio, groups = [ uart2 ] function 12: uart2, groups = [ uart2 ] function 13: sw_r, groups = [ uart1 ] function 14: pwm, groups = [ uart1 ] function 15: gpio, groups = [ uart1 ] function 16: uart1, groups = [ uart1 ] function 17: -, groups = [ i2c ] function 18: debug, groups = [ i2c ] function 19: gpio, groups = [ i2c ] function 20: i2c, groups = [ i2c ] function 21: refclk, groups = [ refclk ] function 22: perst, groups = [ perst ] function 23: wdt, groups = [ wdt ] function 24: spi, groups = [ spi ] function 25: jtag, groups = [ sdmode ] function 26: utif, groups = [ sdmode ] function 27: gpio, groups = [ sdmode ] function 28: sdxc, groups = [ sdmode ] function 29: -, groups = [ uart0 ] function 30: -, groups = [ uart0 ] function 31: gpio, groups = [ uart0 ] function 32: uart0, groups = [ uart0 ] function 33: antenna, groups = [ i2s ] function 34: pcm, groups = [ i2s ] function 35: gpio, groups = [ i2s ] function 36: i2s, groups = [ i2s ] function 37: -, groups = [ spi cs1 ] function 38: refclk, groups = [ spi cs1 ] > > … > > To solve this problem, a simple way is just add a pingrp refix to > > pin group prefix? > Yes. Just add a pin group prefix like pinctrl-mt7620.c does. > Regards, > Markus [0] https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/mediatek/pinctrl-mt76x8.c#L73 [1] https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/mediatek/pinctrl-mt76x8.c#L101 [2] https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/mediatek/pinctrl-mt76x8.c#L54 [3] https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/mediatek/pinctrl-mt76x8.c#L61