[RFC PATCH 1/3] dt-bindings: gpio: Add optional ramp-up delay property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This adds a ramp-up delay (in us) for adding a delay after enabling
GPIO. This is necessary if the ramp-up time is increased by some external
components. Usually this is quite fast, but certain combinations can
increase this to grater than 100ms.

Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>
---
 .../devicetree/bindings/gpio/gpio.txt         | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index 5663e71b751fc..b87669dce9a61 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -182,6 +182,28 @@ gpio-controller@00000000 {
 		"poweroff", "reset";
 }
 
+Optionally, a GPIO controller may have a "gpio-ramp-up-delays-us" property.
+This is an array of u32 defining the ramp-up delays of the GPIO lines
+going out of the GPIO controller. This might be necessary if external
+components (e.g. capacitors, resistors) increase the ramp up time notably.
+The delay are assigned starting from line offset 0 from
+left to right from the passed array. An incomplete array (where the number
+of passed delays are less than ngpios) will still be used up until the last
+provided valid line index. Setting to will not add any delay.
+
+Example:
+
+gpio-controller@00000000 {
+	compatible = "foo";
+	reg = <0x00000000 0x1000>;
+	gpio-controller;
+	#gpio-cells = <2>;
+	gpio-ramp-up-delays-us = <0>, <0>, <0>, <0>,
+				 <0>, <0>, <120000>, <0>,
+				 <0>, <0>, <0>, <0>,
+				 <0>, <0>, <0>, <0>;
+}
+
 The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism
 providing automatic GPIO request and configuration as part of the
 gpio-controller's driver probe function.
-- 
2.34.1




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux