diff mbox series

[V1,2/2] dt-bindings: gpio: document the new active-state property

Message ID 1557122501-5183-3-git-send-email-harish_kandiga@mentor.com
State New
Headers show
Series gpio: set active-state of GPIO lines using device tree | expand

Commit Message

Harish Jenny K N May 6, 2019, 6:01 a.m. UTC
Add the information of active state of gpio pin
as property into device tree configuration using a
"active-state" property u8 array.

This is useful for user space applications to identify
active state of pins.

Note: The active-state attribute is completely optional.

Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com>
---
 Documentation/devicetree/bindings/gpio/gpio.txt | 4 ++++
 1 file changed, 4 insertions(+)

--
2.7.4
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index a8895d3..3af3066 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -167,6 +167,9 @@  left to right from the passed array. An incomplete array (where the number
 of passed named are less than ngpios) will still be used up until the last
 provided valid line index.

+Optionally, a GPIO controller may also have an "active-state" property.
+This is an u8 array defining the information of active state of gpio pin.
+
 Example:

 gpio-controller@00000000 {
@@ -180,6 +183,7 @@  gpio-controller@00000000 {
 		"LED G", "LED B", "Col A", "Col B", "Col C", "Col D",
 		"Row A", "Row B", "Row C", "Row D", "NMI button",
 		"poweroff", "reset";
+	active-state = /bits/ 8 <0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0>;
 }

 The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism