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

Vasileios Amoiridis posted 7 patches 1 year, 5 months ago
There is a newer version of this series
[PATCH v3 5/7] dt-bindings: iio: pressure: bmp085: Add interrupts for BMP3xx and BMP5xx devices
Posted by Vasileios Amoiridis 1 year, 5 months ago
Add interrupt options for BMP3xx and BMP5xx devices as well.

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

diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
index 6fda887ee9d4..eb1e1ab3dd18 100644
--- a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
+++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
@@ -48,9 +48,14 @@ 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
-- 
2.25.1
Re: [PATCH v3 5/7] dt-bindings: iio: pressure: bmp085: Add interrupts for BMP3xx and BMP5xx devices
Posted by Krzysztof Kozlowski 1 year, 5 months ago
On Fri, Aug 23, 2024 at 08:17:12PM +0200, Vasileios Amoiridis wrote:
> Add interrupt options for BMP3xx and BMP5xx devices as well.
> 
> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
> ---
>  Documentation/devicetree/bindings/iio/pressure/bmp085.yaml | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> index 6fda887ee9d4..eb1e1ab3dd18 100644
> --- a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> +++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> @@ -48,9 +48,14 @@ properties:
>  
>    interrupts:
>      description:
> -      interrupt mapping for IRQ (BMP085 only)
> +      interrupt mapping for IRQ. Supported in BMP085, BMP3xx, BMP5xx

Supported by driver or device?
If the latter, this should be constrained per device variant in
allOf:if:then:.


>      maxItems: 1
>  
> +  drive-open-drain:

Missing type, unless some other core schema defined it? But then I
actually wonder if we need it.  Maybe this should be interrupt flag?
Just like GPIO has such.

Best regards,
Krzysztof
Re: [PATCH v3 5/7] dt-bindings: iio: pressure: bmp085: Add interrupts for BMP3xx and BMP5xx devices
Posted by Vasileios Amoiridis 1 year, 5 months ago
On Sat, Aug 24, 2024 at 09:45:43AM +0200, Krzysztof Kozlowski wrote:
> On Fri, Aug 23, 2024 at 08:17:12PM +0200, Vasileios Amoiridis wrote:
> > Add interrupt options for BMP3xx and BMP5xx devices as well.
> > 
> > Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
> > ---
> >  Documentation/devicetree/bindings/iio/pressure/bmp085.yaml | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> > index 6fda887ee9d4..eb1e1ab3dd18 100644
> > --- a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> > +++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> > @@ -48,9 +48,14 @@ properties:
> >  
> >    interrupts:
> >      description:
> > -      interrupt mapping for IRQ (BMP085 only)
> > +      interrupt mapping for IRQ. Supported in BMP085, BMP3xx, BMP5xx
> 
> Supported by driver or device?
> If the latter, this should be constrained per device variant in
> allOf:if:then:.
> 

Hi Krzysztof,

Supported by some devices controlled by the same (just 1) driver.
Thanks for the hint, I will take a look how other drivers do it :)

> 
> >      maxItems: 1
> >  
> > +  drive-open-drain:
> 
> Missing type, unless some other core schema defined it? But then I
> actually wonder if we need it.  Maybe this should be interrupt flag?
> Just like GPIO has such.

I took it from the bindings/iio/imu/bosch,bmi323.yaml example which is
the same. You think something needs to change?

Cheers,
Vasilis

> 
> Best regards,
> Krzysztof
>
Re: [PATCH v3 5/7] dt-bindings: iio: pressure: bmp085: Add interrupts for BMP3xx and BMP5xx devices
Posted by Krzysztof Kozlowski 1 year, 5 months ago
On 24/08/2024 13:35, Vasileios Amoiridis wrote:
> On Sat, Aug 24, 2024 at 09:45:43AM +0200, Krzysztof Kozlowski wrote:
>> On Fri, Aug 23, 2024 at 08:17:12PM +0200, Vasileios Amoiridis wrote:
>>> Add interrupt options for BMP3xx and BMP5xx devices as well.
>>>
>>> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
>>> ---
>>>  Documentation/devicetree/bindings/iio/pressure/bmp085.yaml | 7 ++++++-
>>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
>>> index 6fda887ee9d4..eb1e1ab3dd18 100644
>>> --- a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
>>> +++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
>>> @@ -48,9 +48,14 @@ properties:
>>>  
>>>    interrupts:
>>>      description:
>>> -      interrupt mapping for IRQ (BMP085 only)
>>> +      interrupt mapping for IRQ. Supported in BMP085, BMP3xx, BMP5xx
>>
>> Supported by driver or device?
>> If the latter, this should be constrained per device variant in
>> allOf:if:then:.
>>
> 
> Hi Krzysztof,
> 
> Supported by some devices controlled by the same (just 1) driver.
> Thanks for the hint, I will take a look how other drivers do it :)
> 
>>
>>>      maxItems: 1
>>>  
>>> +  drive-open-drain:
>>
>> Missing type, unless some other core schema defined it? But then I
>> actually wonder if we need it.  Maybe this should be interrupt flag?
>> Just like GPIO has such.
> 
> I took it from the bindings/iio/imu/bosch,bmi323.yaml example which is
> the same. You think something needs to change?
> 

You need type: boolean.

Best regards,
Krzysztof