devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Bogdan Ionescu <bogdan.ionescu.work@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-leds@vger.kernel.or, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: leds: Document rohm,bd65b60 bindings
Date: Sat, 11 Mar 2023 10:06:34 +0100	[thread overview]
Message-ID: <d993fc28-1bb5-0a05-c7d2-4891038328e6@linaro.org> (raw)
In-Reply-To: <CALfPHoVT007ifyTepr_p-saDQtv5Sk7iYXM4qSMXyaCLL3iE2A@mail.gmail.com>

On 10/03/2023 11:41, Bogdan Ionescu wrote:
> Thanks for the feedback, I am working on addressing the issues you have
> raised. If I haven't mentioned something, please assume I am implementing
> your suggestion.
> 
>>> +    properties:
>>> +      rohm,enable-outputs:
>>
>> I don't understand why do you need this property. You should use
>> generic/existing properties, if possible.
> 
>> Drop led object. There is no real need for it, is it?
> 
> Would this structure be more appropriate:
> 
> + led-controler@64 {
> +     compatible = "rohm,bd65b60";
> +     reg = <0x64>;
> +     default-state = "keep";
> +     linux,default-trigger = "backlight";
> +
> +     led@1 {
> +         reg = <1>;
> +         function = LED_FUNCTION_BACKLIGHT;
> +         color = <LED_COLOR_ID_WHITE>;
> +     };
> +
> +     led@2 {
> +         reg = <2>;
> +         function = LED_FUNCTION_BACKLIGHT;
> +         color = <LED_COLOR_ID_WHITE>;
> +     };
> + };
> 
> Can I have 2 led nodes if they share the same brightness?

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...

> 
>>> +        enum: [ 0, 8, 16 ]
>>> +        default: 16
>>
>> What are the units? percent? Volts? Then use unit suffix in property
>> name. Your other file suggests volts so make it microvolts.
> 
> The chip has 3 possible values 25V, 30V and 35V. How should the driver
>  handle a value that is not exactly that?
> Should it round down for safety or return an error?

Then use -microvolt and real units
https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml


> 
> This was the reason for creating the bindings header file.
> Is it possible to reference defines from the bindings header file?
> 
> + enum:
> +   - BD65B60_OVP_25V
> +   - BD65B60_OVP_30V
> +   - BD65B60_OVP_35V
> + default: BD65B60_OVP_35V
> 
> I would prefer it if I didn't have to expose the weird bitmasks that ROHM
> have decided to use and instead use the actual values.
> 
> Apologies for the long email, but I wanted to make sure I was clear.




Best regards,
Krzysztof


  parent reply	other threads:[~2023-03-11  9:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08 20:14 [PATCH 1/2] dt-bindings: leds: Document rohm,bd65b60 bindings Bogdan Ionescu
2023-03-08 20:14 ` [PATCH 2/2] leds: Add support for rohm,bd65b60 led driver Bogdan Ionescu
2023-03-09  9:06   ` Krzysztof Kozlowski
     [not found]     ` <CALfPHoVFVpnLVEjzccbyMvmNR_=3vjJ+Ub8tkriJOvvV0cLzsA@mail.gmail.com>
2023-03-10 10:48       ` Krzysztof Kozlowski
2023-03-18  4:54   ` kernel test robot
2023-03-08 23:16 ` [PATCH 1/2] dt-bindings: leds: Document rohm,bd65b60 bindings Rob Herring
2023-03-09  9:03 ` Krzysztof Kozlowski
     [not found]   ` <CALfPHoVT007ifyTepr_p-saDQtv5Sk7iYXM4qSMXyaCLL3iE2A@mail.gmail.com>
2023-03-11  9:06     ` Krzysztof Kozlowski [this message]
     [not found]       ` <CALfPHoVR=kmHmbhNzQg-bW-bV6P8e_sE+vEebQXOfL-nEWg5TQ@mail.gmail.com>
2023-03-12 20:42         ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d993fc28-1bb5-0a05-c7d2-4891038328e6@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=bogdan.ionescu.work@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.or \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).