diff mbox series

[v2,1/4] ARM: dts: am335x-pocketbeagle: update LED information

Message ID 20230818151039.40566-2-twoerner@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/4] ARM: dts: am335x-pocketbeagle: update LED information | expand

Commit Message

Trevor Woerner Aug. 18, 2023, 3:10 p.m. UTC
The "label" property is deprecated. Replace the "label" property with
"color" and "description" properties.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Comments

Robert Nelson Aug. 21, 2023, 3:36 p.m. UTC | #1
On Sun, Aug 20, 2023 at 5:24 AM Trevor Woerner <twoerner@gmail.com> wrote:
>
> The "label" property is deprecated. Replace the "label" property with
> "color" and "description" properties.
>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
>  arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> index 5dfe4d4bab93..1c11245f6864 100644
> --- a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> +++ b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> @@ -8,6 +8,7 @@
>
>  #include "am33xx.dtsi"
>  #include "am335x-osd335x-common.dtsi"
> +#include <dt-bindings/leds/common.h>
>
>  / {
>         model = "TI AM335x PocketBeagle";
> @@ -24,28 +25,32 @@ leds {
>                 compatible = "gpio-leds";
>
>                 led-usr0 {
> -                       label = "beaglebone:green:usr0";
> +                       color = <LED_COLOR_ID_BLUE>;
> +                       function = LED_FUNCTION_HEARTBEAT;

So some background, while the LED are not Green, and this is not the BeagleBone.

We used these specific labels to keep all user documents going back to
the original BeagleBone (white) (with 3.8.x kernel), the same so users
could easily blink an led from user-space even on newer boards.

So it became our un-official abi for new users for the BeagleBoard
family of devices..

It's even what we do on the BeaglePlay..

https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees/-/blob/v5.10.x-ti-unified/src/arm64/k3-am625-beagleplay.dts#L179-217

Regards,
Trevor Woerner Aug. 22, 2023, 2:37 p.m. UTC | #2
On Mon 2023-08-21 @ 10:36:34 AM, Robert Nelson wrote:
> On Sun, Aug 20, 2023 at 5:24 AM Trevor Woerner <twoerner@gmail.com> wrote:
> >
> > The "label" property is deprecated. Replace the "label" property with
> > "color" and "description" properties.
> >
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > ---
> >  arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts | 13 +++++++++----
> >  1 file changed, 9 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> > index 5dfe4d4bab93..1c11245f6864 100644
> > --- a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> > +++ b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> > @@ -8,6 +8,7 @@
> >
> >  #include "am33xx.dtsi"
> >  #include "am335x-osd335x-common.dtsi"
> > +#include <dt-bindings/leds/common.h>
> >
> >  / {
> >         model = "TI AM335x PocketBeagle";
> > @@ -24,28 +25,32 @@ leds {
> >                 compatible = "gpio-leds";
> >
> >                 led-usr0 {
> > -                       label = "beaglebone:green:usr0";
> > +                       color = <LED_COLOR_ID_BLUE>;
> > +                       function = LED_FUNCTION_HEARTBEAT;
> 
> So some background, while the LED are not Green, and this is not the BeagleBone.
> 
> We used these specific labels to keep all user documents going back to
> the original BeagleBone (white) (with 3.8.x kernel), the same so users
> could easily blink an led from user-space even on newer boards.
> 
> So it became our un-official abi for new users for the BeagleBoard
> family of devices..
> 
> It's even what we do on the BeaglePlay..
> 
> https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees/-/blob/v5.10.x-ti-unified/src/arm64/k3-am625-beagleplay.dts#L179-217

Thanks for the background. I've sent a v3 which simply adds the "color" and
"function" properties but leaves the "label" property intact.
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
index 5dfe4d4bab93..1c11245f6864 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
+++ b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
@@ -8,6 +8,7 @@ 
 
 #include "am33xx.dtsi"
 #include "am335x-osd335x-common.dtsi"
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "TI AM335x PocketBeagle";
@@ -24,28 +25,32 @@  leds {
 		compatible = "gpio-leds";
 
 		led-usr0 {
-			label = "beaglebone:green:usr0";
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_HEARTBEAT;
 			gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "heartbeat";
 			default-state = "off";
 		};
 
 		led-usr1 {
-			label = "beaglebone:green:usr1";
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_DISK_ACTIVITY;
 			gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "mmc0";
 			default-state = "off";
 		};
 
 		led-usr2 {
-			label = "beaglebone:green:usr2";
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_CPU;
 			gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "cpu0";
 			default-state = "off";
 		};
 
 		led-usr3 {
-			label = "beaglebone:green:usr3";
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_INDICATOR;
 			gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
 			default-state = "off";
 		};