powerpc/83xx: Add MCU LEDs support for MPC837xRDB and MPC8315RDB boards
authorAnton Vorontsov <avorontsov@mvista.com>
Sun, 2 May 2010 17:27:05 +0000 (21:27 +0400)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 17 May 2010 15:55:32 +0000 (10:55 -0500)
There are two front-panel LEDs on MPC837xRDB and MPC8315RDB boards: PWR
and HDD. After adding appropriate nodes we can program these LEDs from
kernel and user space.

Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/boot/dts/mpc8315erdb.dts
arch/powerpc/boot/dts/mpc8377_rdb.dts
arch/powerpc/boot/dts/mpc8378_rdb.dts
arch/powerpc/boot/dts/mpc8379_rdb.dts
arch/powerpc/platforms/83xx/mpc831x_rdb.c
arch/powerpc/platforms/83xx/mpc837x_rdb.c

index 508b770d3dd696234b8ad3118063717507d82bfe..4dd08c322979154a3538ce862cafbdab8cace8c6 100644 (file)
                                  0 0x00800000>;
                };
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pwr {
+                       gpios = <&mcu_pio 0 0>;
+                       default-state = "on";
+               };
+
+               hdd {
+                       gpios = <&mcu_pio 1 0>;
+                       linux,default-trigger = "ide-disk";
+               };
+       };
 };
index 9e2264b100080b69e3a33e3d30b1ec33766ae3b9..dbc1b988b29d2c4b9de40436fa99364c0340ec3b 100644 (file)
                                  0 0x00800000>;
                };
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pwr {
+                       gpios = <&mcu_pio 0 0>;
+                       default-state = "on";
+               };
+
+               hdd {
+                       gpios = <&mcu_pio 1 0>;
+                       linux,default-trigger = "ide-disk";
+               };
+       };
 };
index 4e6a1a407bbd093bcf56cc553d0033c693b361bb..3447eb9f6e88b9e709224f21751712030b823faa 100644 (file)
                                  0 0x00800000>;
                };
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pwr {
+                       gpios = <&mcu_pio 0 0>;
+                       default-state = "on";
+               };
+
+               hdd {
+                       gpios = <&mcu_pio 1 0>;
+                       linux,default-trigger = "ide-disk";
+               };
+       };
 };
index 72336d504528b284fd70e854b6141a55f38d68a1..15560c619b04dd85ba1188b96ef180a1e640bec6 100644 (file)
                compatible = "fsl,mpc8349-pci";
                device_type = "pci";
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pwr {
+                       gpios = <&mcu_pio 0 0>;
+                       default-state = "on";
+               };
+
+               hdd {
+                       gpios = <&mcu_pio 1 0>;
+                       linux,default-trigger = "ide-disk";
+               };
+       };
 };
index 0b4f883b20eb05684c2da893d636ab3d9014daf9..ae525e4745d2af9b3c4406f95458cadae6cf7382 100644 (file)
@@ -74,6 +74,7 @@ static int __init mpc831x_rdb_probe(void)
 static struct of_device_id __initdata of_bus_ids[] = {
        { .compatible = "simple-bus" },
        { .compatible = "gianfar" },
+       { .compatible = "gpio-leds", },
        {},
 };
 
index a1908d261240e07ca93d096418c24fe2e4ad0d76..e00801c42540a26ebe5291f7d6000e0e3b0c0f5d 100644 (file)
@@ -72,6 +72,7 @@ static struct of_device_id mpc837x_ids[] = {
        { .compatible = "soc", },
        { .compatible = "simple-bus", },
        { .compatible = "gianfar", },
+       { .compatible = "gpio-leds", },
        {},
 };