Re: [PATCH 1/2] dt-bindings: leds: backlight: add Kinetic KTD3137

From: Daniel Thompson

Date: Tue Nov 03 2026 - 12:27:12 EST


On Tue, Nov 03, 2026 at 03:21:45PM +0000, Roman Vivchar wrote:
> On Tuesday, November 3rd, 2026 at 4:42 PM, Daniel Thompson <danielt@xxxxxxxxxx> wrote:
>
> > On Tue, Nov 03, 2026 at 02:34:02PM +0000, Roman Vivchar wrote:
> > > Hi Daniel,
> > >
> > > On Tuesday, November 3rd, 2026 at 4:05 PM, Daniel Thompson <danielt@xxxxxxxxxx> wrote:
> > > > On Mon, Nov 02, 2026 at 09:58:48PM +0200, Roman Vivchar via B4 Relay wrote:
> > > > > + led-max-microamp:
> > > > > + minimum: 5000
> > > > > + maximum: 29800
> > > > > + default: 20200
> > > > > +
> > > > > + vin-supply: true
> > > > > +
> > > > > +required:
> > > > > + - compatible
> > > > > + - reg
> > > > > + - vin-supply
> > > >
> > > > Why is vin-supply required?
> > > >
> > >
> > > The chip cannot function without VIN power supply. Even if it's on the
> > > always-on power rail on certain board, there's always a chance it might be
> > > accidentally left disabled on the other. It's better to document supply in
> > > the bindings as far as I understand.
> >
> > You haven't just documented the binding, you have also made the property
> > mandatory by adding it to required.
> >
> > So what I am asking is why is this property listed as required. You
> > didn't implement the driver in a way that makes the supply mandatory.
>
> Not sure I follow.
>
> In the driver I've used devm_regulator_get_enable(), rather than _optional(),
> since my understanding is that the non-optional helper is a standard kernel
> API for required supplies (with regulator core warning and fallback to dummy
> regulator in case DT omits it).

That dummy fallback essentially makes it optional. On a board with an
always-on supply then there is no need to include vin-supply in the
DTB. The driver will work just fine without it.


> Do you suggest dropping vin-supply from required: ? On my board it's connected
> to an always-on supply, though I can't tell about others. I can proceed with
> this if the DT maintainers are okay with that.

Given your answers then, yes, vin-supply should not be in the required:
list (e.g. we don't want DT validation to fail for a DT that does not
include a vin-supply).


Daniel.