Lines Matching +full:hog +full:-
1 .. SPDX-License-Identifier: GPL-2.0-or-later
6 The configfs GPIO Simulator (gpio-sim) provides a way to create simulated GPIO
12 ------------------------
14 The gpio-sim module registers a configfs subsystem called ``'gpio-sim'``. For
21 **Group:** ``/config/gpio-sim``
23 This is the top directory of the gpio-sim configfs tree.
25 **Group:** ``/config/gpio-sim/gpio-device``
27 **Attribute:** ``/config/gpio-sim/gpio-device/dev_name``
29 **Attribute:** ``/config/gpio-sim/gpio-device/live``
32 attribute is read-only and allows the user-space to read the platform device
33 name (e.g. ``'gpio-sim.0'``). The ``'live'`` attribute allows to trigger the
38 **Group:** ``/config/gpio-sim/gpio-device/gpio-bankX``
40 **Attribute:** ``/config/gpio-sim/gpio-device/gpio-bankX/chip_name``
42 **Attribute:** ``/config/gpio-sim/gpio-device/gpio-bankX/num_lines``
45 ``'chip_name'`` attribute is read-only and allows the user-space to read the
49 **Group:** ``/config/gpio-sim/gpio-device/gpio-bankX/lineY``
51 **Attribute:** ``/config/gpio-sim/gpio-device/gpio-bankX/lineY/name``
53 **Attribute:** ``/config/gpio-sim/gpio-device/gpio-bankX/lineY/valid``
57 to set the line name as represented by the 'gpio-line-names' property.
59 **Item:** ``/config/gpio-sim/gpio-device/gpio-bankX/lineY/hog``
61 **Attribute:** ``/config/gpio-sim/gpio-device/gpio-bankX/lineY/hog/name``
63 **Attribute:** ``/config/gpio-sim/gpio-device/gpio-bankX/lineY/hog/direction``
65 This item makes the gpio-sim module hog the associated line. The ``'name'``
66 attribute specifies the in-kernel consumer name to use. The ``'direction'``
67 attribute specifies the hog direction and must be one of: ``'input'``,
68 ``'output-high'`` and ``'output-low'``.
83 Simulated GPIO chips can also be defined in device-tree. The compatible string
84 must be: ``"gpio-simulator"``. Supported properties are:
86 ``"gpio-sim,label"`` - chip label
88 Other standard GPIO properties (like ``"gpio-line-names"``, ``"ngpios"`` or
89 ``"gpio-hog"``) are also supported. Please refer to the GPIO documentation for
92 An example device-tree code defining a GPIO simulator:
94 .. code-block :: none
96 gpio-sim {
97 compatible = "gpio-simulator";
100 gpio-controller;
101 #gpio-cells = <2>;
103 gpio-sim,label = "dt-bank0";
104 gpio-line-names = "", "sim-foo", "", "sim-bar";
108 gpio-controller;
109 #gpio-cells = <2>;
111 gpio-sim,label = "dt-bank1";
114 gpio-hog;
116 output-high;
117 line-name = "sim-hog-from-dt";
123 ----------------------------
127 (e.g. ``/sys/devices/platform/gpio-sim.X/gpiochipY/``). The name of each group
131 ``pull`` - allows to read and set the current simulated pull setting for
132 every line, when writing the value must be one of: ``'pull-up'``,
133 ``'pull-down'``
135 ``value`` - allows to read the current value of the line which may be
137 user-space