* [PATCH] fixes the pin settings of two LEDs on board nanopi neo plus2 @ 2023-09-11 14:09 longqi 2023-09-11 14:42 ` Krzysztof Kozlowski 2023-09-11 14:54 ` Andre Przywara 0 siblings, 2 replies; 5+ messages in thread From: longqi @ 2023-09-11 14:09 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, moderated list:ARM/Allwinner sunXi SoC support, open list:ARM/Allwinner sunXi SoC support, open list Cc: longqi Signed-off-by: longqi <longqi90@gmail.com> --- .../boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts index 4c3921ac236c..0cb7a07ab1de 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts @@ -26,14 +26,15 @@ leds { compatible = "gpio-leds"; led-0 { - label = "nanopi:green:pwr"; - gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; - default-state = "on"; + label = "nanopi:red:pwr"; + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ + linux,default-trigger = "default-on"; }; led-1 { - label = "nanopi:red:status"; - gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; + label = "nanopi:green:status"; + gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ + linux,default-trigger = "heartbeat"; }; }; -- 2.34.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] fixes the pin settings of two LEDs on board nanopi neo plus2 2023-09-11 14:09 [PATCH] fixes the pin settings of two LEDs on board nanopi neo plus2 longqi @ 2023-09-11 14:42 ` Krzysztof Kozlowski 2023-09-15 13:14 ` Zhang LongQi 2023-09-11 14:54 ` Andre Przywara 1 sibling, 1 reply; 5+ messages in thread From: Krzysztof Kozlowski @ 2023-09-11 14:42 UTC (permalink / raw) To: longqi, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, moderated list:ARM/Allwinner sunXi SoC support, open list:ARM/Allwinner sunXi SoC support, open list On 11/09/2023 16:09, longqi wrote: > Signed-off-by: longqi <longqi90@gmail.com> Thank you for your patch. There is something to discuss/improve. Please use subject prefixes matching the subsystem. You can get them for example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory your patch is touching. Your commit msg is missing. Please describe the bug or the problem thus it will be obvious why this change is needed. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fixes the pin settings of two LEDs on board nanopi neo plus2 2023-09-11 14:42 ` Krzysztof Kozlowski @ 2023-09-15 13:14 ` Zhang LongQi 0 siblings, 0 replies; 5+ messages in thread From: Zhang LongQi @ 2023-09-15 13:14 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, moderated list:ARM/Allwinner sunXi SoC support, open list:ARM/Allwinner sunXi SoC support, open list Thanks Krzysztof, I will modify and submit. sorry for the previous email which is the html format. On Mon, Sep 11, 2023 at 10:42 PM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 11/09/2023 16:09, longqi wrote: > > Signed-off-by: longqi <longqi90@gmail.com> > > Thank you for your patch. There is something to discuss/improve. > > Please use subject prefixes matching the subsystem. You can get them for > example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory > your patch is touching. > > Your commit msg is missing. Please describe the bug or the problem thus > it will be obvious why this change is needed. > > > Best regards, > Krzysztof > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fixes the pin settings of two LEDs on board nanopi neo plus2 2023-09-11 14:09 [PATCH] fixes the pin settings of two LEDs on board nanopi neo plus2 longqi 2023-09-11 14:42 ` Krzysztof Kozlowski @ 2023-09-11 14:54 ` Andre Przywara 2023-09-11 15:04 ` Jernej Škrabec 1 sibling, 1 reply; 5+ messages in thread From: Andre Przywara @ 2023-09-11 14:54 UTC (permalink / raw) To: longqi Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, moderated list:ARM/Allwinner sunXi SoC support, open list:ARM/Allwinner sunXi SoC support, open list On Mon, 11 Sep 2023 22:09:59 +0800 longqi <longqi90@gmail.com> wrote: Hi, please add a few lines here saying why you fix this: it looks like the red LED wasn't working at all, because of the wrong GPIO, and the colours were actually swapped? This would be good to know for everyone reading this patch. In general this is a good catch, so thanks for sending this! More below: > Signed-off-by: longqi <longqi90@gmail.com> > --- > .../boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts > index 4c3921ac236c..0cb7a07ab1de 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts > @@ -26,14 +26,15 @@ leds { > compatible = "gpio-leds"; > > led-0 { > - label = "nanopi:green:pwr"; > - gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; > - default-state = "on"; > + label = "nanopi:red:pwr"; label is now a deprecated property. That's fine for existing DTs, but I guess touching this node means you should update this, by using "function" and "color", as described in: Documentation/devicetree/bindings/leds/common.yaml > + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ > + linux,default-trigger = "default-on"; > }; > > led-1 { > - label = "nanopi:red:status"; > - gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; > + label = "nanopi:green:status"; Same thing with label here, please use "function" and "color". > + gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ > + linux,default-trigger = "heartbeat"; I don't think we assign default triggers for LED merely labelled "status", as people might have different use cases for this. For instance I'd find a USB or eMMC trigger more useful. So you can just drop that line. Cheers, Andre ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fixes the pin settings of two LEDs on board nanopi neo plus2 2023-09-11 14:54 ` Andre Przywara @ 2023-09-11 15:04 ` Jernej Škrabec 0 siblings, 0 replies; 5+ messages in thread From: Jernej Škrabec @ 2023-09-11 15:04 UTC (permalink / raw) To: longqi, Andre Przywara Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Samuel Holland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, moderated list:ARM/Allwinner sunXi SoC support, open list:ARM/Allwinner sunXi SoC support, open list Dne ponedeljek, 11. september 2023 ob 16:54:18 CEST je Andre Przywara napisal(a): > On Mon, 11 Sep 2023 22:09:59 +0800 > longqi <longqi90@gmail.com> wrote: > > Hi, > > please add a few lines here saying why you fix this: it looks like the red > LED wasn't working at all, because of the wrong GPIO, and the colours were > actually swapped? This would be good to know for everyone reading this > patch. Additionally, add "Fixes" tag, since it's a bug in DT. In any case, go through https://www.kernel.org/doc/html/latest/process/submitting-patches.html so your patch will be correctly formatted. Best regards, Jernej > > In general this is a good catch, so thanks for sending this! > > More below: > > Signed-off-by: longqi <longqi90@gmail.com> > > --- > > > > .../boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 11 ++++++----- > > 1 file changed, 6 insertions(+), 5 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts > > b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts index > > 4c3921ac236c..0cb7a07ab1de 100644 > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts > > @@ -26,14 +26,15 @@ leds { > > > > compatible = "gpio-leds"; > > > > led-0 { > > > > - label = "nanopi:green:pwr"; > > - gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; > > - default-state = "on"; > > + label = "nanopi:red:pwr"; > > label is now a deprecated property. That's fine for existing DTs, but I > guess touching this node means you should update this, by using "function" > and "color", as described in: > Documentation/devicetree/bindings/leds/common.yaml > > > + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ > > + linux,default-trigger = "default-on"; > > > > }; > > > > led-1 { > > > > - label = "nanopi:red:status"; > > - gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; > > + label = "nanopi:green:status"; > > Same thing with label here, please use "function" and "color". > > > + gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ > > + linux,default-trigger = "heartbeat"; > > I don't think we assign default triggers for LED merely labelled "status", > as people might have different use cases for this. For instance I'd find > a USB or eMMC trigger more useful. So you can just drop that line. > > Cheers, > Andre ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-09-15 13:14 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-09-11 14:09 [PATCH] fixes the pin settings of two LEDs on board nanopi neo plus2 longqi 2023-09-11 14:42 ` Krzysztof Kozlowski 2023-09-15 13:14 ` Zhang LongQi 2023-09-11 14:54 ` Andre Przywara 2023-09-11 15:04 ` Jernej Škrabec
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).