Message ID | CADFWO8GC6RP6A7H-Cq5UZHfBY3VJZTCqssdZet61hH031euhwQ@mail.gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | Add support for Sensirion SDP500 | expand |
On Tue, Apr 30, 2024 at 05:27:20PM +0200, Petar Stoykov wrote: > From 60f5cc7f65b07124f19428a713c3bc33b9e4a7a7 Mon Sep 17 00:00:00 2001 > From: Petar Stoykov <pd.pstoykov@gmail.com> > Date: Mon, 15 Jan 2024 14:29:25 +0100 > Subject: [PATCH 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500 You should really fix the email flow on your side.
On Tue, Apr 30, 2024 at 05:27:20PM +0200, Petar Stoykov wrote: > From 60f5cc7f65b07124f19428a713c3bc33b9e4a7a7 Mon Sep 17 00:00:00 2001 > From: Petar Stoykov <pd.pstoykov@gmail.com> > Date: Mon, 15 Jan 2024 14:29:25 +0100 > Subject: [PATCH 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500 > > 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> > --- > .../iio/pressure/sensirion,sdp500.yaml | 39 +++++++++++++++++++ > 1 file changed, 39 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml > > 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..3cdf17df7d52 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml > @@ -0,0 +1,39 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/pressure/sdp500.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: sdp500/sdp510 pressure sensor with I2C bus interface > + > +maintainers: > + - Petar Stoykov <pd.pstoykov@gmail.com> > + > +description: | > + Pressure sensor from Sensirion with I2C bus interface. > + There is no software difference between sdp500 and sdp510. I see no mention of the sdp510 elsewhere in this patch though.. If you're trying to add support for both, then add a compatible for the sdp510 that falls back to the sdp500. > + > +properties: > + compatible: > + const: sensirion,sdp500 > + > + reg: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + > +additionalProperties: false Other than the fact that a fallback compatible might be required here, this looks like a candidate for trivial-devices.yaml. Cheers, Conor. > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + pressure@40 { > + compatible = "sensirion,sdp500"; > + reg = <0x40>; > + vdd-supply = <&foo>; > + }; > + }; > -- > 2.30.2
On Tue, Apr 30, 2024 at 6:50 PM Conor Dooley <conor@kernel.org> wrote: > > On Tue, Apr 30, 2024 at 05:27:20PM +0200, Petar Stoykov wrote: > > From 60f5cc7f65b07124f19428a713c3bc33b9e4a7a7 Mon Sep 17 00:00:00 2001 > > From: Petar Stoykov <pd.pstoykov@gmail.com> > > Date: Mon, 15 Jan 2024 14:29:25 +0100 > > Subject: [PATCH 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500 > > > > 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> > > --- > > .../iio/pressure/sensirion,sdp500.yaml | 39 +++++++++++++++++++ > > 1 file changed, 39 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml > > > > 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..3cdf17df7d52 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml > > @@ -0,0 +1,39 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/iio/pressure/sdp500.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: sdp500/sdp510 pressure sensor with I2C bus interface > > + > > +maintainers: > > + - Petar Stoykov <pd.pstoykov@gmail.com> > > + > > +description: | > > + Pressure sensor from Sensirion with I2C bus interface. > > + There is no software difference between sdp500 and sdp510. > > I see no mention of the sdp510 elsewhere in this patch though.. > If you're trying to add support for both, then add a compatible for the > sdp510 that falls back to the sdp500. > Fair point. Our focus is on the SDP500. SDP510 is the same software-wise so I just mention it but I agree that I should add it as compatible in the code. > > + > > +properties: > > + compatible: > > + const: sensirion,sdp500 > > + > > + reg: > > + maxItems: 1 > > + > > +required: > > + - compatible > > + - reg > > + > > +additionalProperties: false > > Other than the fact that a fallback compatible might be required here, > this looks like a candidate for trivial-devices.yaml. This sounds like a more serious comment. We will definitely continue using this driver internally for now. But do you think it's still worth adding it as a separate driver instead of leaving it for "trivial-devices"? It has been a useful driver for us so we thought it is worth sharing. > > Cheers, > Conor. > > > + > > +examples: > > + - | > > + i2c { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + pressure@40 { > > + compatible = "sensirion,sdp500"; > > + reg = <0x40>; > > + vdd-supply = <&foo>; > > + }; > > + }; > > -- > > 2.30.2
On Wed, May 01, 2024 at 02:06:12PM +0200, Petar Stoykov wrote: > On Tue, Apr 30, 2024 at 6:50 PM Conor Dooley <conor@kernel.org> wrote: > > On Tue, Apr 30, 2024 at 05:27:20PM +0200, Petar Stoykov wrote: > > Other than the fact that a fallback compatible might be required here, > > this looks like a candidate for trivial-devices.yaml. > > This sounds like a more serious comment. We will definitely continue using > this driver internally for now. But do you think it's still worth adding > it as a separate driver instead of leaving it for "trivial-devices"? > It has been a useful driver for us so we thought it is worth sharing. trivial-devices.yaml is about the binding, not the driver - you still get to have a dedicated driver.
On Tue, 30 Apr 2024 17:27:20 +0200 Petar Stoykov <pd.pstoykov@gmail.com> wrote: > From 60f5cc7f65b07124f19428a713c3bc33b9e4a7a7 Mon Sep 17 00:00:00 2001 > From: Petar Stoykov <pd.pstoykov@gmail.com> > Date: Mon, 15 Jan 2024 14:29:25 +0100 > Subject: [PATCH 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500 > > 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> > --- > .../iio/pressure/sensirion,sdp500.yaml | 39 +++++++++++++++++++ > 1 file changed, 39 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml > > 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..3cdf17df7d52 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml > @@ -0,0 +1,39 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/pressure/sdp500.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: sdp500/sdp510 pressure sensor with I2C bus interface > + > +maintainers: > + - Petar Stoykov <pd.pstoykov@gmail.com> > + > +description: | > + Pressure sensor from Sensirion with I2C bus interface. > + There is no software difference between sdp500 and sdp510. > + > +properties: > + compatible: > + const: sensirion,sdp500 > + > + 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>; This isn't in the binding that I can see. It should be! > + }; > + };
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..3cdf17df7d52 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml @@ -0,0 +1,39 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/pressure/sdp500.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: sdp500/sdp510 pressure sensor with I2C bus interface + +maintainers: + - Petar Stoykov <pd.pstoykov@gmail.com> + +description: | + Pressure sensor from Sensirion with I2C bus interface. + There is no software difference between sdp500 and sdp510. + +properties: + compatible: + const: sensirion,sdp500 + + 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>; + }; + };