regulator: fixed: add property for gpio open drain flag
authorLaxman Dewangan <ldewangan@nvidia.com>
Mon, 7 May 2012 10:28:19 +0000 (15:58 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 7 May 2012 11:31:05 +0000 (12:31 +0100)
Add property for the gpio flag open drain when registering
fixed regulator.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Documentation/devicetree/bindings/regulator/fixed-regulator.txt
drivers/regulator/fixed.c

index 9cf57fd042d24b84586c092d45d621aca643d751..2f5b6b1ba15f9c97c64b483fc1ad8f1a31ee6053 100644 (file)
@@ -8,6 +8,8 @@ Optional properties:
 - startup-delay-us: startup time in microseconds
 - enable-active-high: Polarity of GPIO is Active high
 If this property is missing, the default assumed is Active low.
+- gpio-open-drain: GPIO is open drain type.
+  If this property is missing then default assumption is false.
 
 Any property defined as part of the core regulator
 binding, defined in regulator.txt, can also be used.
@@ -25,5 +27,6 @@ Example:
                gpio = <&gpio1 16 0>;
                startup-delay-us = <70000>;
                enable-active-high;
-               regulator-boot-on
+               regulator-boot-on;
+               gpio-open-drain;
        };
index bd437c133b00e002dba965f3dac36e8bb9cf1b26..f09fe7b20e82282e9f68957c1c7b56cad426544e 100644 (file)
@@ -90,6 +90,9 @@ of_get_fixed_voltage_config(struct device *dev)
        if (of_find_property(np, "enable-active-high", NULL))
                config->enable_high = true;
 
+       if (of_find_property(np, "gpio-open-drain", NULL))
+               config->gpio_is_open_drain = true;
+
        return config;
 }