diff mbox series

[v4,5/7] dt-bindings: iio: pressure: bmp085: Add interrupts for BMP3xx and BMP5xx devices

Message ID 20240828205128.92145-6-vassilisamir@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series pressure: bmp280: Minor cleanup and interrupt support | expand

Commit Message

Vasileios Amoiridis Aug. 28, 2024, 8:51 p.m. UTC
Add interrupt options for BMP3xx and BMP5xx devices as well.

Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
---
 .../bindings/iio/pressure/bmp085.yaml         | 22 ++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Aug. 29, 2024, 6:06 a.m. UTC | #1
On Wed, Aug 28, 2024 at 10:51:25PM +0200, Vasileios Amoiridis wrote:
> Add interrupt options for BMP3xx and BMP5xx devices as well.
> 
> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
> ---
>  .../bindings/iio/pressure/bmp085.yaml         | 22 ++++++++++++++++++-
>  1 file changed, 21 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> index 6fda887ee9d4..edf5901c6c87 100644
> --- a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> +++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> @@ -48,14 +48,34 @@ properties:
>  
>    interrupts:
>      description:
> -      interrupt mapping for IRQ (BMP085 only)
> +      interrupt mapping for IRQ. Supported in BMP085, BMP3xx, BMP5xx
>      maxItems: 1
>  
> +  drive-open-drain:
> +    description:
> +      set if the interrupt pin should be configured as open drain.
> +      If not set, defaults to push-pull configuration.

I don't think you implemented my comment.

> +
>  required:
>    - compatible
>    - vddd-supply
>    - vdda-supply
>  
> +allOf:
> +  - if:

not:

> +      properties:
> +        compatible:
> +          enum:
> +            - bosch,bmp085
> +            - bosch,bmp380
> +            - bosch,bmp580
> +    then:
> +      properties:
> +        interrupts: true
> +    else:

so no need for else:.


Best regards,
Krzysztof
Vasileios Amoiridis Aug. 29, 2024, 7:15 p.m. UTC | #2
On Thu, Aug 29, 2024 at 08:06:07AM +0200, Krzysztof Kozlowski wrote:
> On Wed, Aug 28, 2024 at 10:51:25PM +0200, Vasileios Amoiridis wrote:
> > Add interrupt options for BMP3xx and BMP5xx devices as well.
> > 
> > Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
> > ---
> >  .../bindings/iio/pressure/bmp085.yaml         | 22 ++++++++++++++++++-
> >  1 file changed, 21 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> > index 6fda887ee9d4..edf5901c6c87 100644
> > --- a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> > +++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> > @@ -48,14 +48,34 @@ properties:
> >  
> >    interrupts:
> >      description:
> > -      interrupt mapping for IRQ (BMP085 only)
> > +      interrupt mapping for IRQ. Supported in BMP085, BMP3xx, BMP5xx
> >      maxItems: 1
> >  
> > +  drive-open-drain:
> > +    description:
> > +      set if the interrupt pin should be configured as open drain.
> > +      If not set, defaults to push-pull configuration.
> 
> I don't think you implemented my comment.
> 

Hi Krzysztof,

Thanks for you reply!

Indeed, I totally forgot this change, I will do it in next
version. If you see the cover letter I didn't even mention it
there so I totally forgot it...

> > +
> >  required:
> >    - compatible
> >    - vddd-supply
> >    - vdda-supply
> >  
> > +allOf:
> > +  - if:
> 
> not:

ACK.

> 
> > +      properties:
> > +        compatible:
> > +          enum:
> > +            - bosch,bmp085
> > +            - bosch,bmp380
> > +            - bosch,bmp580
> > +    then:
> > +      properties:
> > +        interrupts: true
> > +    else:
> 
> so no need for else:.
> 

By default this property is considered false?

Cheers,
Vasilis

> 
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
index 6fda887ee9d4..edf5901c6c87 100644
--- a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
+++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
@@ -48,14 +48,34 @@  properties:
 
   interrupts:
     description:
-      interrupt mapping for IRQ (BMP085 only)
+      interrupt mapping for IRQ. Supported in BMP085, BMP3xx, BMP5xx
     maxItems: 1
 
+  drive-open-drain:
+    description:
+      set if the interrupt pin should be configured as open drain.
+      If not set, defaults to push-pull configuration.
+
 required:
   - compatible
   - vddd-supply
   - vdda-supply
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - bosch,bmp085
+            - bosch,bmp380
+            - bosch,bmp580
+    then:
+      properties:
+        interrupts: true
+    else:
+      properties:
+        interrupts: false
+
 additionalProperties: false
 
 examples: