Re: [PATCH 1/2] dt-bindings: leds: Document rohm,bd65b60 bindings

From: Krzysztof Kozlowski
Date: Sun Mar 12 2023 - 16:42:19 EST


On 12/03/2023 21:34, Bogdan Ionescu wrote:
>> I think yes, but what about LED on/off? Is it also shared or separate?
>> Because if it is shared, then basically it is just one LED...
> No, the outputs can be enabled independently, but I don't see any
> function in the led_classdev to do that.
> The led-sources property looks like the right thing to use for this.
> If I have effectively only one led per device, do I still need an led
> child node or is this sufficient:
>
> + #include <dt-bindings/leds/common.h>
> + i2c {
> + backlight@64 {

First of all, backlight is something a bit different/more specific - see
Documentation/devicetree/bindings/leds/backlight/

Anyway for led-sources and everything in one node, I think you do not
need any children. But this will allow you only one function and one
color...

> + compatible = "rohm,bd65b60";
> + reg = <0x64>;
> +
> + led-sources = <1>, <2>;
> + function = LED_FUNCTION_BACKLIGHT;
> + color = <LED_COLOR_ID_WHITE>;
> +
> + rohm,ovp = <30000000>;
> + };
> + };
>
> Best regards,
> Bogdan Ionescu
>

Best regards,
Krzysztof