From a165357a706683f6c3d7eb9e7a0156dc4c932aa9 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Mon, 7 May 2012 15:58:19 +0530 Subject: [PATCH] --- yaml --- r: 302255 b: refs/heads/master c: 9a50dba509251dfce7895a5990cb938f383a6273 h: refs/heads/master i: 302253: b1ca844309915f2d19ac04da29280a310f6e952f 302251: d2922195e2dc61f0cefc557342b880bbf9324d97 302247: e408e4258cd38acbdeb78540ef44cde2b99caed7 302239: d0ba97eac295228a15bbead8315d1e8c93bab97f v: v3 --- [refs] | 2 +- .../devicetree/bindings/regulator/fixed-regulator.txt | 5 ++++- trunk/drivers/regulator/fixed.c | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 53033990ec09..811417de8afd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 62f6b0879304e2169d6bf6221612e8111e342ee7 +refs/heads/master: 9a50dba509251dfce7895a5990cb938f383a6273 diff --git a/trunk/Documentation/devicetree/bindings/regulator/fixed-regulator.txt b/trunk/Documentation/devicetree/bindings/regulator/fixed-regulator.txt index 9cf57fd042d2..2f5b6b1ba15f 100644 --- a/trunk/Documentation/devicetree/bindings/regulator/fixed-regulator.txt +++ b/trunk/Documentation/devicetree/bindings/regulator/fixed-regulator.txt @@ -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; }; diff --git a/trunk/drivers/regulator/fixed.c b/trunk/drivers/regulator/fixed.c index bd437c133b00..f09fe7b20e82 100644 --- a/trunk/drivers/regulator/fixed.c +++ b/trunk/drivers/regulator/fixed.c @@ -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; }