[PATCH v7 RESEND 3/7] dt-bindings: iio: Add Infineon DPS310 sensor documentation

Eddie James posted 7 patches 4 months, 1 week ago
[PATCH v7 RESEND 3/7] dt-bindings: iio: Add Infineon DPS310 sensor documentation
Posted by Eddie James 4 months, 1 week ago
The DPS310 is a barometric pressure and temperature sensor with
an I2C interface. Remove it from trivial-devices.yaml and add its
own documentation.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../iio/pressure/infineon,dps310.yaml         | 44 +++++++++++++++++++
 .../devicetree/bindings/trivial-devices.yaml  |  2 -
 MAINTAINERS                                   |  1 +
 3 files changed, 45 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml

diff --git a/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml b/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
new file mode 100644
index 0000000000000..7c0782e2a821b
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/pressure/infineon,dps310.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Infineon DPS310 barometric pressure and temperature sensor
+
+maintainers:
+  - Eddie James <eajames@linux.ibm.com>
+
+description:
+  The DPS310 is a barometric pressure and temperature sensor with an I2C
+  interface.
+
+properties:
+  compatible:
+    enum:
+      - infineon,dps310
+
+  reg:
+    maxItems: 1
+
+  "#io-channel-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pressure-sensor@76 {
+          compatible = "infineon,dps310";
+          reg = <0x76>;
+          #io-channel-cells = <0>;
+        };
+    };
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index 7609acaa752d5..a72b7fabc7034 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -127,8 +127,6 @@ properties:
           - ibm,cffps2
             # IBM On-Chip Controller hwmon device
           - ibm,p8-occ-hwmon
-            # Infineon barometric pressure and temperature sensor
-          - infineon,dps310
             # Infineon IR36021 digital POL buck controller
           - infineon,ir36021
             # Infineon IRPS5401 Voltage Regulator (PMIC)
diff --git a/MAINTAINERS b/MAINTAINERS
index 0c8281ea4cc64..92b9854a0e07d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12191,6 +12191,7 @@ INFINEON DPS310 Driver
 M:	Eddie James <eajames@linux.ibm.com>
 L:	linux-iio@vger.kernel.org
 S:	Maintained
+F:	Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
 F:	drivers/iio/pressure/dps310.c
 
 INFINEON PEB2466 ASoC CODEC
-- 
2.51.0
Re: [PATCH v7 RESEND 3/7] dt-bindings: iio: Add Infineon DPS310 sensor documentation
Posted by Jonathan Cameron 4 months ago
On Wed,  1 Oct 2025 09:44:37 -0500
Eddie James <eajames@linux.ibm.com> wrote:

> The DPS310 is a barometric pressure and temperature sensor with
> an I2C interface. Remove it from trivial-devices.yaml and add its
> own documentation.

Hi Eddie,

Why?  I guess you need the #io-channel-cells which trivial devices
doesn't allow because you have a consumer driver?

Obviously the binding patch shouldn't mention that, but it could call
out that there can be such consumers.

I'd also expect to see some supplies even if the driver doesn't yet
explicitly handle them.

Jonathan

> 
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  .../iio/pressure/infineon,dps310.yaml         | 44 +++++++++++++++++++
>  .../devicetree/bindings/trivial-devices.yaml  |  2 -
>  MAINTAINERS                                   |  1 +
>  3 files changed, 45 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml b/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
> new file mode 100644
> index 0000000000000..7c0782e2a821b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
> @@ -0,0 +1,44 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/pressure/infineon,dps310.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Infineon DPS310 barometric pressure and temperature sensor
> +
> +maintainers:
> +  - Eddie James <eajames@linux.ibm.com>
> +
> +description:
> +  The DPS310 is a barometric pressure and temperature sensor with an I2C
> +  interface.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - infineon,dps310
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#io-channel-cells":
> +    const: 0
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        pressure-sensor@76 {
> +          compatible = "infineon,dps310";
> +          reg = <0x76>;
> +          #io-channel-cells = <0>;
> +        };
> +    };
> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
> index 7609acaa752d5..a72b7fabc7034 100644
> --- a/Documentation/devicetree/bindings/trivial-devices.yaml
> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml
> @@ -127,8 +127,6 @@ properties:
>            - ibm,cffps2
>              # IBM On-Chip Controller hwmon device
>            - ibm,p8-occ-hwmon
> -            # Infineon barometric pressure and temperature sensor
> -          - infineon,dps310
>              # Infineon IR36021 digital POL buck controller
>            - infineon,ir36021
>              # Infineon IRPS5401 Voltage Regulator (PMIC)
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 0c8281ea4cc64..92b9854a0e07d 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -12191,6 +12191,7 @@ INFINEON DPS310 Driver
>  M:	Eddie James <eajames@linux.ibm.com>
>  L:	linux-iio@vger.kernel.org
>  S:	Maintained
> +F:	Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
>  F:	drivers/iio/pressure/dps310.c
>  
>  INFINEON PEB2466 ASoC CODEC
Re: [PATCH v7 RESEND 3/7] dt-bindings: iio: Add Infineon DPS310 sensor documentation
Posted by Eddie James 4 months ago
On 10/3/25 9:01 AM, Jonathan Cameron wrote:
> On Wed,  1 Oct 2025 09:44:37 -0500
> Eddie James <eajames@linux.ibm.com> wrote:
>
>> The DPS310 is a barometric pressure and temperature sensor with
>> an I2C interface. Remove it from trivial-devices.yaml and add its
>> own documentation.
> Hi Eddie,
>
> Why?  I guess you need the #io-channel-cells which trivial devices
> doesn't allow because you have a consumer driver?


Correct.


>
> Obviously the binding patch shouldn't mention that, but it could call
> out that there can be such consumers.


OK, I can add that.


>
> I'd also expect to see some supplies even if the driver doesn't yet
> explicitly handle them.


You mean in the example section? Sure. I'll send a patch separately 
since the rest is merged


Thanks,

Eddie


>
> Jonathan
>
>> Signed-off-by: Eddie James <eajames@linux.ibm.com>
>> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
>> ---
>>   .../iio/pressure/infineon,dps310.yaml         | 44 +++++++++++++++++++
>>   .../devicetree/bindings/trivial-devices.yaml  |  2 -
>>   MAINTAINERS                                   |  1 +
>>   3 files changed, 45 insertions(+), 2 deletions(-)
>>   create mode 100644 Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml b/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
>> new file mode 100644
>> index 0000000000000..7c0782e2a821b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
>> @@ -0,0 +1,44 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/iio/pressure/infineon,dps310.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Infineon DPS310 barometric pressure and temperature sensor
>> +
>> +maintainers:
>> +  - Eddie James <eajames@linux.ibm.com>
>> +
>> +description:
>> +  The DPS310 is a barometric pressure and temperature sensor with an I2C
>> +  interface.
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - infineon,dps310
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  "#io-channel-cells":
>> +    const: 0
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    i2c {
>> +        #address-cells = <1>;
>> +        #size-cells = <0>;
>> +
>> +        pressure-sensor@76 {
>> +          compatible = "infineon,dps310";
>> +          reg = <0x76>;
>> +          #io-channel-cells = <0>;
>> +        };
>> +    };
>> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
>> index 7609acaa752d5..a72b7fabc7034 100644
>> --- a/Documentation/devicetree/bindings/trivial-devices.yaml
>> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml
>> @@ -127,8 +127,6 @@ properties:
>>             - ibm,cffps2
>>               # IBM On-Chip Controller hwmon device
>>             - ibm,p8-occ-hwmon
>> -            # Infineon barometric pressure and temperature sensor
>> -          - infineon,dps310
>>               # Infineon IR36021 digital POL buck controller
>>             - infineon,ir36021
>>               # Infineon IRPS5401 Voltage Regulator (PMIC)
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 0c8281ea4cc64..92b9854a0e07d 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -12191,6 +12191,7 @@ INFINEON DPS310 Driver
>>   M:	Eddie James <eajames@linux.ibm.com>
>>   L:	linux-iio@vger.kernel.org
>>   S:	Maintained
>> +F:	Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
>>   F:	drivers/iio/pressure/dps310.c
>>   
>>   INFINEON PEB2466 ASoC CODEC
>
Re: [PATCH v7 RESEND 3/7] dt-bindings: iio: Add Infineon DPS310 sensor documentation
Posted by Jonathan Cameron 4 months ago
On Mon, 6 Oct 2025 08:44:55 -0500
Eddie James <eajames@linux.ibm.com> wrote:

> On 10/3/25 9:01 AM, Jonathan Cameron wrote:
> > On Wed,  1 Oct 2025 09:44:37 -0500
> > Eddie James <eajames@linux.ibm.com> wrote:
> >  
> >> The DPS310 is a barometric pressure and temperature sensor with
> >> an I2C interface. Remove it from trivial-devices.yaml and add its
> >> own documentation.  
> > Hi Eddie,
> >
> > Why?  I guess you need the #io-channel-cells which trivial devices
> > doesn't allow because you have a consumer driver?  
> 
> 
> Correct.
> 
> 
> >
> > Obviously the binding patch shouldn't mention that, but it could call
> > out that there can be such consumers.  
> 
> 
> OK, I can add that.
> 
> 
> >
> > I'd also expect to see some supplies even if the driver doesn't yet
> > explicitly handle them.  
> 
> 
> You mean in the example section? Sure. I'll send a patch separately 
> since the rest is merged

Supplies need listing as actual properties (+ in the example)
From a binding point of view they are 'required' if the power needs
to be turned on for the chip to work.  On actual DT files they might
not be there if a fixed supply is in use and someone didn't other providing
it. In those cases the regulator code provides a fake regulator to make
everything work.

> 
> 
> Thanks,
> 
> Eddie
> 
> 
> >
> > Jonathan
> >  
> >> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> >> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> >> ---
> >>   .../iio/pressure/infineon,dps310.yaml         | 44 +++++++++++++++++++
> >>   .../devicetree/bindings/trivial-devices.yaml  |  2 -
> >>   MAINTAINERS                                   |  1 +
> >>   3 files changed, 45 insertions(+), 2 deletions(-)
> >>   create mode 100644 Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
> >>
> >> diff --git a/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml b/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
> >> new file mode 100644
> >> index 0000000000000..7c0782e2a821b
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
> >> @@ -0,0 +1,44 @@
> >> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/iio/pressure/infineon,dps310.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: Infineon DPS310 barometric pressure and temperature sensor
> >> +
> >> +maintainers:
> >> +  - Eddie James <eajames@linux.ibm.com>
> >> +
> >> +description:
> >> +  The DPS310 is a barometric pressure and temperature sensor with an I2C
> >> +  interface.
> >> +
> >> +properties:
> >> +  compatible:
> >> +    enum:
> >> +      - infineon,dps310
> >> +
> >> +  reg:
> >> +    maxItems: 1
> >> +
> >> +  "#io-channel-cells":
> >> +    const: 0
> >> +
> >> +required:
> >> +  - compatible
> >> +  - reg
> >> +
> >> +additionalProperties: false
> >> +
> >> +examples:
> >> +  - |
> >> +    i2c {
> >> +        #address-cells = <1>;
> >> +        #size-cells = <0>;
> >> +
> >> +        pressure-sensor@76 {
> >> +          compatible = "infineon,dps310";
> >> +          reg = <0x76>;
> >> +          #io-channel-cells = <0>;
> >> +        };
> >> +    };
> >> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
> >> index 7609acaa752d5..a72b7fabc7034 100644
> >> --- a/Documentation/devicetree/bindings/trivial-devices.yaml
> >> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml
> >> @@ -127,8 +127,6 @@ properties:
> >>             - ibm,cffps2
> >>               # IBM On-Chip Controller hwmon device
> >>             - ibm,p8-occ-hwmon
> >> -            # Infineon barometric pressure and temperature sensor
> >> -          - infineon,dps310
> >>               # Infineon IR36021 digital POL buck controller
> >>             - infineon,ir36021
> >>               # Infineon IRPS5401 Voltage Regulator (PMIC)
> >> diff --git a/MAINTAINERS b/MAINTAINERS
> >> index 0c8281ea4cc64..92b9854a0e07d 100644
> >> --- a/MAINTAINERS
> >> +++ b/MAINTAINERS
> >> @@ -12191,6 +12191,7 @@ INFINEON DPS310 Driver
> >>   M:	Eddie James <eajames@linux.ibm.com>
> >>   L:	linux-iio@vger.kernel.org
> >>   S:	Maintained
> >> +F:	Documentation/devicetree/bindings/iio/pressure/infineon,dps310.yaml
> >>   F:	drivers/iio/pressure/dps310.c
> >>   
> >>   INFINEON PEB2466 ASoC CODEC  
> >