]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
pinctrl: core: print gpio in pins debugfs file
authorDrew Fustini <drew@beagleboard.org>
Wed, 22 Jul 2020 12:27:52 +0000 (14:27 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 3 Aug 2020 23:29:10 +0000 (01:29 +0200)
commitf1b206cf7c57561ea156798f323b0541a783bd2f
treef268163becc9baf5a1c106638cb8fe398a010d0f
parentc1282ae87882aff2a1adbc8d168c8fb3391d288a
pinctrl: core: print gpio in pins debugfs file

If there is a gpio range mapping for the pin, then print out the gpio
chip and line index for the pin in the debugfs 'pins' file with the
format: "[line-index]:[gpio-label]"

Here is example output on the BeagleBoard.org PocketBeagle (AM3358):
/sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pins

pin 25 (PIN25) 25:gpio-32-63 44e10864 00000037 pinctrl-single
pin 26 (PIN26) 26:gpio-32-63 44e10868 00000037 pinctrl-single
pin 27 (PIN27) 27:gpio-32-63 44e1086c 00000037 pinctrl-single
pin 28 (PIN28) 0:? 44e10870 00000036 pinctrl-single
pin 29 (PIN29) 0:? 44e10874 00000006 pinctrl-single
pin 30 (PIN30) 28:gpio-32-63 44e10878 00000027 pinctrl-single
pin 31 (PIN31) 29:gpio-32-63 44e1087c 00000037 pinctrl-single
pin 32 (PIN32) 30:gpio-32-63 44e10880 00000037 pinctrl-single
pin 33 (PIN33) 31:gpio-32-63 44e10884 00000037 pinctrl-single
pin 34 (PIN34) 0:gpio-64-95 44e10888 00000037 pinctrl-single
pin 35 (PIN35) 1:gpio-64-95 44e1088c 00000037 pinctrl-single

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Suggested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Drew Fustini <drew@beagleboard.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200722122751.266440-1-drew@beagleboard.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/core.c