[PATCH v2 1/2] dt-binding: hwmon: add gpio-brownout bindings

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

 



Add dt-bindings for gpio-brownout detection devices. Such a device
determines the voltage good/bad state by the gpio line level.

Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
---
 .../bindings/hwmon/gpio-brownout.txt          | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/gpio-brownout.txt

diff --git a/Documentation/devicetree/bindings/hwmon/gpio-brownout.txt b/Documentation/devicetree/bindings/hwmon/gpio-brownout.txt
new file mode 100644
index 000000000000..f3272befc8f8
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/gpio-brownout.txt
@@ -0,0 +1,32 @@
+Device-Tree bindings for GPIO line brownout detection
+
+Required properties:
+- compatible: Must be "gpio-brownout"
+- gpio-brownout,sense-gpios: This gpio is used to detect a brownout. The gpio
+  must support interrupts.
+
+Optional properties:
+- gpio-brownout,dev-list: A list of i2c or spi device phandles. All
+  listed devices will be released from their drivers in the order they listed
+  upon a brownout detection. This can be helpful to avoid a interrupt flood,
+  because some system designs power off all external devices immediately and
+  keep the host on for a certain time.
+
+Example:
+
+i2c3 {
+	temp_core: lm75@48 { };
+	temp_chassis: lm75@49 { };
+};
+
+spi1 {
+	ts: ad7879@1 { };
+};
+
+/ {
+	gpio_brownout {
+		compatible = "gpio-brownout";
+		gpio-brownout,sense-gpios = <&gpio3 3 GPIO_ACTIVE_LOW>;
+		gpio-brownout,dev-list = <&temp_core &ts>;
+	};
+};
-- 
2.19.1




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux