From: Drew Fustini Date: Tue, 2 Mar 2021 05:30:59 +0000 (-0800) Subject: docs/pinctrl: document debugfs files X-Git-Tag: accepted/tizen/unified/20230118.172025~7325^2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ae6478b0e6b22e6031b4917d1187d23bdc1ca72;p=platform%2Fkernel%2Flinux-rpi.git docs/pinctrl: document debugfs files Document debugfs directories and files created for pinctrl subsystem. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Tony Lindgren Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20210302053059.1049035-5-drew@beagleboard.org Signed-off-by: Linus Walleij --- diff --git a/Documentation/driver-api/pin-control.rst b/Documentation/driver-api/pin-control.rst index 3d2deaf..c905b27 100644 --- a/Documentation/driver-api/pin-control.rst +++ b/Documentation/driver-api/pin-control.rst @@ -1428,3 +1428,40 @@ on the pins defined by group B:: The above has to be done from process context. The reservation of the pins will be done when the state is activated, so in effect one specific pin can be used by different functions at different times on a running system. + + +Debugfs files +============= +These files are created in ``/sys/kernel/debug/pinctrl``: + +- ``pinctrl-devices``: prints each pin controller device along with columns to + indicate support for pinmux and pinconf + +- ``pinctrl-handles``: prints each configured pin controller handle and the + corresponding pinmux maps + +- ``pinctrl-maps``: print all pinctrl maps + +A sub-directory is created inside of ``/sys/kernel/debug/pinctrl`` for each pin +controller device containing these files: + +- ``pins``: prints a line for each pin registered on the pin controller. The + pinctrl driver may add additional information such as register contents. + +- ``gpio-ranges``: print ranges that map gpio lines to pins on the controller + +- ``pingroups``: print all pin groups registered on the pin controller + +- ``pinconf-pins``: print pin config settings for each pin + +- ``pinconf-groups``: print pin config settings per pin group + +- ``pinmux-functions``: print each pin function along with the pin groups that + map to the pin function + +- ``pinmux-pins``: iterate through all pins and print mux owner, gpio owner + and if the pin is a hog + +- ``pinmux-select``: write to this file to activate a pin function for a group:: + + echo "" > pinmux-select