[OpenWrt-Devel] [PATCH] treewide: use "model" instead of ambiguous "boardname" in 01_leds

David Bauer mail at david-bauer.net
Fri May 22 15:36:15 EDT 2020


Hello Adrian,

On 5/21/20 8:30 PM, mail at adrianschmutzler.de wrote:
> "device" would have been my alternative choice. However, for me "device" implies the full name (including vendor) even more.
> In contrast, for me model implies that the vendor is not included (like we use in for DEVICE_MODEL). I accept your argument about the DTS "model", though.
> 
> I agree that finding a proper name is hard here, however I don't think it's really good to have $boardname and board_name standing for something different.

I don't like to bikeshed about this topic but I'm with Matthias here.

The meaning is always clear from the context, so i think the naming
doesn't need to adapt to device. It's not we gain any benefit being it
easier to understand or more lightweight code out of it.

> 
> After all, it might be cleaner to keep $boardname for the model part, but rename board_name to something more accurate, but I hesitate to touch this function as it will break compatibility widely.
> 
> Is there a reference somewhere about how the model:color:use scheme of the LED labels has to be set up? I couldn't find one on a quick search, but maybe it would be best to just pick what's used there, if there is any documentation ...

See the upstream documentation for the LED subsystem. [0]

It states:

There might be still LED class drivers around using vendor or product name
for devicename, but this approach is now deprecated as it doesn't convey
any added value.

[0] https://elixir.bootlin.com/linux/v5.6.14/source/Documentation/leds/leds-class.rst

Best wishes
David

> 
> Best
> 
> Adrian
> 
> 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list