On Sat, Nov 30, 2019 at 8:07 PM Mohammad Rasim <mohammad.rasim96@xxxxxxxxx> wrote: [...] > > > > > + leds { > > > > > + compatible = "gpio-leds"; > > > > > + red { > > > > > + label = "status"; > > > > this property seems to be deprecated now, see > > > > Documentation/devicetree/bindings/leds/common.txt > > > > but I'm not sure whether Kevin has made a decision yet when to not > > > > accept "label" properties here anymore > > > OK, I will remove the deprecated property > > > but I'm not sure what should I choose as a function, LED_FUNCTION_STATUS > > > or LED_FUNCTION_ACTIVITY ? > > I haven't used function and color myself but I believe it works like > > this (untested): > > - add an #include <dt-bindings/leds/common.h> next to the other > > #includes (keep alphabetical ordering). this include file also > > contains all the #defines for color and function > > - add a color property, for example: color = <LED_COLOR_ID_RED>; > > - add a function property, for example: function = <LED_FUNCTION_STATUS>; > > - test, debug and fix potential issues ;) > Yes, I've already tested it but I'm just not sure what should be in the > function property, LED_FUNCTION_STATUS and LED_FUNCTION_ACTIVITY both > seem like good choices, I haven't considered "activity" before, but most of our boards with some kind of status LED use status in the label unless someone objects: choose the one you like most [...] > if this property only used to lable the led then LED_FUNCTION_STATUS is > ok, but maybe this is used by userspace to trigger the led ?! in general devicetree describes hardware I don't know if userspace does something "automatically" based on the function. however, my expectation is that the trigger from "linux,default-trigger" is used (if set) and that you can change the trigger from userspace manually (if you wish) Martin