Re: [PATCH v3 2/2] rockchip: rk3399: Add support for FriendlyARM NanoPi R4S
From: Tianling Shen <hidden>
Date: 2021-03-17 04:40:11
Also in:
linux-devicetree, linux-rockchip, lkml
Hi Pavel, On 2021-03-17 03:38, Pavel Machek [off-list ref] wrote:
On Tue 2021-03-16 16:34:50, Geert Uytterhoeven wrote:quoted
Hi Tianling, CC Jacek, Pavel On Tue, Mar 16, 2021 at 4:00 PM Tianling Shen [off-list ref] wrote:quoted
On 2021-03-16 02:23 Geert Uytterhoeven [off-list ref] wrote:quoted
Personally, I'm not so fond of the <foo>-%u node names, and prefer <foo>-<function>. With the former, it's way too easy to have a silent override in your .dts(i) stack. Cfr. commit 45f5d5a9e34d3fe4 ("arm64: dts: renesas: r8a77995: draak: Fix backlight regulator name")How about using `lan-led`, `sys-led` and `wan-led` here?Documentation/devicetree/bindings/leds/leds-gpio.yaml says "led-%u" is the preferred form, but that anything containing "led" as a substring is accepted. So I'd go for "led-lan" etc. BTW, you can validate your DTB against the leds-gpio DT bindings by running: make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/leds-gpio.yaml Background info for CCed parties:https://lore.kernel.org/linux-arm-kernel/20210316150033.15987-1-cnsztl@gmail.com/ (local) I don't care much either way, lan-0 is okay as is lan-led. but... + label = "nanopi-r4s:green:lan"; + label = "nanopi-r4s:red:sys"; + label = "nanopi-r4s:green:wan"; It would be good to have common labels, that means LED_FUNCTION_LAN, LED_FUNCTION_WAN, and figuring out something better than "sys", possibly LED_FUNCTION_FAULT?
LED_FUNCTION_POWER for "sys" would be fine, I think. However, Documentation/leds/leds-class.rst says the form of naming is "devicename:color:function", and according to the given examples, as well as other dts(i), would it be okay to use `green:lan` etc. as the lable?
Thanks,
Pavel
--
http://www.livejournal.com/~pavelmachekThanks, Tianling. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel