Re: [PATCH 4/6] davinci: regulator: tps6507x: add device tree support.

2013-01-26 Thread Mark Brown
On Thu, Jan 24, 2013 at 04:25:18PM +0530, Vishwanathrao Badarkhe, Manish wrote:
> Add device tree based initialization support for
> TI's tps6507x regulators.

Applied, thanks.  Please always use subject lines appropriate for the
subsystem you are submitting against - this is not a DaVinci change.


signature.asc
Description: Digital signature


Re: [PATCH 4/6] davinci: regulator: tps6507x: add device tree support.

2013-01-26 Thread Mark Brown
On Thu, Jan 24, 2013 at 04:25:18PM +0530, Vishwanathrao Badarkhe, Manish wrote:
 Add device tree based initialization support for
 TI's tps6507x regulators.

Applied, thanks.  Please always use subject lines appropriate for the
subsystem you are submitting against - this is not a DaVinci change.


signature.asc
Description: Digital signature


[PATCH 4/6] davinci: regulator: tps6507x: add device tree support.

2013-01-24 Thread Vishwanathrao Badarkhe, Manish
Add device tree based initialization support for
TI's tps6507x regulators.
Add device tree binding document for TI's tps6507x
using datasheet:
http://www.ti.com/lit/ds/symlink/tps65070.pdf

Signed-off-by: Vishwanathrao Badarkhe, Manish 
---
 Documentation/devicetree/bindings/mfd/tps6507x.txt |   91 +++
 drivers/regulator/tps6507x-regulator.c |   92 
 2 files changed, 183 insertions(+), 0 deletions(-)
 create mode 100755 Documentation/devicetree/bindings/mfd/tps6507x.txt

diff --git a/Documentation/devicetree/bindings/mfd/tps6507x.txt 
b/Documentation/devicetree/bindings/mfd/tps6507x.txt
new file mode 100755
index 000..8fffa3c
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/tps6507x.txt
@@ -0,0 +1,91 @@
+TPS6507x Power Management Integrated Circuit
+
+Required properties:
+- compatible: "ti,tps6507x"
+- reg: I2C slave address
+- regulators: This is the list of child nodes that specify the regulator
+  initialization data for defined regulators. Not all regulators for the
+  given device need to be present. The definition for each of these nodes
+  is defined using the standard binding for regulators found at
+  Documentation/devicetree/bindings/regulator/regulator.txt.
+  The regulator is matched with the regulator-compatible.
+
+  The valid regulator-compatible values are:
+  tps6507x: vdcdc1, vdcdc2, vdcdc3, vldo1, vldo2
+- xxx-supply: Input voltage supply regulator.
+  These entries are required if regulators are enabled for a device.
+  Missing of these properties can cause the regulator registration
+  fails.
+  If some of input supply is powered through battery or always-on
+  supply then also it is require to have these parameters with proper
+  node handle of always on power supply.
+  tps6507x:
+   vindcdc1_2-supply: VDCDC1 and VDCDC2 input.
+   vindcdc3-supply  : VDCDC3 input.
+   vldo1_2-supply   : VLDO1 and VLDO2 input.
+
+Regulator Optional properties:
+- defdcdc_default: It's property of DCDC2 and DCDC3 regulators.
+   0: If defdcdc pin of DCDC2/DCDC3 is pulled to GND.
+   1: If defdcdc pin of DCDC2/DCDC3 is driven HIGH.
+  If this property is not defined, it defaults to 0 (not enabled).
+
+Example:
+
+   pmu: tps6507x@48 {
+   compatible = "ti,tps6507x";
+   reg = <0x48>;
+
+   vindcdc1_2-supply = <>;
+   vindcdc3-supply = <...>;
+   vinldo1_2-supply = <...>;
+
+   regulators {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   vdcdc1_reg: regulator@0 {
+   regulator-compatible = "VDCDC1";
+   reg = <0>;
+   regulator-min-microvolt = <315>;
+   regulator-max-microvolt = <345>;
+   regulator-always-on;
+   regulator-boot-on;
+   };
+   vdcdc2_reg: regulator@1 {
+   regulator-compatible = "VDCDC2";
+   reg = <1>;
+   regulator-min-microvolt = <171>;
+   regulator-max-microvolt = <345>;
+   regulator-always-on;
+   regulator-boot-on;
+   defdcdc_default = <1>;
+   };
+   vdcdc3_reg: regulator@2 {
+   regulator-compatible = "VDCDC3";
+   reg = <2>;
+   regulator-min-microvolt = <95>
+   regulator-max-microvolt = <135>;
+   regulator-always-on;
+   regulator-boot-on;
+   defdcdc_default = <1>;
+   };
+   ldo1_reg: regulator@3 {
+   regulator-compatible = "LDO1";
+   reg = <3>;
+   regulator-min-microvolt = <171>;
+   regulator-max-microvolt = <189>;
+   regulator-always-on;
+   regulator-boot-on;
+   };
+   ldo2_reg: regulator@4 {
+   regulator-compatible = "LDO2";
+   reg = <4>;
+   regulator-min-microvolt = <114>;
+   regulator-max-microvolt = <132>;
+   regulator-always-on;
+   regulator-boot-on;
+   };
+   };
+
+   };
diff --git a/drivers/regulator/tps6507x-regulator.c 
b/drivers/regulator/tps6507x-regulator.c
index 0233cfb..afdeb65 

[PATCH 4/6] davinci: regulator: tps6507x: add device tree support.

2013-01-24 Thread Vishwanathrao Badarkhe, Manish
Add device tree based initialization support for
TI's tps6507x regulators.
Add device tree binding document for TI's tps6507x
using datasheet:
http://www.ti.com/lit/ds/symlink/tps65070.pdf

Signed-off-by: Vishwanathrao Badarkhe, Manish manish...@ti.com
---
 Documentation/devicetree/bindings/mfd/tps6507x.txt |   91 +++
 drivers/regulator/tps6507x-regulator.c |   92 
 2 files changed, 183 insertions(+), 0 deletions(-)
 create mode 100755 Documentation/devicetree/bindings/mfd/tps6507x.txt

diff --git a/Documentation/devicetree/bindings/mfd/tps6507x.txt 
b/Documentation/devicetree/bindings/mfd/tps6507x.txt
new file mode 100755
index 000..8fffa3c
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/tps6507x.txt
@@ -0,0 +1,91 @@
+TPS6507x Power Management Integrated Circuit
+
+Required properties:
+- compatible: ti,tps6507x
+- reg: I2C slave address
+- regulators: This is the list of child nodes that specify the regulator
+  initialization data for defined regulators. Not all regulators for the
+  given device need to be present. The definition for each of these nodes
+  is defined using the standard binding for regulators found at
+  Documentation/devicetree/bindings/regulator/regulator.txt.
+  The regulator is matched with the regulator-compatible.
+
+  The valid regulator-compatible values are:
+  tps6507x: vdcdc1, vdcdc2, vdcdc3, vldo1, vldo2
+- xxx-supply: Input voltage supply regulator.
+  These entries are required if regulators are enabled for a device.
+  Missing of these properties can cause the regulator registration
+  fails.
+  If some of input supply is powered through battery or always-on
+  supply then also it is require to have these parameters with proper
+  node handle of always on power supply.
+  tps6507x:
+   vindcdc1_2-supply: VDCDC1 and VDCDC2 input.
+   vindcdc3-supply  : VDCDC3 input.
+   vldo1_2-supply   : VLDO1 and VLDO2 input.
+
+Regulator Optional properties:
+- defdcdc_default: It's property of DCDC2 and DCDC3 regulators.
+   0: If defdcdc pin of DCDC2/DCDC3 is pulled to GND.
+   1: If defdcdc pin of DCDC2/DCDC3 is driven HIGH.
+  If this property is not defined, it defaults to 0 (not enabled).
+
+Example:
+
+   pmu: tps6507x@48 {
+   compatible = ti,tps6507x;
+   reg = 0x48;
+
+   vindcdc1_2-supply = vbat;
+   vindcdc3-supply = ...;
+   vinldo1_2-supply = ...;
+
+   regulators {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   vdcdc1_reg: regulator@0 {
+   regulator-compatible = VDCDC1;
+   reg = 0;
+   regulator-min-microvolt = 315;
+   regulator-max-microvolt = 345;
+   regulator-always-on;
+   regulator-boot-on;
+   };
+   vdcdc2_reg: regulator@1 {
+   regulator-compatible = VDCDC2;
+   reg = 1;
+   regulator-min-microvolt = 171;
+   regulator-max-microvolt = 345;
+   regulator-always-on;
+   regulator-boot-on;
+   defdcdc_default = 1;
+   };
+   vdcdc3_reg: regulator@2 {
+   regulator-compatible = VDCDC3;
+   reg = 2;
+   regulator-min-microvolt = 95
+   regulator-max-microvolt = 135;
+   regulator-always-on;
+   regulator-boot-on;
+   defdcdc_default = 1;
+   };
+   ldo1_reg: regulator@3 {
+   regulator-compatible = LDO1;
+   reg = 3;
+   regulator-min-microvolt = 171;
+   regulator-max-microvolt = 189;
+   regulator-always-on;
+   regulator-boot-on;
+   };
+   ldo2_reg: regulator@4 {
+   regulator-compatible = LDO2;
+   reg = 4;
+   regulator-min-microvolt = 114;
+   regulator-max-microvolt = 132;
+   regulator-always-on;
+   regulator-boot-on;
+   };
+   };
+
+   };
diff --git a/drivers/regulator/tps6507x-regulator.c 
b/drivers/regulator/tps6507x-regulator.c
index 0233cfb..afdeb65 100644
---