ARM: Kirkwood: Convert DNSKW to use regulators
authorAndrew Lunn <andrew@lunn.ch>
Sat, 17 Nov 2012 14:46:11 +0000 (15:46 +0100)
committerJason Cooper <jason@lakedaemon.net>
Sat, 24 Nov 2012 02:56:58 +0000 (02:56 +0000)
Control the power to SATA0 and SATA1 using a fixed regulator.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/kirkwood-dnskw.dtsi
arch/arm/mach-kirkwood/board-dnskw.c

index 28263a1171abaddca3a05c6eb8bbda1bd12c8aef..d11054f538de87a2fc1049d21f2b7b433fb31a07 100644 (file)
                        };
                };
        };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               sata0_power: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       regulator-name = "SATA0 Power";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       enable-active-high;
+                       regulator-always-on;
+                       regulator-boot-on;
+                       gpio = <&gpio1 7 0>;
+               };
+               sata1_power: regulator@2 {
+                       compatible = "regulator-fixed";
+                       reg = <2>;
+                       regulator-name = "SATA1 Power";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       enable-active-high;
+                       regulator-always-on;
+                       regulator-boot-on;
+                       gpio = <&gpio1 8 0>;
+               };
+       };
 };
index 903680182453600450be31cedd595ade330e9f74..6c4028c9c3b7632631aec7b85ba62566179b66c2 100644 (file)
@@ -75,10 +75,6 @@ void __init dnskw_init(void)
 
        kirkwood_ge00_init(&dnskw_ge00_data);
 
-       /* Ensure power is supplied to both HDDs */
-       dnskw_gpio_register(39, "dnskw:power:sata0", 1);
-       dnskw_gpio_register(40, "dnskw:power:sata1", 1);
-
        /* Set NAS to turn back on after a power failure */
        dnskw_gpio_register(37, "dnskw:power:recover", 1);
 }