diff mbox series

[v3,3/3] dt-bindings: iio: imu: st_lsm6dsx: add asm330lhhxg1

Message ID 93160585e69e4531a981064817ccbb143a6a1f70.1706692153.git.lorenzo@kernel.org (mailing list archive)
State Superseded
Headers show
Series add support for ASM330LHHXG1 | expand

Commit Message

Lorenzo Bianconi Jan. 31, 2024, 9:11 a.m. UTC
Add device bindings for asm330lhhxg1 IMU sensor.
The asm330lhhx supports a subset of the features and functionality
provided by the lsm6dsr via identical interfaces and so is a
suitable fallback compatible.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 3 +++
 1 file changed, 3 insertions(+)

Comments

Rob Herring (Arm) Feb. 2, 2024, 7:43 p.m. UTC | #1
On Wed, Jan 31, 2024 at 10:11:31AM +0100, Lorenzo Bianconi wrote:
> Add device bindings for asm330lhhxg1 IMU sensor.
> The asm330lhhx supports a subset of the features and functionality
> provided by the lsm6dsr via identical interfaces and so is a
> suitable fallback compatible.

A subset cannot fallback to a superset.

> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
> index 28b667a9cb76..316601b2da7a 100644
> --- a/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
> +++ b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
> @@ -49,6 +49,9 @@ properties:
>        - items:
>            - const: st,asm330lhb
>            - const: st,asm330lhh
> +      - items:
> +          - const: st,asm330lhhxg1
> +          - const: st,lsm6dsr

Assuming this is correct and the commit msg is wrong, can't this be 
added to the existing entry?:

items:
  - enum:
      - st,asm330lhhx
      - st,asm330lhhxg1
  - const: st,lsm6dsr


>  
>    reg:
>      maxItems: 1
> -- 
> 2.43.0
>
Lorenzo Bianconi Feb. 3, 2024, 11:59 a.m. UTC | #2
> On Wed, Jan 31, 2024 at 10:11:31AM +0100, Lorenzo Bianconi wrote:
> > Add device bindings for asm330lhhxg1 IMU sensor.
> > The asm330lhhx supports a subset of the features and functionality
> > provided by the lsm6dsr via identical interfaces and so is a
> > suitable fallback compatible.
> 
> A subset cannot fallback to a superset.
> 
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >  Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
> > index 28b667a9cb76..316601b2da7a 100644
> > --- a/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
> > +++ b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
> > @@ -49,6 +49,9 @@ properties:
> >        - items:
> >            - const: st,asm330lhb
> >            - const: st,asm330lhh
> > +      - items:
> > +          - const: st,asm330lhhxg1
> > +          - const: st,lsm6dsr
> 
> Assuming this is correct and the commit msg is wrong, can't this be 
> added to the existing entry?:
> 
> items:
>   - enum:
>       - st,asm330lhhx
>       - st,asm330lhhxg1
>   - const: st,lsm6dsr

ack, I will fix it in v4.

Regards,
Lorenzo

> 
> 
> >  
> >    reg:
> >      maxItems: 1
> > -- 
> > 2.43.0
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
index 28b667a9cb76..316601b2da7a 100644
--- a/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
+++ b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
@@ -49,6 +49,9 @@  properties:
       - items:
           - const: st,asm330lhb
           - const: st,asm330lhh
+      - items:
+          - const: st,asm330lhhxg1
+          - const: st,lsm6dsr
 
   reg:
     maxItems: 1