devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
@ 2024-01-16 15:24 Petar Stoykov
  2024-01-16 15:31 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Petar Stoykov @ 2024-01-16 15:24 UTC (permalink / raw)
  To: linux-iio
  Cc: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Andy Shevchenko, Angel Iglesias, Krzysztof Kozlowski,
	Conor Dooley, linux-kernel, devicetree

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/sdp500.yaml         | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/pressure/sdp500.yaml

diff --git a/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
b/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
new file mode 100644
index 000000000000..af01ec7e3802
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
@@ -0,0 +1,38 @@
+# 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:
+  - |
+    i2c3 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      sdp500@40 {
+        compatible = "sensirion,sdp500";
+        reg = <0x40>;
+      };
+    };
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-01-16 15:24 [PATCH 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500 Petar Stoykov
@ 2024-01-16 15:31 ` Krzysztof Kozlowski
  2024-01-16 16:37   ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-16 15:31 UTC (permalink / raw)
  To: Petar Stoykov, linux-iio
  Cc: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Andy Shevchenko, Angel Iglesias, Krzysztof Kozlowski,
	Conor Dooley, linux-kernel, devicetree

On 16/01/2024 16:24, Petar Stoykov wrote:
> 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/sdp500.yaml         | 38 +++++++++++++++++++
>  1 file changed, 38 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/pressure/sdp500.yaml

Filename like compatible.

> 
> diff --git a/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
> b/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
> new file mode 100644
> index 000000000000..af01ec7e3802
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
> @@ -0,0 +1,38 @@
> +# 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: |

Do not need '|' unless you need to preserve formatting.

> +  Pressure sensor from Sensirion with I2C bus interface.
> +  There is no software difference between sdp500 and sdp510.
> +
> +properties:
> +  compatible:
> +    const: sensirion,sdp500
> +

No resources? No interrupts? No power supply or any pins? No even
iio-cells? This looks incomplete.

> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c3 {

i2c {

> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +      sdp500@40 {

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation



Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-01-16 15:31 ` Krzysztof Kozlowski
@ 2024-01-16 16:37   ` Jonathan Cameron
  2024-01-21 16:17     ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2024-01-16 16:37 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Petar Stoykov, linux-iio, Jonathan Cameron, Lars-Peter Clausen,
	Rob Herring, Andy Shevchenko, Angel Iglesias, Krzysztof Kozlowski,
	Conor Dooley, linux-kernel, devicetree

On Tue, 16 Jan 2024 16:31:55 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 16/01/2024 16:24, Petar Stoykov wrote:
> > 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/sdp500.yaml         | 38 +++++++++++++++++++
> >  1 file changed, 38 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/pressure/sdp500.yaml  
> 
> Filename like compatible.
> 
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
> > b/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
> > new file mode 100644
> > index 000000000000..af01ec7e3802
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
> > @@ -0,0 +1,38 @@
> > +# 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: |  
> 
> Do not need '|' unless you need to preserve formatting.
> 
> > +  Pressure sensor from Sensirion with I2C bus interface.
> > +  There is no software difference between sdp500 and sdp510.
> > +
> > +properties:
> > +  compatible:
> > +    const: sensirion,sdp500
> > +  
> 
> No resources? No interrupts? No power supply or any pins? No even
> iio-cells? This looks incomplete.

For a pressure sensors, io-channel-cells (which I guess you me you
mean) would be a new thing. We've never yet had a consumer of this
data type...  Not necessarily a bad thing to have as one can
conceive of one, but none of the current pressure sensor bindings
have that.

vdd-supply though definitely wants to be in here and required
given device is unlikely to work without power!

Jonathan


> 
> > +  reg:
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    i2c3 {  
> 
> i2c {
> 
> > +      #address-cells = <1>;
> > +      #size-cells = <0>;
> > +      sdp500@40 {  
> 
> Node names should be generic. See also an explanation and list of
> examples (not exhaustive) in DT specification:
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> 
> 
> 
> Best regards,
> Krzysztof
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-01-16 16:37   ` Jonathan Cameron
@ 2024-01-21 16:17     ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2024-01-21 16:17 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Krzysztof Kozlowski, Petar Stoykov, linux-iio, Lars-Peter Clausen,
	Rob Herring, Andy Shevchenko, Angel Iglesias, Krzysztof Kozlowski,
	Conor Dooley, linux-kernel, devicetree

On Tue, 16 Jan 2024 16:37:13 +0000
Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:

> On Tue, 16 Jan 2024 16:31:55 +0100
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> 
> > On 16/01/2024 16:24, Petar Stoykov wrote:  
> > > 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/sdp500.yaml         | 38 +++++++++++++++++++
> > >  1 file changed, 38 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/iio/pressure/sdp500.yaml    
> > 
> > Filename like compatible.
> >   
> > > 
> > > diff --git a/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
> > > b/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
> > > new file mode 100644
> > > index 000000000000..af01ec7e3802
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/pressure/sdp500.yaml
> > > @@ -0,0 +1,38 @@
> > > +# 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: |    
> > 
> > Do not need '|' unless you need to preserve formatting.
> >   
> > > +  Pressure sensor from Sensirion with I2C bus interface.
> > > +  There is no software difference between sdp500 and sdp510.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    const: sensirion,sdp500
> > > +    
> > 
> > No resources? No interrupts? No power supply or any pins? No even
> > iio-cells? This looks incomplete.  
> 
> For a pressure sensors, io-channel-cells (which I guess you me you
Gah. Gibberish.

which I guess you mean...

thanks,

J
> mean) would be a new thing. We've never yet had a consumer of this
> data type...  Not necessarily a bad thing to have as one can
> conceive of one, but none of the current pressure sensor bindings
> have that.
> 
> vdd-supply though definitely wants to be in here and required
> given device is unlikely to work without power!
> 
> Jonathan
> 
> 
> >   
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +required:
> > > +  - compatible
> > > +  - reg
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    i2c3 {    
> > 
> > i2c {
> >   
> > > +      #address-cells = <1>;
> > > +      #size-cells = <0>;
> > > +      sdp500@40 {    
> > 
> > Node names should be generic. See also an explanation and list of
> > examples (not exhaustive) in DT specification:
> > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> > 
> > 
> > 
> > Best regards,
> > Krzysztof
> > 
> >   
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-21 16:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16 15:24 [PATCH 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500 Petar Stoykov
2024-01-16 15:31 ` Krzysztof Kozlowski
2024-01-16 16:37   ` Jonathan Cameron
2024-01-21 16:17     ` Jonathan Cameron

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).