diff mbox series

[v6,3/3] docs/pinctrl: document debugfs files

Message ID 20210216224455.1504008-4-drew@beagleboard.org
State Superseded
Headers show
Series [v6,1/3] pinctrl: use to octal permissions for debugfs files | expand

Commit Message

Drew Fustini Feb. 16, 2021, 10:44 p.m. UTC
Document debugfs directories and files created for pinctrl subsystem.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Drew Fustini <drew@beagleboard.org>
---
 Documentation/driver-api/pinctl.rst | 37 +++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

Andy Shevchenko Feb. 17, 2021, 10:16 a.m. UTC | #1
On Wed, Feb 17, 2021 at 12:45 AM Drew Fustini <drew@beagleboard.org> wrote:
>

> Document debugfs directories and files created for pinctrl subsystem.


Thanks for doing this!
I won't bikeshed now because it's about debugfs anyway, so
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>


> Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Signed-off-by: Drew Fustini <drew@beagleboard.org>

> ---

>  Documentation/driver-api/pinctl.rst | 37 +++++++++++++++++++++++++++++

>  1 file changed, 37 insertions(+)

>

> diff --git a/Documentation/driver-api/pinctl.rst b/Documentation/driver-api/pinctl.rst

> index 3d2deaf48841..37bc3bd64cd8 100644

> --- a/Documentation/driver-api/pinctl.rst

> +++ b/Documentation/driver-api/pinctl.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``: iterate through the list of pin controller handles and

> +  print 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 and group::

> +

> +        echo "<function-name group-name>" > pinmux-select

> --

> 2.25.1

>



--
With Best Regards,
Andy Shevchenko
diff mbox series

Patch

diff --git a/Documentation/driver-api/pinctl.rst b/Documentation/driver-api/pinctl.rst
index 3d2deaf48841..37bc3bd64cd8 100644
--- a/Documentation/driver-api/pinctl.rst
+++ b/Documentation/driver-api/pinctl.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``: iterate through the list of pin controller handles and
+  print 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 and group::
+
+        echo "<function-name group-name>" > pinmux-select