2023-04-01 09:12:35

by Andreas Klinger

[permalink] [raw]
Subject: [PATCH 1/3] dt-bindings: iio: pressure: Support Honeywell mpr sensors

Honeywell mpr is a pressure sensor family. There are many different
types with different pressure ranges. The range needs to be set up in
the dt. Therefore new properties honeywell,pmin and honeywell,pmax are
introduced.

Add dt-bindings.

Signed-off-by: Andreas Klinger <[email protected]>
---
.../bindings/iio/pressure/honeywell,mpr.yaml | 74 +++++++++++++++++++
1 file changed, 74 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml

diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
new file mode 100644
index 000000000000..d6fad6f841cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/pressure/honeywell,mpr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Honeywell mpr pressure sensor
+
+maintainers:
+ - Andreas Klinger <[email protected]>
+
+description: |
+ Honeywell pressure sensor of type mpr. This sensor has an I2C and SPI interface. Only the I2C
+ interface is implemented.
+
+ There are many subtypes with different pressure ranges available. Therefore the minimum and
+ maximum pressure values of the specific sensor needs to be specified in Pascal.
+
+ Specifications about the devices can be found at:
+ https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/ \
+ pressure-sensors/board-mount-pressure-sensors/micropressure-mpr-series/documents/ \
+ sps-siot-mpr-series-datasheet-32332628-ciid-172626.pdf
+
+properties:
+ compatible:
+ const: honeywell,mpr
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ reset-gpios:
+ description:
+ Optional GPIO for resetting the device. If not present the device is not resetted.
+ maxItems: 1
+
+ honeywell,pmin:
+ description:
+ Minimum pressure value the sensor can measure in pascal.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ honeywell,pmax:
+ description:
+ Maximum pressure value the sensor can measure in pascal.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+ - compatible
+ - reg
+ - honeywell,pmin
+ - honeywell,pmax
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pressure@18 {
+ compatible = "honeywell,mpr";
+ reg = <0x18>;
+ reset-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
+ honeywell,pmin = <0>;
+ honeywell,pmax = <172369>;
+ };
+ };
--
2.30.2


2023-04-01 09:48:09

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: iio: pressure: Support Honeywell mpr sensors

On 01/04/2023 11:09, Andreas Klinger wrote:
> Honeywell mpr is a pressure sensor family. There are many different
> types with different pressure ranges. The range needs to be set up in
> the dt. Therefore new properties honeywell,pmin and honeywell,pmax are
> introduced.
>
> Add dt-bindings.
>
> Signed-off-by: Andreas Klinger <[email protected]>
> ---
> .../bindings/iio/pressure/honeywell,mpr.yaml | 74 +++++++++++++++++++
> 1 file changed, 74 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
>
> diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
> new file mode 100644
> index 000000000000..d6fad6f841cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
> @@ -0,0 +1,74 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/pressure/honeywell,mpr.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Honeywell mpr pressure sensor
> +
> +maintainers:
> + - Andreas Klinger <[email protected]>
> +
> +description: |
> + Honeywell pressure sensor of type mpr. This sensor has an I2C and SPI interface. Only the I2C

Doesn't look wrapped according to Linux coding style (see Coding style).

> + interface is implemented.
> +
> + There are many subtypes with different pressure ranges available. Therefore the minimum and
> + maximum pressure values of the specific sensor needs to be specified in Pascal.
> +
> + Specifications about the devices can be found at:
> + https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/ \
> + pressure-sensors/board-mount-pressure-sensors/micropressure-mpr-series/documents/ \
> + sps-siot-mpr-series-datasheet-32332628-ciid-172626.pdf

Lines are not continued, so drop \

> +
> +properties:
> + compatible:
> + const: honeywell,mpr

You need device specific compatible, not some generic one. Rename also
then the filename (should match the compatible).

> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + reset-gpios:
> + description:
> + Optional GPIO for resetting the device. If not present the device is not resetted.

Are you sure it is wrapped properly?

> + maxItems: 1
> +
> + honeywell,pmin:
> + description:
> + Minimum pressure value the sensor can measure in pascal.

Use standard unit suffix:
https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml

> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + honeywell,pmax:
> + description:
> + Maximum pressure value the sensor can measure in pascal.
> + $ref: /schemas/types.yaml#/definitions/uint32

Same.

Why these values are suitable for DT? Does it depend on type of sensor
(thus it is implied from compatible) or on system setup?

> +
> +required:
> + - compatible
> + - reg
> + - honeywell,pmin
> + - honeywell,pmax
> +


Best regards,
Krzysztof

2023-04-01 15:09:20

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: iio: pressure: Support Honeywell mpr sensors

On Sat, 1 Apr 2023 11:09:41 +0200
Andreas Klinger <[email protected]> wrote:

> Honeywell mpr is a pressure sensor family. There are many different
> types with different pressure ranges. The range needs to be set up in
> the dt. Therefore new properties honeywell,pmin and honeywell,pmax are
> introduced.
>
> Add dt-bindings.
>
> Signed-off-by: Andreas Klinger <[email protected]>
> ---
> .../bindings/iio/pressure/honeywell,mpr.yaml | 74 +++++++++++++++++++
> 1 file changed, 74 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
>
> diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
> new file mode 100644
> index 000000000000..d6fad6f841cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
> @@ -0,0 +1,74 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/pressure/honeywell,mpr.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Honeywell mpr pressure sensor
> +
> +maintainers:
> + - Andreas Klinger <[email protected]>
> +
> +description: |
> + Honeywell pressure sensor of type mpr. This sensor has an I2C and SPI interface. Only the I2C
> + interface is implemented.
> +
> + There are many subtypes with different pressure ranges available. Therefore the minimum and
> + maximum pressure values of the specific sensor needs to be specified in Pascal.
> +
> + Specifications about the devices can be found at:
> + https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/ \
> + pressure-sensors/board-mount-pressure-sensors/micropressure-mpr-series/documents/ \
> + sps-siot-mpr-series-datasheet-32332628-ciid-172626.pdf

Ouch. Anyone want to suggest to honeywell that they add some short paths for this stuff!

Please add regulator for VDD. May well be a fixed reg on the boards you care about, but
it's still good document it's existence.

> +
> +properties:
> + compatible:
> + const: honeywell,mpr
> +

2023-04-01 15:14:28

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: iio: pressure: Support Honeywell mpr sensors

On Sat, 1 Apr 2023 11:42:15 +0200
Krzysztof Kozlowski <[email protected]> wrote:

> On 01/04/2023 11:09, Andreas Klinger wrote:
> > Honeywell mpr is a pressure sensor family. There are many different
> > types with different pressure ranges. The range needs to be set up in
> > the dt. Therefore new properties honeywell,pmin and honeywell,pmax are
> > introduced.
> >
> > Add dt-bindings.
> >
> > Signed-off-by: Andreas Klinger <[email protected]>
> > ---
> > .../bindings/iio/pressure/honeywell,mpr.yaml | 74 +++++++++++++++++++
> > 1 file changed, 74 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
> > new file mode 100644
> > index 000000000000..d6fad6f841cf
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
> > @@ -0,0 +1,74 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/pressure/honeywell,mpr.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Honeywell mpr pressure sensor
> > +
> > +maintainers:
> > + - Andreas Klinger <[email protected]>
> > +
> > +description: |
> > + Honeywell pressure sensor of type mpr. This sensor has an I2C and SPI interface. Only the I2C
>
> Doesn't look wrapped according to Linux coding style (see Coding style).
>
> > + interface is implemented.
> > +
> > + There are many subtypes with different pressure ranges available. Therefore the minimum and
> > + maximum pressure values of the specific sensor needs to be specified in Pascal.
> > +
> > + Specifications about the devices can be found at:
> > + https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/ \
> > + pressure-sensors/board-mount-pressure-sensors/micropressure-mpr-series/documents/ \
> > + sps-siot-mpr-series-datasheet-32332628-ciid-172626.pdf
>
> Lines are not continued, so drop \
>
> > +
> > +properties:
> > + compatible:
> > + const: honeywell,mpr
>
> You need device specific compatible, not some generic one. Rename also
> then the filename (should match the compatible).
>
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + reset-gpios:
> > + description:
> > + Optional GPIO for resetting the device. If not present the device is not resetted.
>
> Are you sure it is wrapped properly?
>
> > + maxItems: 1
> > +
> > + honeywell,pmin:
> > + description:
> > + Minimum pressure value the sensor can measure in pascal.
>
> Use standard unit suffix:
> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
>
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > +
> > + honeywell,pmax:
> > + description:
> > + Maximum pressure value the sensor can measure in pascal.
> > + $ref: /schemas/types.yaml#/definitions/uint32
>
> Same.
>
> Why these values are suitable for DT? Does it depend on type of sensor
> (thus it is implied from compatible) or on system setup?

I think we'll end up with a lot of compatibles, but that's still better
than free form description. May still need these as well though given
the datasheet helpfully adds a foot note.

1. Custom pressure ranges are available.

Might not be worth including all the details though but unhelpfully the
bits we care about are after details like is the gel food grade or the port long.
Definitely can ignore the encoding of i2c address / spi in the last few bits but
may need the transfer function.


mpr-0025GA-A maybe as a form?

>
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - honeywell,pmin
> > + - honeywell,pmax
> > +
>
>
> Best regards,
> Krzysztof
>

2023-04-06 20:17:35

by Andreas Klinger

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: iio: pressure: Support Honeywell mpr sensors

Hi,

thanks to Krzysztof, Lars-Peter and Jonathan for the review and suggestions. I
have one thing to clarify. See below.

Jonathan Cameron <[email protected]> schrieb am Sa, 01. Apr 16:27:
> On Sat, 1 Apr 2023 11:42:15 +0200
> Krzysztof Kozlowski <[email protected]> wrote:
>
> > On 01/04/2023 11:09, Andreas Klinger wrote:
[...]
> > > + honeywell,pmin:
> > > + description:
> > > + Minimum pressure value the sensor can measure in pascal.
> >
> > Use standard unit suffix:
> > https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
> >
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > +
> > > + honeywell,pmax:
> > > + description:
> > > + Maximum pressure value the sensor can measure in pascal.
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> >
> > Same.
> >
> > Why these values are suitable for DT? Does it depend on type of sensor
> > (thus it is implied from compatible) or on system setup?
>
> I think we'll end up with a lot of compatibles, but that's still better
> than free form description. May still need these as well though given
> the datasheet helpfully adds a foot note.
>
> 1. Custom pressure ranges are available.
>
> Might not be worth including all the details though but unhelpfully the
> bits we care about are after details like is the gel food grade or the port long.
> Definitely can ignore the encoding of i2c address / spi in the last few bits but
> may need the transfer function.
>
>
> mpr-0025GA-A maybe as a form?

Just to clarify: There are 32 different pressure ranges and 3 transfer functions
which means we'll end up with 96 compatibles and 96 I2C ids.

Would it be an option to have only one dt compatible and to add the pressure
range as dt property?
e. g.: honeywell,range = "0025PA";

But because of "Custom pressure ranges" we still need the DT properties. In this
case there's another "mpr-custom" compatible, right?

Andreas

2023-04-07 07:00:31

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: iio: pressure: Support Honeywell mpr sensors

On 06/04/2023 22:15, Andreas Klinger wrote:
> Hi,
>
> thanks to Krzysztof, Lars-Peter and Jonathan for the review and suggestions. I
> have one thing to clarify. See below.
>
> Jonathan Cameron <[email protected]> schrieb am Sa, 01. Apr 16:27:
>> On Sat, 1 Apr 2023 11:42:15 +0200
>> Krzysztof Kozlowski <[email protected]> wrote:
>>
>>> On 01/04/2023 11:09, Andreas Klinger wrote:
> [...]
>>>> + honeywell,pmin:
>>>> + description:
>>>> + Minimum pressure value the sensor can measure in pascal.
>>>
>>> Use standard unit suffix:
>>> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
>>>
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +
>>>> + honeywell,pmax:
>>>> + description:
>>>> + Maximum pressure value the sensor can measure in pascal.
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>
>>> Same.
>>>
>>> Why these values are suitable for DT? Does it depend on type of sensor
>>> (thus it is implied from compatible) or on system setup?
>>
>> I think we'll end up with a lot of compatibles, but that's still better
>> than free form description. May still need these as well though given
>> the datasheet helpfully adds a foot note.
>>
>> 1. Custom pressure ranges are available.
>>
>> Might not be worth including all the details though but unhelpfully the
>> bits we care about are after details like is the gel food grade or the port long.
>> Definitely can ignore the encoding of i2c address / spi in the last few bits but
>> may need the transfer function.
>>
>>
>> mpr-0025GA-A maybe as a form?
>
> Just to clarify: There are 32 different pressure ranges and 3 transfer functions
> which means we'll end up with 96 compatibles and 96 I2C ids.

You anyway need compatibles per devices, don't you?
https://elixir.bootlin.com/linux/v6.1-rc1/source/Documentation/devicetree/bindings/writing-bindings.rst#L42

I already commented on this.

>
> Would it be an option to have only one dt compatible and to add the pressure
> range as dt property?
> e. g.: honeywell,range = "0025PA";

Did you just decided to ignore my comment?

>
> But because of "Custom pressure ranges" we still need the DT properties. In this
> case there's another "mpr-custom" compatible, right?

Please go to my email and respond to comments.

Best regards,
Krzysztof

2023-04-14 07:29:14

by Andreas Klinger

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: iio: pressure: Support Honeywell mpr sensors

Hi Krzysztof,

Krzysztof Kozlowski <[email protected]> schrieb am Sa, 01. Apr 11:42:
> On 01/04/2023 11:09, Andreas Klinger wrote:
> > Honeywell mpr is a pressure sensor family. There are many different
> > types with different pressure ranges. The range needs to be set up in
> > the dt. Therefore new properties honeywell,pmin and honeywell,pmax are
> > introduced.
> >
> > Add dt-bindings.
> >
> > Signed-off-by: Andreas Klinger <[email protected]>
> > ---
> > .../bindings/iio/pressure/honeywell,mpr.yaml | 74 +++++++++++++++++++
> > 1 file changed, 74 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
> > new file mode 100644
> > index 000000000000..d6fad6f841cf
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
> > @@ -0,0 +1,74 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/pressure/honeywell,mpr.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Honeywell mpr pressure sensor
> > +
> > +maintainers:
> > + - Andreas Klinger <[email protected]>
> > +
> > +description: |
> > + Honeywell pressure sensor of type mpr. This sensor has an I2C and SPI interface. Only the I2C
>
> Doesn't look wrapped according to Linux coding style (see Coding style).
>
> > + interface is implemented.
> > +
> > + There are many subtypes with different pressure ranges available. Therefore the minimum and
> > + maximum pressure values of the specific sensor needs to be specified in Pascal.
> > +
> > + Specifications about the devices can be found at:
> > + https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/ \
> > + pressure-sensors/board-mount-pressure-sensors/micropressure-mpr-series/documents/ \
> > + sps-siot-mpr-series-datasheet-32332628-ciid-172626.pdf
>
> Lines are not continued, so drop \
>
> > +
> > +properties:
> > + compatible:
> > + const: honeywell,mpr
>
> You need device specific compatible, not some generic one. Rename also
> then the filename (should match the compatible).
>
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + reset-gpios:
> > + description:
> > + Optional GPIO for resetting the device. If not present the device is not resetted.
>
> Are you sure it is wrapped properly?
>
> > + maxItems: 1
> > +
> > + honeywell,pmin:
> > + description:
> > + Minimum pressure value the sensor can measure in pascal.
>
> Use standard unit suffix:
> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml

There are only kilopascal as standard unit suffix. But with kilopascal as
integer the accuracy of the driver is very rough. Therefore I would like to use
pascal. E. g.:

honeywell,pmin-pascal

> > + $ref: /schemas/types.yaml#/definitions/uint32
> > +
> > + honeywell,pmax:
> > + description:
> > + Maximum pressure value the sensor can measure in pascal.
> > + $ref: /schemas/types.yaml#/definitions/uint32
>
> Same.
>
> Why these values are suitable for DT?

Technically from the software perspective the sensors are identical with the
only difference of having different pressure ranges, measurement units and
transfer functions.

If we omit the pressure values and transfer function we'll need 96 compatibles
and also 96 I2C ids.

But there are also custom sensor types. For covering them we'll need another
compatible and just for this case the pressure values and transfer function.

> Does it depend on type of sensor (thus it is implied from compatible) or on
> system setup?

For the standard types it can be derived from the type of sensor but for the
custom types it's not possible.

So sum up it'll look like this:

standard types:
96 compatibles, e. g. "honeywell,mpr-0025pa-a"

custom types:
1 compatible: "honeywell,mpr-custom"
honeywell,pmin-pascal
honeywell,pmax-pascal
honeywell,transfer-function


Best regards,

Andreas

2023-04-14 07:56:48

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: iio: pressure: Support Honeywell mpr sensors

On 14/04/2023 09:27, Andreas Klinger wrote:
> Hi Krzysztof,
>
> Krzysztof Kozlowski <[email protected]> schrieb am Sa, 01. Apr 11:42:
>> On 01/04/2023 11:09, Andreas Klinger wrote:
>>> Honeywell mpr is a pressure sensor family. There are many different
>>> types with different pressure ranges. The range needs to be set up in
>>> the dt. Therefore new properties honeywell,pmin and honeywell,pmax are
>>> introduced.
>>>
>>> Add dt-bindings.
>>>
>>> Signed-off-by: Andreas Klinger <[email protected]>
>>> ---
>>> .../bindings/iio/pressure/honeywell,mpr.yaml | 74 +++++++++++++++++++
>>> 1 file changed, 74 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
>>>
>>> diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
>>> new file mode 100644
>>> index 000000000000..d6fad6f841cf
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,mpr.yaml
>>> @@ -0,0 +1,74 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/iio/pressure/honeywell,mpr.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Honeywell mpr pressure sensor
>>> +
>>> +maintainers:
>>> + - Andreas Klinger <[email protected]>
>>> +
>>> +description: |
>>> + Honeywell pressure sensor of type mpr. This sensor has an I2C and SPI interface. Only the I2C
>>
>> Doesn't look wrapped according to Linux coding style (see Coding style).
>>
>>> + interface is implemented.
>>> +
>>> + There are many subtypes with different pressure ranges available. Therefore the minimum and
>>> + maximum pressure values of the specific sensor needs to be specified in Pascal.
>>> +
>>> + Specifications about the devices can be found at:
>>> + https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/ \
>>> + pressure-sensors/board-mount-pressure-sensors/micropressure-mpr-series/documents/ \
>>> + sps-siot-mpr-series-datasheet-32332628-ciid-172626.pdf
>>
>> Lines are not continued, so drop \
>>
>>> +
>>> +properties:
>>> + compatible:
>>> + const: honeywell,mpr
>>
>> You need device specific compatible, not some generic one. Rename also
>> then the filename (should match the compatible).
>>
>>> +
>>> + reg:
>>> + maxItems: 1
>>> +
>>> + interrupts:
>>> + maxItems: 1
>>> +
>>> + reset-gpios:
>>> + description:
>>> + Optional GPIO for resetting the device. If not present the device is not resetted.
>>
>> Are you sure it is wrapped properly?
>>
>>> + maxItems: 1
>>> +
>>> + honeywell,pmin:
>>> + description:
>>> + Minimum pressure value the sensor can measure in pascal.
>>
>> Use standard unit suffix:
>> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
>
> There are only kilopascal as standard unit suffix. But with kilopascal as
> integer the accuracy of the driver is very rough. Therefore I would like to use
> pascal. E. g.:
>
> honeywell,pmin-pascal
>
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>> +
>>> + honeywell,pmax:
>>> + description:
>>> + Maximum pressure value the sensor can measure in pascal.
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>
>> Same.
>>
>> Why these values are suitable for DT?
>
> Technically from the software perspective the sensors are identical with the
> only difference of having different pressure ranges, measurement units and
> transfer functions.
>
> If we omit the pressure values and transfer function we'll need 96 compatibles
> and also 96 I2C ids.

Compatibles are expected to be specific. You used something generic, so
not correct, although I understand the reason behind.

If we go with generic compatible, do you guarantee that all Honeywell
mpr sensors - now and in 50 years - will be 100% compatible with this
set here?

Your description calls it "type mpr", not "model mpr", so I assume you
can have entirely different sensors coming soon which will not be
compatible.

>
> But there are also custom sensor types. For covering them we'll need another
> compatible and just for this case the pressure values and transfer function.

OK, but isn't this the case in all devices? I could accept family of
identical devices with identical programming model where difference in
supported measurement range is described via this property.

Unfortunately you did not model it that way. Instead it represents all
possible devices even with incompatible programming model.

Best regards,
Krzysztof