diff mbox series

[V2,4/8] dt-bindings: iio: st-sensors: Add IIS328DQ accelerometer

Message ID 20230317103323.7741-5-stefan.wahren@chargebyte.com (mailing list archive)
State Superseded
Headers show
Series ARM: dts: imx6ull: Add chargebyte Tarragon support | expand

Commit Message

Stefan Wahren March 17, 2023, 10:33 a.m. UTC
The ST IIS328DQ is an accelerometer sensor, which is compatible with
the already supported ST H3LIS331DL. So add the new compatible
with a fallback to the ST sensor binding.

Link: https://lore.kernel.org/linux-iio/2bac9ecf-9d2e-967e-9020-1c950487d781@i2se.com/
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>
---
 Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jonathan Cameron March 18, 2023, 3:55 p.m. UTC | #1
On Fri, 17 Mar 2023 11:33:19 +0100
Stefan Wahren <stefan.wahren@chargebyte.com> wrote:

> The ST IIS328DQ is an accelerometer sensor, which is compatible with
> the already supported ST H3LIS331DL. So add the new compatible
> with a fallback to the ST sensor binding.
> 
> Link: https://lore.kernel.org/linux-iio/2bac9ecf-9d2e-967e-9020-1c950487d781@i2se.com/
> Suggested-by: Jonathan Cameron <jic23@kernel.org>
> Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>	
> ---
>  Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> index c6201976378f..5eb71b24a7cb 100644
> --- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> +++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> @@ -48,6 +48,9 @@ properties:
>            - st,lsm330d-accel
>            - st,lsm330dl-accel
>            - st,lsm330dlc-accel
> +      - items:
> +          - const: st,iis328dq
> +          - const: st,h3lis331dl-accel

Hmm. So this separates the particular 'oneOf' group from the description
associated with the ST accelerometers.

DT experts, is there a better way to do this?  Ideally we'd also associate
other similar groups going forwards so it might become less and less obvious
how the groupings work. (bit late for the many groups that exist
already in that list above this point).

If not I'm fine with it being fairly obvious what is going on in the binding file
current and we can rethink it later.

>        - description: Silan Accelerometers
>          enum:
>            - silan,sc7a20
Krzysztof Kozlowski March 19, 2023, 12:40 p.m. UTC | #2
On 18/03/2023 16:55, Jonathan Cameron wrote:
> On Fri, 17 Mar 2023 11:33:19 +0100
> Stefan Wahren <stefan.wahren@chargebyte.com> wrote:
> 
>> The ST IIS328DQ is an accelerometer sensor, which is compatible with
>> the already supported ST H3LIS331DL. So add the new compatible
>> with a fallback to the ST sensor binding.
>>
>> Link: https://lore.kernel.org/linux-iio/2bac9ecf-9d2e-967e-9020-1c950487d781@i2se.com/
>> Suggested-by: Jonathan Cameron <jic23@kernel.org>
>> Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>	
>> ---
>>  Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
>> index c6201976378f..5eb71b24a7cb 100644
>> --- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
>> +++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
>> @@ -48,6 +48,9 @@ properties:
>>            - st,lsm330d-accel
>>            - st,lsm330dl-accel
>>            - st,lsm330dlc-accel
>> +      - items:
>> +          - const: st,iis328dq
>> +          - const: st,h3lis331dl-accel
> 
> Hmm. So this separates the particular 'oneOf' group from the description
> associated with the ST accelerometers.
> 
> DT experts, is there a better way to do this?  Ideally we'd also associate
> other similar groups going forwards so it might become less and less obvious
> how the groupings work. (bit late for the many groups that exist
> already in that list above this point).

If by "grouping" you mean how the oneOf items are organized with
descriptions, I wouldn't put too much attention to it. You can add some
'#' comments to separate the groups, but for me this is still readable.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Jonathan Cameron March 19, 2023, 3:42 p.m. UTC | #3
On Sun, 19 Mar 2023 13:40:49 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 18/03/2023 16:55, Jonathan Cameron wrote:
> > On Fri, 17 Mar 2023 11:33:19 +0100
> > Stefan Wahren <stefan.wahren@chargebyte.com> wrote:
> >   
> >> The ST IIS328DQ is an accelerometer sensor, which is compatible with
> >> the already supported ST H3LIS331DL. So add the new compatible
> >> with a fallback to the ST sensor binding.
> >>
> >> Link: https://lore.kernel.org/linux-iio/2bac9ecf-9d2e-967e-9020-1c950487d781@i2se.com/
> >> Suggested-by: Jonathan Cameron <jic23@kernel.org>
> >> Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>	
> >> ---
> >>  Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> >> index c6201976378f..5eb71b24a7cb 100644
> >> --- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> >> +++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> >> @@ -48,6 +48,9 @@ properties:
> >>            - st,lsm330d-accel
> >>            - st,lsm330dl-accel
> >>            - st,lsm330dlc-accel
> >> +      - items:
> >> +          - const: st,iis328dq
> >> +          - const: st,h3lis331dl-accel  
> > 
> > Hmm. So this separates the particular 'oneOf' group from the description
> > associated with the ST accelerometers.
> > 
> > DT experts, is there a better way to do this?  Ideally we'd also associate
> > other similar groups going forwards so it might become less and less obvious
> > how the groupings work. (bit late for the many groups that exist
> > already in that list above this point).  
> 
> If by "grouping" you mean how the oneOf items are organized with
> descriptions, I wouldn't put too much attention to it. You can add some
> '#' comments to separate the groups, but for me this is still readable.
> 
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Works for me. Thanks for quick response!  Applied this and next patch
to the togreg branch of iio.git


Thanks,

Jonathan

> 
> Best regards,
> Krzysztof
>
Stefan Wahren March 27, 2023, 10:57 a.m. UTC | #4
Hi Jonathan,

Am 19.03.23 um 16:42 schrieb Jonathan Cameron:
> On Sun, 19 Mar 2023 13:40:49 +0100
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> 
>> On 18/03/2023 16:55, Jonathan Cameron wrote:
>>> On Fri, 17 Mar 2023 11:33:19 +0100
>>> Stefan Wahren <stefan.wahren@chargebyte.com> wrote:
>>>    
>>>> The ST IIS328DQ is an accelerometer sensor, which is compatible with
>>>> the already supported ST H3LIS331DL. So add the new compatible
>>>> with a fallback to the ST sensor binding.
>>>>
>>>> Link: https://lore.kernel.org/linux-iio/2bac9ecf-9d2e-967e-9020-1c950487d781@i2se.com/
>>>> Suggested-by: Jonathan Cameron <jic23@kernel.org>
>>>> Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>	
>>>> ---
>>>>   Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 3 +++
>>>>   1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
>>>> index c6201976378f..5eb71b24a7cb 100644
>>>> --- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
>>>> +++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
>>>> @@ -48,6 +48,9 @@ properties:
>>>>             - st,lsm330d-accel
>>>>             - st,lsm330dl-accel
>>>>             - st,lsm330dlc-accel
>>>> +      - items:
>>>> +          - const: st,iis328dq
>>>> +          - const: st,h3lis331dl-accel
>>>
>>> Hmm. So this separates the particular 'oneOf' group from the description
>>> associated with the ST accelerometers.
>>>
>>> DT experts, is there a better way to do this?  Ideally we'd also associate
>>> other similar groups going forwards so it might become less and less obvious
>>> how the groupings work. (bit late for the many groups that exist
>>> already in that list above this point).
>>
>> If by "grouping" you mean how the oneOf items are organized with
>> descriptions, I wouldn't put too much attention to it. You can add some
>> '#' comments to separate the groups, but for me this is still readable.
>>
>> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Works for me. Thanks for quick response!  Applied this and next patch
> to the togreg branch of iio.git

Shawn had some comments to patch #7. Just to make it clear, there is no 
need to resend patch 4 and 5 in V3?

Best regards

> 
> 
> Thanks,
> 
> Jonathan
> 
>>
>> Best regards,
>> Krzysztof
>>
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Jonathan Cameron April 1, 2023, 3:38 p.m. UTC | #5
On Mon, 27 Mar 2023 12:57:10 +0200
Stefan Wahren <stefan.wahren@i2se.com> wrote:

> Hi Jonathan,
> 
> Am 19.03.23 um 16:42 schrieb Jonathan Cameron:
> > On Sun, 19 Mar 2023 13:40:49 +0100
> > Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> >   
> >> On 18/03/2023 16:55, Jonathan Cameron wrote:  
> >>> On Fri, 17 Mar 2023 11:33:19 +0100
> >>> Stefan Wahren <stefan.wahren@chargebyte.com> wrote:
> >>>      
> >>>> The ST IIS328DQ is an accelerometer sensor, which is compatible with
> >>>> the already supported ST H3LIS331DL. So add the new compatible
> >>>> with a fallback to the ST sensor binding.
> >>>>
> >>>> Link: https://lore.kernel.org/linux-iio/2bac9ecf-9d2e-967e-9020-1c950487d781@i2se.com/
> >>>> Suggested-by: Jonathan Cameron <jic23@kernel.org>
> >>>> Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>	
> >>>> ---
> >>>>   Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 3 +++
> >>>>   1 file changed, 3 insertions(+)
> >>>>
> >>>> diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> >>>> index c6201976378f..5eb71b24a7cb 100644
> >>>> --- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> >>>> +++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> >>>> @@ -48,6 +48,9 @@ properties:
> >>>>             - st,lsm330d-accel
> >>>>             - st,lsm330dl-accel
> >>>>             - st,lsm330dlc-accel
> >>>> +      - items:
> >>>> +          - const: st,iis328dq
> >>>> +          - const: st,h3lis331dl-accel  
> >>>
> >>> Hmm. So this separates the particular 'oneOf' group from the description
> >>> associated with the ST accelerometers.
> >>>
> >>> DT experts, is there a better way to do this?  Ideally we'd also associate
> >>> other similar groups going forwards so it might become less and less obvious
> >>> how the groupings work. (bit late for the many groups that exist
> >>> already in that list above this point).  
> >>
> >> If by "grouping" you mean how the oneOf items are organized with
> >> descriptions, I wouldn't put too much attention to it. You can add some
> >> '#' comments to separate the groups, but for me this is still readable.
> >>
> >> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>  
> > 
> > Works for me. Thanks for quick response!  Applied this and next patch
> > to the togreg branch of iio.git  
> 
> Shawn had some comments to patch #7. Just to make it clear, there is no 
> need to resend patch 4 and 5 in V3?
> 
> Best regards
> 
Yes. They will work their way through the IIO tree to upstream whilst
other bits go via appropriate routes.

Jonathan

> > 
> > 
> > Thanks,
> > 
> > Jonathan
> >   
> >>
> >> Best regards,
> >> Krzysztof
> >>  
> > 
> > 
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
index c6201976378f..5eb71b24a7cb 100644
--- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
+++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
@@ -48,6 +48,9 @@  properties:
           - st,lsm330d-accel
           - st,lsm330dl-accel
           - st,lsm330dlc-accel
+      - items:
+          - const: st,iis328dq
+          - const: st,h3lis331dl-accel
       - description: Silan Accelerometers
         enum:
           - silan,sc7a20