public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Sirat <email@sirat.me>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
	<linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<jic23@kernel.org>, <dlechner@baylibre.com>, <nuno.sa@analog.com>,
	<andy@kernel.org>, <robh@kernel.org>, <krzk+dt@kernel.org>,
	<conor+dt@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v7 1/2] dt-bindings: iio: proximity: add ST VL53L1X ToF sensor
Date: Wed, 25 Mar 2026 15:01:59 +0000	[thread overview]
Message-ID: <20260325150159.00004c3e@huawei.com> (raw)
In-Reply-To: <CANn+LW+X5puvzY+cKYKAbWY6L2d_0P_2AZxuRkwH7ngc6T-vJA@mail.gmail.com>

On Wed, 25 Mar 2026 20:38:48 +0600
Sirat <email@sirat.me> wrote:

> On Wed, Mar 25, 2026 at 8:06 PM Jonathan Cameron
> <jonathan.cameron@huawei.com> wrote:
> >
> > On Wed, 25 Mar 2026 14:44:13 +0100
> > Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >  
> > > On 25/03/2026 14:38, Jonathan Cameron wrote:  
> > > > On Wed, 25 Mar 2026 15:18:05 +0600
> > > > Sirat <email@sirat.me> wrote:
> > > >  
> > > >> On Wed, Mar 25, 2026 at 2:58 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:  
> > > >>>
> > > >>> On 25/03/2026 09:48, Sirat wrote:  
> > > >>>> On Wed, Mar 25, 2026 at 2:05 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:  
> > > >>>>>
> > > >>>>> On Wed, Mar 25, 2026 at 12:32:22PM +0600, Siratul Islam wrote:  
> > > >>>>>> Add device tree binding documentation for the STMicroelectronics
> > > >>>>>> VL53L1X Time-of-Flight ranging sensor connected via I2C.
> > > >>>>>>
> > > >>>>>> Make vdd-supply required. The device requires power to operate
> > > >>>>>> and the property should have been required from the start.  
> > > >>>>>
> > > >>>>> That's ABI break and device for many years was working fine, so this
> > > >>>>> should not be changed.
> > > >>>>>  
> > > >>>> Jonathan and David asked that vdd-supply be made required. I feel like
> > > >>>> there is a conflict here that I am not able to resolve myself.
> > > >>>>
> > > >>>> What I think about it is the binding does not correctly describe the
> > > >>>> hardware and we should consider this a bug and fix it.
> > > >>>> The driver worked because of a fallback mechanism (dummy/fake
> > > >>>> regulator) and not because power was optional.
> > > >>>>  
> > > >>>
> > > >>>
> > > >>> I looked at v6 and v5 and I do not see such comment for binding that
> > > >>> existing device should change ABI. Can you point me to it?
> > > >>>  
> > > >> "Make it required and add a note to the commit message to say why the
> > > >> requirement should always have been there. Devices tend not to work
> > > >> with no power." - Jonathan (v3:
> > > >> https://lore.kernel.org/linux-iio/20260322115704.10b2e0d4@jic23-huawei)
> > > >>
> > > >> "No, bindings should not depend on driver implementation." - David
> > > >> (When I asked if I should  drop the hard requirement in the binding,
> > > >> v6: https://lore.kernel.org/linux-iio/55e92148-b5de-4fb8-af0b-9476235341bc@baylibre.com/)
> > > >>
> > > >> "From the point of view of the devicetree, it doesn't matter what the
> > > >> driver does. It matters that the chip can't work without power. ;-)" -
> > > >> David (v1: https://lore.kernel.org/linux-iio/d0ec6a2f-6d30-4774-8950-15dd3c4b020b@baylibre.com)
> > > >>
> > > >> I'm not sure if this is the correct way to quote. But I have added the links.  
> > > >
> > > > This came up a few years back - though I doubt I can track down the
> > > > exact discussion however.
> > > >
> > > > From a Linux point of view we are breaking binding checks only if the
> > > > supply (that should always have been there as chips tend not to work
> > > > well without power) is not present.  We absolutely have to
> > > > keep the driver running whether or not the supply is specified.
> > > > Do other DT users provide such a constraint? I've no idea.
> > > >
> > > > If the DT maintainer preference is leave it not required (perhaps
> > > > with a comment saying new users of the binding should supply it)
> > > > then that's fine by me. I'll keep it in mind for future similar changes.  
> > >
> > > If this was other ABI, e.g. clock, then answer would be - do not require
> > > it, because that's ABI break. Therefore I would stick to that also to
> > > regulators. Once Rob also expressed such thoughts, although noting that
> > > it is not that big deal.
> > >
> > > New device in this binding of course should require the supply.  
> > Seems my memory was less than perfect on this :
> > https://lore.kernel.org/linux-iio/20241119140409.GA1093349-robh@kernel.org/#t
> >
> > Rob expressed that we are inconsistent on this, but he'd rather not
> > have regulators as a special case.
> >
> > So let's only make this required for the new device.
> >  
> So since it is a new device, how do I require this? should we split to
> a new binding (like I had in v1) and make that required. That would
> also allow us to correctly name the xshut pin.
> 
> Or do we do the "allOf:" exclusion? In that case, I think it wouldn't
> make sense to someone reading the binding without the context of
> commit history, as it would imply one of the devices explicitly
> doesn't need power.
This + add a comment that it's only not required for other devices
for backwards compatibility reasons.

> 
> I'm willing to do whichever is prefered tough and move this forward.
> >
> >  
> Thanks,
> 
> Sirat


  reply	other threads:[~2026-03-25 15:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25  6:32 [PATCH v7 0/2] iio: proximity: add driver for ST VL53L1X ToF sensor Siratul Islam
2026-03-25  6:32 ` [PATCH v7 1/2] dt-bindings: iio: proximity: add " Siratul Islam
2026-03-25  8:05   ` Krzysztof Kozlowski
2026-03-25  8:48     ` Sirat
2026-03-25  8:57       ` Krzysztof Kozlowski
2026-03-25  9:18         ` Sirat
2026-03-25 13:38           ` Jonathan Cameron
2026-03-25 13:44             ` Krzysztof Kozlowski
2026-03-25 14:06               ` Jonathan Cameron
2026-03-25 14:38                 ` Sirat
2026-03-25 15:01                   ` Jonathan Cameron [this message]
2026-03-25  6:32 ` [PATCH v7 2/2] iio: proximity: add driver for " Siratul Islam
2026-03-25 14:47   ` Jonathan Cameron
2026-03-25 16:33     ` Sirat
2026-03-25 19:47       ` Jonathan Cameron
2026-03-26  9:14     ` Andy Shevchenko
2026-03-25  7:55 ` [PATCH v7 0/2] " Krzysztof Kozlowski
2026-03-25  8:23   ` Sirat

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=20260325150159.00004c3e@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=email@sirat.me \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --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