Skip to contentSkip to conversation

at91sam9m10g45-ek: rename leds to match board

PATCH New Alexandre Belloni 2 participants 6 messages Oct 26, 2012 – Oct 30, 2012

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

PATCH 1/1 at91sam9m10g45-ek: rename leds to match board

The leds' name in the board file didn't match the names written on the board itsef. This can be confusing when trying to use them for another purpose.

---
 arch/arm/boot/dts/at91sam9m10g45ek.dts  |   12 ++++++------
 arch/arm/mach-at91/board-sam9m10g45ek.c |    8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)
arch/arm/boot/dts/at91sam9m10g45ek.dts +6 -6
index 15e1dd4..c58b628 100644
@@ -93,20 +93,20 @@
 	leds {
 		compatible = "gpio-leds";
 
-		d8 {
-			label = "d8";
+		d3 {
+			label = "d3";
 			gpios = <&pioD 30 0>;
 			linux,default-trigger = "heartbeat";
 		};
 
-		d6 {
-			label = "d6";
+		d1 {
+			label = "d1";
 			gpios = <&pioD 0 1>;
 			linux,default-trigger = "nand-disk";
 		};
 
-		d7 {
-			label = "d7";
+		d2 {
+			label = "d2";
 			gpios = <&pioD 31 1>;
 			linux,default-trigger = "mmc0";
 		};
arch/arm/mach-at91/board-sam9m10g45ek.c +4 -4
index 3d48ec1..6d77687 100644
@@ -413,19 +413,19 @@ static struct ac97c_platform_data ek_ac97_data = {
  */
 static struct gpio_led ek_leds[] = {
 	{	/* "top" led, red, powerled */
-		.name			= "d8",
+		.name			= "d3",
 		.gpio			= AT91_PIN_PD30,
 		.default_trigger	= "heartbeat",
 	},
 	{	/* "left" led, green, userled2, pwm3 */
-		.name			= "d6",
+		.name			= "d1",
 		.gpio			= AT91_PIN_PD0,
 		.active_low		= 1,
 		.default_trigger	= "nand-disk",
 	},
 #if !(defined(CONFIG_LEDS_ATMEL_PWM) || defined(CONFIG_LEDS_ATMEL_PWM_MODULE))
 	{	/* "right" led, green, userled1, pwm1 */
-		.name			= "d7",
+		.name			= "d2",
 		.gpio			= AT91_PIN_PD31,
 		.active_low		= 1,
 		.default_trigger	= "mmc0",
@@ -440,7 +440,7 @@ static struct gpio_led ek_leds[] = {
 static struct gpio_led ek_pwm_led[] = {
 #if defined(CONFIG_LEDS_ATMEL_PWM) || defined(CONFIG_LEDS_ATMEL_PWM_MODULE)
 	{	/* "right" led, green, userled1, pwm1 */
-		.name			= "d7",
+		.name			= "d2",
 		.gpio			= 1,	/* is PWM channel number */
 		.active_low		= 1,
 		.default_trigger	= "none",
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 at91sam9m10g45-ek: rename leds to match board

Quoted 3 lines · Alexandre Belloni

The leds' name in the board file didn't match the names written on the board itsef. This can be confusing when trying to use them for another purpose.

It like this for so long time and I'm not really willing to touch the dts

Best Regards,
J.

Quoted 83 lines
---
 arch/arm/boot/dts/at91sam9m10g45ek.dts  |   12 ++++++------
 arch/arm/mach-at91/board-sam9m10g45ek.c |    8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)
arch/arm/boot/dts/at91sam9m10g45ek.dts +6 -6
index 15e1dd4..c58b628 100644
@@ -93,20 +93,20 @@
 	leds {
 		compatible = "gpio-leds";
 
-		d8 {
-			label = "d8";
+		d3 {
+			label = "d3";
 			gpios = <&pioD 30 0>;
 			linux,default-trigger = "heartbeat";
 		};
 
-		d6 {
-			label = "d6";
+		d1 {
+			label = "d1";
 			gpios = <&pioD 0 1>;
 			linux,default-trigger = "nand-disk";
 		};
 
-		d7 {
-			label = "d7";
+		d2 {
+			label = "d2";
 			gpios = <&pioD 31 1>;
 			linux,default-trigger = "mmc0";
 		};
arch/arm/mach-at91/board-sam9m10g45ek.c +4 -4
index 3d48ec1..6d77687 100644
@@ -413,19 +413,19 @@ static struct ac97c_platform_data ek_ac97_data = {
  */
 static struct gpio_led ek_leds[] = {
 	{	/* "top" led, red, powerled */
-		.name			= "d8",
+		.name			= "d3",
 		.gpio			= AT91_PIN_PD30,
 		.default_trigger	= "heartbeat",
 	},
 	{	/* "left" led, green, userled2, pwm3 */
-		.name			= "d6",
+		.name			= "d1",
 		.gpio			= AT91_PIN_PD0,
 		.active_low		= 1,
 		.default_trigger	= "nand-disk",
 	},
 #if !(defined(CONFIG_LEDS_ATMEL_PWM) || defined(CONFIG_LEDS_ATMEL_PWM_MODULE))
 	{	/* "right" led, green, userled1, pwm1 */
-		.name			= "d7",
+		.name			= "d2",
 		.gpio			= AT91_PIN_PD31,
 		.active_low		= 1,
 		.default_trigger	= "mmc0",
@@ -440,7 +440,7 @@ static struct gpio_led ek_leds[] = {
 static struct gpio_led ek_pwm_led[] = {
 #if defined(CONFIG_LEDS_ATMEL_PWM) || defined(CONFIG_LEDS_ATMEL_PWM_MODULE)
 	{	/* "right" led, green, userled1, pwm1 */
-		.name			= "d7",
+		.name			= "d2",
 		.gpio			= 1,	/* is PWM channel number */
 		.active_low		= 1,
 		.default_trigger	= "none",
Signature · 7 lines
1.7.9.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

PATCH 1/1 at91sam9m10g45-ek: rename leds to match board

Quoted 7 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 3 lines · Alexandre Belloni

The leds' name in the board file didn't match the names written on the board itsef. This can be confusing when trying to use them for another purpose.

It like this for so long time and I'm not really willing to touch the dts

I don't think any real application is build on the assumption that each pins are wrongly named. But, for newcomers, it can get really confusing, especially as the led triggers are compiled as module in the defconfigs and the LEDs won't turn on until you load the module.

It just boils down to wanting to improve the usability of the development board or not.

Signature · 1 line
Alexandre Belloni
#3 lore raw

PATCH 1/1 at91sam9m10g45-ek: rename leds to match board

Quoted 9 lines · Alexandre Belloni
Quoted 7 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 3 lines · Alexandre Belloni

The leds' name in the board file didn't match the names written on the board itsef. This can be confusing when trying to use them for another purpose.

It like this for so long time and I'm not really willing to touch the dts

Quoted 7 lines

I don't think any real application is build on the assumption that each pins are wrongly named. But, for newcomers, it can get really confusing, especially as the led triggers are compiled as module in the defconfigs and the LEDs won't turn on until you load the module.

It just boils down to wanting to improve the usability of the development board or not.

No here it's different teh same HW have different revision

m10g45es
m10ekes
9g45ekes

the m10ekes is the first one and the leds does match

So I agree we can put a comment in the c or the dts about it but do not change the content as the board support is like this for really long time And I do not want to ebd-up with 2 or 3 dts jsut for lesd naming That I will have to maintain

Best Regards,
J.

#4 lore raw

PATCH 1/1 at91sam9m10g45-ek: rename leds to match board

Quoted 8 lines · Jean-Christophe PLAGNIOL-VILLARD

No here it's different teh same HW have different revision

m10g45es
m10ekes
9g45ekes

the m10ekes is the first one and the leds does match

Quoted 7 lines

So I agree we can put a comment in the c or the dts about it but do not change the content as the board support is like this for really long time And I do not want to ebd-up with 2 or 3 dts jsut for lesd naming That I will have to maintain

From my discussion with atmel last week, I understood that the only

publicly available board is the m10g45ek. Support for the other boards you mention is actually being dropped and you can't find them on ATMEL's website anymore.

So, I agree you should support only one configuration but at least, let it be the one for the current board.

Regards,

Signature · 1 line
Alexandre Belloni
#5 lore raw

PATCH 1/1 at91sam9m10g45-ek: rename leds to match board

Quoted 16 lines · Alexandre Belloni
Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD

No here it's different teh same HW have different revision

m10g45es
m10ekes
9g45ekes

Quoted 7 lines

the m10ekes is the first one and the leds does match

So I agree we can put a comment in the c or the dts about it but do not change the content as the board support is like this for really long time And I do not want to ebd-up with 2 or 3 dts jsut for lesd naming That I will have to maintain

Quoted 7 lines

From my discussion with atmel last week, I understood that the only publicly available board is the m10g45ek. Support for the other boards you mention is actually being dropped and you can't find them on ATMEL's website anymore.

So, I agree you should support only one configuration but at least, let it be the one for the current board.

sorry no

we touch dts only if this is a bug this is a comestic change

Best Regards,
J.