On 9/10/25 2:01 PM, Aleksandrs Vinarskis wrote:
> From: Hans de Goede <ha...@kernel.org>
> 
> Add 'name' argument to of_led_get() such that it can lookup LEDs in
> devicetree by either name or index.
> 
> And use this modified function to add devicetree support to the generic
> (non devicetree specific) [devm_]led_get() function.
> 
> This uses the standard devicetree pattern of adding a -names string array
> to map names to the indexes for an array of resources.
> 
> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com>
> Reviewed-by: Lee Jones <l...@kernel.org>
> Reviewed-by: Linus Walleij <linus.wall...@linaro.org>
> Signed-off-by: Hans de Goede <ha...@kernel.org>
> Signed-off-by: Aleksandrs Vinarskis <a...@vinarskis.com>
> ---

I was thinking, perhaps we should introduce some sort of an exclusive
access mechanism, so that the e.g. user (or malware) can't listen to
uevents and immediately shut down the LED over sysfs

Konrad

Reply via email to