public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Petar Stoykov <pd.pstoykov@gmail.com>
Cc: Petar Stoykov via B4 Relay
	<devnull+pd.pstoykov.gmail.com@kernel.org>,
	linux-iio@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
Date: Sun, 7 Jul 2024 16:30:36 +0100	[thread overview]
Message-ID: <20240707163036.478b7488@jic23-huawei> (raw)
In-Reply-To: <CADFWO8EBP7zFH9zBpHNaF0tfK5OAzOdc=OuVJ6c768FE97x9xg@mail.gmail.com>

On Thu, 4 Jul 2024 10:35:45 +0200
Petar Stoykov <pd.pstoykov@gmail.com> wrote:

> On Tue, Jul 2, 2024 at 10:18 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > On Tue, 02 Jul 2024 16:59:08 +0200
> > Petar Stoykov via B4 Relay <devnull+pd.pstoykov.gmail.com@kernel.org> wrote:
> >  
> > > From: Petar Stoykov <pd.pstoykov@gmail.com>
> > >
> > > Sensirion SDP500 is a digital differential pressure sensor. It provides
> > > a digital I2C output. Add devicetree bindings requiring the compatible
> > > string and I2C slave address (reg).
> > >
> > > Signed-off-by: Petar Stoykov <pd.pstoykov@gmail.com>
> > > ---
> > >  .../bindings/iio/pressure/sensirion,sdp500.yaml    | 41 ++++++++++++++++++++++
> > >  1 file changed, 41 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml b/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml
> > > new file mode 100644
> > > index 000000000000..6b3e54def367
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml
> > > @@ -0,0 +1,41 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/iio/pressure/sdp500.yaml#  
> >
> > Naming mismatch (as already reporteD).  
> 
> Same mistake as in the MAINTAINERS file. Sigh.
> 
> >  
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: sdp500/sdp510 pressure sensor with I2C bus interface
> > > +
> > > +maintainers:
> > > +  - Petar Stoykov <petar.stoykov@prodrive-technologies.com>
> > > +
> > > +description: |
> > > +  Pressure sensor from Sensirion with I2C bus interface.
> > > +  There is no software difference between sdp500 and sdp510.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - sensirion,sdp500
> > > +      - sensirion,sdp510  
> >
> > Include the vdd-supply both as a property and in requried.
> >
> >   vdd-supply: true;
> >
> > is enough for the property.  
> 
> Thank you for the example!
> But I don't think it's a required property.
> Our system is an example where it's not needed.
> The device is always powered on and Linux has no control over it's supply.
> One can argue that it's nice to write down what is that power supply but
> to me it's just noise, because I can write anything there and it would still
> work. So I prefer to not add anything instead of putting a value I can't trust.
> 
I understand your nervousness, but put it in the binding doc anyway (not necessarily
in your dts though!)

There is a difference between what the binding requires (to work on
any operating system etc) and what the Linux driver stack requires.
The binding should specify any supply that is needed for the device to do anything
useful.

That doesn't mean that you need to provide it on a board if it's always
powered up.

The Linux driver should include regulator enabling for the supply. If it's not
provided in firmware because it's always one, then the dummy regulators that
will get used are fine.

devm_regulator_get_enable() is all that's needed




> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +required:
> > > +  - compatible
> > > +  - reg
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    i2c {
> > > +      #address-cells = <1>;
> > > +      #size-cells = <0>;
> > > +      pressure@40 {
> > > +        compatible = "sensirion,sdp500";
> > > +        reg = <0x40>;
> > > +        vdd-supply = <&foo>;
> > > +      };
> > > +    };
> > >  
> >  


  reply	other threads:[~2024-07-07 15:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 14:59 [PATCH v3 0/3] Add support for Sensirion SDP500 Petar Stoykov via B4 Relay
2024-07-02 14:59 ` [PATCH v3 1/3] dt-bindings: iio: pressure: Add " Petar Stoykov via B4 Relay
2024-07-02 15:15   ` Krzysztof Kozlowski
2024-07-04  8:18     ` Petar Stoykov
2024-07-04  9:47       ` Krzysztof Kozlowski
2024-07-02 16:30   ` Rob Herring (Arm)
2024-07-04  8:38     ` Petar Stoykov
2024-07-02 20:18   ` Jonathan Cameron
2024-07-04  8:35     ` Petar Stoykov
2024-07-07 15:30       ` Jonathan Cameron [this message]
2024-07-02 14:59 ` [PATCH v3 2/3] iio: pressure: Add driver for " Petar Stoykov via B4 Relay
2024-07-02 15:17   ` Krzysztof Kozlowski
2024-07-04  7:49     ` Petar Stoykov
2024-07-04  9:49       ` Krzysztof Kozlowski
2024-07-02 20:16   ` Jonathan Cameron
2024-07-04  8:09     ` Petar Stoykov
2024-07-07 15:34       ` Jonathan Cameron
2024-08-09 15:28   ` Andy Shevchenko
2024-07-02 14:59 ` [PATCH v3 3/3] MAINTAINERS: Add " Petar Stoykov via B4 Relay
2024-07-02 15:15   ` Krzysztof Kozlowski
2024-07-04  7:39     ` Petar Stoykov
2024-07-02 17:55   ` kernel test robot

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=20240707163036.478b7488@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=devnull+pd.pstoykov.gmail.com@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pd.pstoykov@gmail.com \
    --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