Skip to content

Commit d9d73e8

Browse files
geertutorvalds
authored andcommitted
sh: sh7269: remove nonexistent GPIO_PH[0-7] to fix pinctrl registration
Pinmux_pins[] is initialized through PINMUX_GPIO(), using designated array initializers, where the GPIO_* enums serve as indices. If enum values are defined, but never used, pinmux_pins[] contains (zero-filled) holes. Such entries are treated as pin zero, which was registered before, thus leading to pinctrl registration failures, as seen on sh7722: sh-pfc pfc-sh7722: pin 0 already registered sh-pfc pfc-sh7722: error during pin registration sh-pfc pfc-sh7722: could not register: -22 sh-pfc: probe of pfc-sh7722 failed with error -22 Remove GPIO_PH[0-7] from the enum to fix this. Link: http://lkml.kernel.org/r/1505205657-18012-5-git-send-email-geert+renesas@glider.be Fixes: ef0fa53 ("sh: Add pinmux for sh7269") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Jacopo Mondi <jacopo+renesas@jmondi.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent eae3df7 commit d9d73e8

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎arch/sh/include/cpu-sh2a/cpu/sh7269.h‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ enum {
4545
GPIO_PG7, GPIO_PG6, GPIO_PG5, GPIO_PG4,
4646
GPIO_PG3, GPIO_PG2, GPIO_PG1, GPIO_PG0,
4747

48-
/* Port H */
49-
GPIO_PH7, GPIO_PH6, GPIO_PH5, GPIO_PH4,
50-
GPIO_PH3, GPIO_PH2, GPIO_PH1, GPIO_PH0,
48+
/* Port H - Port H does not have a Data Register */
5149

5250
/* Port I - not on device */
5351

0 commit comments

Comments
 (0)