Skip to contentSkip to conversation

ARM: Kirkwood: Add support LED of OpenBlocks A6

PATCH New Nobuhiro Iwamatsu 2 participants 3 messages Nov 23, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: Kirkwood: Add support LED of OpenBlocks A6

OpenBlocks A6 has three leds via GPIO. This supports them. And this fix typo about led, because hardware manual has typo.

---
 arch/arm/boot/dts/kirkwood-openblocks_a6.dts |   19 +++++++++++++++++++
 arch/arm/mach-kirkwood/board-openblocks_a6.c |    4 ++--
 2 files changed, 21 insertions(+), 2 deletions(-)
arch/arm/boot/dts/kirkwood-openblocks_a6.dts +19 -0
index 37dc3a7..183df04 100644
@@ -75,4 +75,23 @@
 			};
 		};
 	};
+
+	gpio_leds {
+		compatible = "gpio-leds";
+
+		led-red {
+			label = "obsa6:red:stat";
+			gpios = <&gpio1 9 1>;
+		};
+
+		led-green {
+			label = "obsa6:green:stat";
+			gpios = <&gpio1 10 1>;
+		};
+
+		led-yellow {
+			label = "obsa6:yellow:stat";
+			gpios = <&gpio1 11 1>;
+		};
+        };
 };
arch/arm/mach-kirkwood/board-openblocks_a6.c +2 -2
index e71f984..815fc64 100644
@@ -55,8 +55,8 @@ static unsigned int openblocks_a6_mpp_config[] __initdata = {
 	MPP38_GPIO, /* INIT */
 	MPP39_GPIO, /* USB OC */
 	MPP41_GPIO, /* LED: Red */
-	MPP42_GPIO, /* LED: Yellow */
-	MPP43_GPIO, /* LED: Green */
+	MPP42_GPIO, /* LED: Green */
+	MPP43_GPIO, /* LED: Yellow */
 	0,
 };
 
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 ARM: Kirkwood: Add support LED of OpenBlocks A6

Quoted 14 lines · Nobuhiro Iwamatsu

OpenBlocks A6 has three leds via GPIO. This supports them. And this fix typo about led, because hardware manual has typo.

---
 arch/arm/boot/dts/kirkwood-openblocks_a6.dts |   19 +++++++++++++++++++
 arch/arm/mach-kirkwood/board-openblocks_a6.c |    4 ++--
 2 files changed, 21 insertions(+), 2 deletions(-)
arch/arm/boot/dts/kirkwood-openblocks_a6.dts +0 -0
index 37dc3a7..183df04 100644

arch/arm/boot/dts/kirkwood-openblocks_a6.dts line 79

Quoted 5 lines
arch/arm/boot/dts/kirkwood-openblocks_a6.dts +2 -0
@@ -75,4 +75,23 @@
 			};
 		};
 	};
+
+	gpio_leds {

Hi Nobuhiro

Thanks for the patch, looks good except for a minor point. The convention is to use gpio-leds, not gpio_leds.

Thanks
Andrew

Quoted 36 lines
arch/arm/boot/dts/kirkwood-openblocks_a6.dts +17 -0
+		compatible = "gpio-leds";
+
+		led-red {
+			label = "obsa6:red:stat";
+			gpios = <&gpio1 9 1>;
+		};
+
+		led-green {
+			label = "obsa6:green:stat";
+			gpios = <&gpio1 10 1>;
+		};
+
+		led-yellow {
+			label = "obsa6:yellow:stat";
+			gpios = <&gpio1 11 1>;
+		};
+        };
 };
arch/arm/mach-kirkwood/board-openblocks_a6.c +2 -2
index e71f984..815fc64 100644
@@ -55,8 +55,8 @@ static unsigned int openblocks_a6_mpp_config[] __initdata = {
 	MPP38_GPIO, /* INIT */
 	MPP39_GPIO, /* USB OC */
 	MPP41_GPIO, /* LED: Red */
-	MPP42_GPIO, /* LED: Yellow */
-	MPP43_GPIO, /* LED: Green */
+	MPP42_GPIO, /* LED: Green */
+	MPP43_GPIO, /* LED: Yellow */
 	0,
 };
 
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 1/1 ARM: Kirkwood: Add support LED of OpenBlocks A6

Hi, Andrew.

Thank you for your review.

Quoted 23 lines · Andrew Lunn
Quoted 14 lines · Nobuhiro Iwamatsu

OpenBlocks A6 has three leds via GPIO. This supports them. And this fix typo about led, because hardware manual has typo.

---
 arch/arm/boot/dts/kirkwood-openblocks_a6.dts |   19 +++++++++++++++++++
 arch/arm/mach-kirkwood/board-openblocks_a6.c |    4 ++--
 2 files changed, 21 insertions(+), 2 deletions(-)
arch/arm/boot/dts/kirkwood-openblocks_a6.dts +0 -0
index 37dc3a7..183df04 100644

arch/arm/boot/dts/kirkwood-openblocks_a6.dts line 79

Quoted 5 lines
arch/arm/boot/dts/kirkwood-openblocks_a6.dts +2 -0
@@ -75,4 +75,23 @@
                      };
              };
      };
+
+     gpio_leds {

Hi Nobuhiro

Quoted 3 lines

Thanks for the patch, looks good except for a minor point. The convention is to use gpio-leds, not gpio_leds.

OK, I will fix.

Quoted 3 lines

Thanks
Andrew

Best regards,
Nobuhiro

Signature · 3 lines
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6