All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-07-02 14:59 [PATCH v3 0/3] Add support for " Petar Stoykov
@ 2024-07-02 14:59   ` Petar Stoykov via B4 Relay
  0 siblings, 0 replies; 11+ messages in thread
From: Petar Stoykov @ 2024-07-02 14:59 UTC (permalink / raw)
  To: linux-iio, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andy Shevchenko
  Cc: Petar Stoykov, devicetree, linux-kernel

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#
+$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
+
+  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>;
+      };
+    };

-- 
2.39.2


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

* [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
@ 2024-07-02 14:59   ` Petar Stoykov via B4 Relay
  0 siblings, 0 replies; 11+ messages in thread
From: Petar Stoykov via B4 Relay @ 2024-07-02 14:59 UTC (permalink / raw)
  To: linux-iio, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andy Shevchenko
  Cc: Petar Stoykov, devicetree, linux-kernel

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#
+$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
+
+  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>;
+      };
+    };

-- 
2.39.2



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

* Re: [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-07-02 14:59   ` Petar Stoykov via B4 Relay
  (?)
@ 2024-07-02 15:15   ` Krzysztof Kozlowski
  2024-07-04  8:18     ` Petar Stoykov
  -1 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-02 15:15 UTC (permalink / raw)
  To: pd.pstoykov, linux-iio, Jonathan Cameron, Lars-Peter Clausen,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andy Shevchenko
  Cc: devicetree, linux-kernel

On 02/07/2024 16:59, Petar Stoykov via B4 Relay 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).
> 

You did not test your code before sending.

Please respond to existing feedback from v1 and v2, thus confirm that
you understood it and you are or are not going to implement it.

It does not look like you tested the bindings, at least after quick
look. Please run `make dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).
Maybe you need to update your dtschema and yamllint.

Best regards,
Krzysztof


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

* Re: [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-07-02 14:59   ` Petar Stoykov via B4 Relay
  (?)
  (?)
@ 2024-07-02 16:30   ` Rob Herring (Arm)
  2024-07-04  8:38     ` Petar Stoykov
  -1 siblings, 1 reply; 11+ messages in thread
From: Rob Herring (Arm) @ 2024-07-02 16:30 UTC (permalink / raw)
  To: Petar Stoykov
  Cc: Lars-Peter Clausen, Conor Dooley, Andy Shevchenko, linux-iio,
	Rob Herring, devicetree, Jonathan Cameron, linux-kernel,
	Krzysztof Kozlowski


On Tue, 02 Jul 2024 16:59:08 +0200, 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/sensirion,sdp500.yaml    | 41 ++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename
 	 $id: http://devicetree.org/schemas/iio/pressure/sdp500.yaml
 	file: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.example.dtb: pressure@40: 'vdd-supply' does not match any of the regexes: 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/iio/pressure/sdp500.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240702-mainline_sdp500-v3-1-0902047b3eee@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

* Re: [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-07-02 14:59   ` Petar Stoykov via B4 Relay
                     ` (2 preceding siblings ...)
  (?)
@ 2024-07-02 20:18   ` Jonathan Cameron
  2024-07-04  8:35     ` Petar Stoykov
  -1 siblings, 1 reply; 11+ messages in thread
From: Jonathan Cameron @ 2024-07-02 20:18 UTC (permalink / raw)
  To: Petar Stoykov via B4 Relay
  Cc: pd.pstoykov, linux-iio, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andy Shevchenko, devicetree,
	linux-kernel

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

> +$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.
> +
> +  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>;
> +      };
> +    };
> 


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

* Re: [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-07-02 15:15   ` Krzysztof Kozlowski
@ 2024-07-04  8:18     ` Petar Stoykov
  2024-07-04  9:47       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 11+ messages in thread
From: Petar Stoykov @ 2024-07-04  8:18 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-iio, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andy Shevchenko, devicetree,
	linux-kernel

On Tue, Jul 2, 2024 at 5:15 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 02/07/2024 16:59, Petar Stoykov via B4 Relay 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).
> >
>
> You did not test your code before sending.

I tested the driver for sdp500 on our system and it worked well.
I must admit that I forgot to change the dts to sdp510 and retest.

>
> Please respond to existing feedback from v1 and v2, thus confirm that
> you understood it and you are or are not going to implement it.
>

I tried to reply to all previous comments. Sorry if I missed something.

> It does not look like you tested the bindings, at least after quick
> look. Please run `make dt_binding_check` (see
> Documentation/devicetree/bindings/writing-schema.rst for instructions).
> Maybe you need to update your dtschema and yamllint.

I didn't know about that dt_binding_check. Then I spent a few hours
yesterday fighting with dependencies to get it running.
Thanks!

>
> Best regards,
> Krzysztof
>

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

* Re: [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-07-02 20:18   ` Jonathan Cameron
@ 2024-07-04  8:35     ` Petar Stoykov
  2024-07-07 15:30       ` Jonathan Cameron
  0 siblings, 1 reply; 11+ messages in thread
From: Petar Stoykov @ 2024-07-04  8:35 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Petar Stoykov via B4 Relay, linux-iio, Lars-Peter Clausen,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andy Shevchenko,
	devicetree, linux-kernel

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.

> > +
> > +  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>;
> > +      };
> > +    };
> >
>

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

* Re: [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-07-02 16:30   ` Rob Herring (Arm)
@ 2024-07-04  8:38     ` Petar Stoykov
  0 siblings, 0 replies; 11+ messages in thread
From: Petar Stoykov @ 2024-07-04  8:38 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Lars-Peter Clausen, Conor Dooley, Andy Shevchenko, linux-iio,
	Rob Herring, devicetree, Jonathan Cameron, linux-kernel,
	Krzysztof Kozlowski

On Tue, Jul 2, 2024 at 6:30 PM Rob Herring (Arm) <robh@kernel.org> wrote:
>
>
> On Tue, 02 Jul 2024 16:59:08 +0200, 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/sensirion,sdp500.yaml    | 41 ++++++++++++++++++++++
> >  1 file changed, 41 insertions(+)
> >
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename
>          $id: http://devicetree.org/schemas/iio/pressure/sdp500.yaml
>         file: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.example.dtb: pressure@40: 'vdd-supply' does not match any of the regexes: 'pinctrl-[0-9]+'
>         from schema $id: http://devicetree.org/schemas/iio/pressure/sdp500.yaml#
>
> doc reference errors (make refcheckdocs):
>
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240702-mainline_sdp500-v3-1-0902047b3eee@gmail.com
>
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
>
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
>
> pip3 install dtschema --upgrade

I did not know about this tool before. And I did need to update a bunch of
dependencies to make it work. Thanks!

>
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.
>

The setting of DT_SCHEMA_FILES was a huge help in saving time!!

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

* Re: [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-07-04  8:18     ` Petar Stoykov
@ 2024-07-04  9:47       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-04  9:47 UTC (permalink / raw)
  To: Petar Stoykov
  Cc: linux-iio, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andy Shevchenko, devicetree,
	linux-kernel

On 04/07/2024 10:18, Petar Stoykov wrote:
> On Tue, Jul 2, 2024 at 5:15 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 02/07/2024 16:59, Petar Stoykov via B4 Relay 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).
>>>
>>
>> You did not test your code before sending.
> 
> I tested the driver for sdp500 on our system and it worked well.
> I must admit that I forgot to change the dts to sdp510 and retest.
> 
>>
>> Please respond to existing feedback from v1 and v2, thus confirm that
>> you understood it and you are or are not going to implement it.
>>
> 
> I tried to reply to all previous comments. Sorry if I missed something.
> 
>> It does not look like you tested the bindings, at least after quick
>> look. Please run `make dt_binding_check` (see
>> Documentation/devicetree/bindings/writing-schema.rst for instructions).
>> Maybe you need to update your dtschema and yamllint.
> 
> I didn't know about that dt_binding_check. Then I spent a few hours
> yesterday fighting with dependencies to get it running.

It's just one command:
pipx install dtschema yamllint
(or pip, depending on your system)

Best regards,
Krzysztof


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

* Re: [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
@ 2024-07-06 16:43 kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2024-07-06 16:43 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "dtcheck: binding changes may go via different trees"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20240702-mainline_sdp500-v3-1-0902047b3eee@gmail.com>
References: <20240702-mainline_sdp500-v3-1-0902047b3eee@gmail.com>
TO: Petar Stoykov via B4 Relay <devnull+pd.pstoykov.gmail.com@kernel.org>
TO: linux-iio@vger.kernel.org
TO: Jonathan Cameron <jic23@kernel.org>
TO: "Lars-Peter Clausen" <lars@metafoo.de>
TO: Rob Herring <robh+dt@kernel.org>
TO: Krzysztof Kozlowski <krzk@kernel.org>
TO: Conor Dooley <conor+dt@kernel.org>
TO: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
CC: Petar Stoykov <pd.pstoykov@gmail.com>
CC: devicetree@vger.kernel.org
CC: linux-kernel@vger.kernel.org

Hi Petar,

kernel test robot noticed the following build warnings:

[auto build test WARNING on ab27740f76654ed58dd32ac0ba0031c18a6dea3b]

url:    https://github.com/intel-lab-lkp/linux/commits/Petar-Stoykov-via-B4-Relay/dt-bindings-iio-pressure-Add-Sensirion-SDP500/20240702-235054
base:   ab27740f76654ed58dd32ac0ba0031c18a6dea3b
patch link:    https://lore.kernel.org/r/20240702-mainline_sdp500-v3-1-0902047b3eee%40gmail.com
patch subject: [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: arc-randconfig-051-20240702 (https://download.01.org/0day-ci/archive/20240707/202407070030.GI9XWacQ-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 13.2.0
dtschema version: 2024.6.dev3+g650bf2d
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240707/202407070030.GI9XWacQ-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202407070030.GI9XWacQ-lkp@intel.com/

dtcheck warnings: (new ones prefixed by >>)
>> Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename
   $id: http://devicetree.org/schemas/iio/pressure/sdp500.yaml
   file: Documentation/devicetree/bindings/iio/pressure/sensirion,sdp500.yaml
   Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml: properties:honeywell,pmin-pascal: '$ref' should not be valid under {'const': '$ref'}
   hint: Standard unit suffix properties don't need a type $ref
   from schema $id: http://devicetree.org/meta-schemas/core.yaml#
   Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml: properties:honeywell,pmax-pascal: '$ref' should not be valid under {'const': '$ref'}
   hint: Standard unit suffix properties don't need a type $ref
   from schema $id: http://devicetree.org/meta-schemas/core.yaml#

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500
  2024-07-04  8:35     ` Petar Stoykov
@ 2024-07-07 15:30       ` Jonathan Cameron
  0 siblings, 0 replies; 11+ messages in thread
From: Jonathan Cameron @ 2024-07-07 15:30 UTC (permalink / raw)
  To: Petar Stoykov
  Cc: Petar Stoykov via B4 Relay, linux-iio, Lars-Peter Clausen,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andy Shevchenko,
	devicetree, linux-kernel

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>;
> > > +      };
> > > +    };
> > >  
> >  


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

end of thread, other threads:[~2024-07-07 15:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-06 16:43 [PATCH v3 1/3] dt-bindings: iio: pressure: Add Sensirion SDP500 kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2024-07-02 14:59 [PATCH v3 0/3] Add support for " Petar Stoykov
2024-07-02 14:59 ` [PATCH v3 1/3] dt-bindings: iio: pressure: Add " Petar Stoykov
2024-07-02 14:59   ` 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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.