devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Matthias Fend <matthias.fend@emfend.at>,
	Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	bsp-development.geo@leica-geosystems.com
Subject: Re: [PATCH 1/2] dt-bindings: leds: add Texas Instruments TPS6131x flash LED driver
Date: Mon, 10 Mar 2025 12:45:52 +0100	[thread overview]
Message-ID: <1091b3cc-d24f-4a45-ae9e-d439b94267da@kernel.org> (raw)
In-Reply-To: <d30e5994-9e7a-4f0c-96e6-14fe6f132f5f@emfend.at>

On 10/03/2025 09:40, Matthias Fend wrote:
> Hi Krzysztof,
> 
> thanks for your review.
> 
> Am 10.03.2025 um 08:49 schrieb Krzysztof Kozlowski:
>> On 28/02/2025 11:31, Matthias Fend wrote:
>>> +
>>> +properties:
>>> +  compatible:
>>> +    enum:
>>> +      - ti,tps61310
>>> +      - ti,tps61311
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  '#address-cells':
>>> +    const: 1
>>> +
>>> +  '#size-cells':
>>> +    const: 0
>>
>> Why do you need these two?
> 
> As a template, I also used recently added bindings 
> (silergy,sy7802.yaml). These entries come from there, but as I 
> understand it, they are supposed to be removed, right?

They make no sense based on the bindings.

> 
>>
>>> +
>>> +  reset-gpios:
>>> +    maxItems: 1
>>> +    description: GPIO connected to NRESET pin
>>> +
>>> +  ti,valley-current-limit:
>>> +    type: boolean
>>> +    description:
>>> +      Reduce the valley peak current limit from 1750mA to 1250mA (TPS61310) or
>>> +      from 2480mA to 1800mA (TPS61311).
>>> +
>>> +  led:
>>
>> Why do you have only one led node? Description says three: LED1-3,
>> unless these are just sinks which always have to be connected to the
>> same LED?
> 
> That is basically correct. If you just want to switch the 3 LEDs on or 
> off, you could map that accordingly.
> In detail, however, the 3 channels are not really independent of each 
> other. All channels share, for example, the flash controller, the safety 
> timers and the operating mode. In addition, two channels share the 
> configuration registers. It is therefore not possible to use one channel 
> as a flash and another as a normal LED.
> For use as an LED flash controller (what the chip actually is), it 
> therefore only makes sense if one or more channels are combined.

You define the binding which will be set in stone. This binding says it
is not possible to use two or three LEDs. I am fine with this, but be
aware of it and explain this in binding description.

> 
>>
>>> +    type: object
>>> +    $ref: common.yaml#
>>> +    unevaluatedProperties: false
>>> +
>>> +    properties:
>>> +      led-sources:
>>> +        allOf:
>>
>> Drop allOf
>>
>>> +          - minItems: 1
>>> +            maxItems: 3
>>> +            items:
>>> +              enum: [1, 2, 3]
>>> +
>>> +      led-max-microamp:
>>> +        anyOf:
>>
>> oneOf
>>
>>> +          - minimum: 25000
>>> +            maximum: 350000
>>> +            multipleOf: 50000
>>> +          - minimum: 25000
>>> +            maximum: 525000
>>
>> Why two different values?
> 
> The channels can in principle be configured in 25mA steps.
> If only the two channels that share the configuration register are used, 
> the step size doubles to 50mA. The maximum current values ​​for such a 
> configuration are also different.
> There are of course several other combinations of channels that would 
> result in different maximum values, but since the step size is an 
> important value for the API, I wanted to describe these two cases 
> explicitly.
> 
ok

Best regards,
Krzysztof

  reply	other threads:[~2025-03-10 11:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28 10:31 [PATCH 0/2] Support for Texas Instruments TPS6131X flash LED driver Matthias Fend
2025-02-28 10:31 ` [PATCH 1/2] dt-bindings: leds: add Texas Instruments TPS6131x " Matthias Fend
2025-02-28 18:24   ` Conor Dooley
2025-03-10  7:20     ` Matthias Fend
2025-03-10  7:43       ` Krzysztof Kozlowski
2025-03-10  7:49   ` Krzysztof Kozlowski
2025-03-10  8:40     ` Matthias Fend
2025-03-10 11:45       ` Krzysztof Kozlowski [this message]
2025-02-28 10:31 ` [PATCH 2/2] leds: tps6131x: add support for Texas Instruments TPS6131X " Matthias Fend
2025-03-10  7:46   ` Krzysztof Kozlowski
2025-03-10  8:04     ` Matthias Fend
2025-03-10 11:46       ` Krzysztof Kozlowski
2025-03-10 14:49   ` Lee Jones
2025-03-14  8:28     ` Matthias Fend
2025-03-14 10:52       ` Lee Jones
2025-03-14 11:27         ` Matthias Fend
2025-03-14 11:45           ` Lee Jones
2025-03-14 12:38             ` Matthias Fend
2025-03-14 14:13               ` Lee Jones

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=1091b3cc-d24f-4a45-ae9e-d439b94267da@kernel.org \
    --to=krzk@kernel.org \
    --cc=bsp-development.geo@leica-geosystems.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=matthias.fend@emfend.at \
    --cc=pavel@ucw.cz \
    --cc=robh@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).