Skip to contentSkip to conversation

ARM: dts: rockchip: Update LEDs to work with the last leds-gpio driver on radxarock

PATCH New Romain Perier 2 participants 4 messages Nov 23, 2014 – Dec 1, 2014 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: rockchip: Update LEDs to work with the last leds-gpio driver on radxarock

The leds-gpio driver recently switched to the device property API. The device_node name is no longer retrieved if the "label" devicetree property is not found. In this case the driver tries to create entries with (null) name in /sys/class/leds, which is wrong and generates backtrace as several gpio_leds have the same name. Also renamed subnode "yellow" to "blue" to match the last schematics updates.

---
 arch/arm/boot/dts/rk3188-radxarock.dts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/boot/dts/rk3188-radxarock.dts +4 -1
index 6eb62c0..9a09579 100644
@@ -43,16 +43,19 @@
 		compatible = "gpio-leds";
 
 		green {
+			label = "rock:green:user1";
 			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
 			default-state = "off";
 		};
 
-		yellow {
+		blue {
+			label = "rock:blue:user2";
 			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
 			default-state = "off";
 		};
 
 		sleep {
+			label = "rock:red:power";
 			gpios = <&gpio0 15 0>;
 			default-state = "off";
 		};
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARM: dts: rockchip: Update LEDs to work with the last leds-gpio driver on radxarock

See https://www.kernel.org/doc/Documentation/leds/leds-class.txt for LEDs device naming

2014-11-23 17:19 GMT+01:00 Romain Perier <[email protected]>:

Quoted 40 lines

The leds-gpio driver recently switched to the device property API. The device_node name is no longer retrieved if the "label" devicetree property is not found. In this case the driver tries to create entries with (null) name in /sys/class/leds, which is wrong and generates backtrace as several gpio_leds have the same name. Also renamed subnode "yellow" to "blue" to match the last schematics updates.

---
 arch/arm/boot/dts/rk3188-radxarock.dts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/boot/dts/rk3188-radxarock.dts +4 -2
index 6eb62c0..9a09579 100644
@@ -43,16 +43,19 @@
                compatible = "gpio-leds";
 
                green {
+                       label = "rock:green:user1";
                        gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
                        default-state = "off";
                };
 
-               yellow {
+               blue {
+                       label = "rock:blue:user2";
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                        default-state = "off";
                };
 
                sleep {
+                       label = "rock:red:power";
                        gpios = <&gpio0 15 0>;
                        default-state = "off";
                };
--

1.9.1

#2 lore raw

PATCH 1/1 ARM: dts: rockchip: Update LEDs to work with the last leds-gpio driver on radxarock

ping :)

2014-11-23 17:20 GMT+01:00 Romain Perier <[email protected]>:

Quoted 44 lines

See https://www.kernel.org/doc/Documentation/leds/leds-class.txt for LEDs device naming

2014-11-23 17:19 GMT+01:00 Romain Perier <[email protected]>:

Quoted 40 lines

The leds-gpio driver recently switched to the device property API. The device_node name is no longer retrieved if the "label" devicetree property is not found. In this case the driver tries to create entries with (null) name in /sys/class/leds, which is wrong and generates backtrace as several gpio_leds have the same name. Also renamed subnode "yellow" to "blue" to match the last schematics updates.

---
 arch/arm/boot/dts/rk3188-radxarock.dts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/boot/dts/rk3188-radxarock.dts +4 -2
index 6eb62c0..9a09579 100644
@@ -43,16 +43,19 @@
                compatible = "gpio-leds";
 
                green {
+                       label = "rock:green:user1";
                        gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
                        default-state = "off";
                };
 
-               yellow {
+               blue {
+                       label = "rock:blue:user2";
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                        default-state = "off";
                };
 
                sleep {
+                       label = "rock:red:power";
                        gpios = <&gpio0 15 0>;
                        default-state = "off";
                };
--

1.9.1

#3 lore raw

PATCH 1/1 ARM: dts: rockchip: Update LEDs to work with the last leds-gpio driver on radxarock

In reply to Romain Perier

Am Sonntag, 23. November 2014, 16:19:35 schrieb Romain Perier:

Quoted 8 lines

The leds-gpio driver recently switched to the device property API. The device_node name is no longer retrieved if the "label" devicetree property is not found. In this case the driver tries to create entries with (null) name in /sys/class/leds, which is wrong and generates backtrace as several gpio_leds have the same name. Also renamed subnode "yellow" to "blue" to match the last schematics updates.

applied to my dts branch