diff mbox series

[v5,2/2] dt-bindings: iio: st-sensors: add LIS2DS12 accelerometer

Message ID 20240622123520.39253-2-kauschluss@disroot.org (mailing list archive)
State Accepted
Headers show
Series [v5,1/2] iio: accel: st_accel: add support for LIS2DS12 | expand

Commit Message

Kaustabh Chakraborty June 22, 2024, 12:33 p.m. UTC
LIS2DS12 is an accelerometer by STMicroelectronics. It is identifiable by
its WhoAmI value 0x43.

Its register interface is not compatible with existing parts. For example:

- The full-scale values are present in register 0x20, in bits 2 and 3
  (mask 0x0c). Most other supported sensors have the register address set
  to 0x21, 0x23, 0x24, or 0x25. There is one sensor setting though
  (bearing WhoAmI 0x3b) which has it's address set to 0x20, but the mask is
  set to 0x20, not 0x0c.

- The full-scale values 2G, 4G, 8G, and 16G correspond to the register
  values 0x00, 0x02, 0x03, 0x01 respectively. None of the sensor settings
  have the value 0x01 associated with 16G.

Add the compatible string without any fallback.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
 Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 1 +
 1 file changed, 1 insertion(+)

Comments

Jonathan Cameron June 23, 2024, 10:03 a.m. UTC | #1
On Sat, 22 Jun 2024 18:03:46 +0530
Kaustabh Chakraborty <kauschluss@disroot.org> wrote:

> LIS2DS12 is an accelerometer by STMicroelectronics. It is identifiable by
> its WhoAmI value 0x43.
> 
> Its register interface is not compatible with existing parts. For example:
> 
> - The full-scale values are present in register 0x20, in bits 2 and 3
>   (mask 0x0c). Most other supported sensors have the register address set
>   to 0x21, 0x23, 0x24, or 0x25. There is one sensor setting though
>   (bearing WhoAmI 0x3b) which has it's address set to 0x20, but the mask is
>   set to 0x20, not 0x0c.
> 
> - The full-scale values 2G, 4G, 8G, and 16G correspond to the register
>   values 0x00, 0x02, 0x03, 0x01 respectively. None of the sensor settings
>   have the value 0x01 associated with 16G.
> 
> Add the compatible string without any fallback.
> 
> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Given the only requested change was this description and everyone seemed
happy with it in previous thread, I'll pick this series up now.
Note that I can still add any tags that come in as it'll only be
pushed out as testing for the next few days.

Applied to the togreg branch of iio.git and pushed out as testing to
let 0-day have a first go at seeing what we missed.

I made one tweak in patch 1 description.  Datasheet is a tag
so no blank line between that and the main tags block as it
will break some automation.

> ---
>  Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> index fff7e3d83a02..71c1ee33a393 100644
> --- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> +++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> @@ -26,6 +26,7 @@ properties:
>            - st,lis2dw12
>            - st,lis2hh12
>            - st,lis2dh12-accel
> +          - st,lis2ds12
>            - st,lis302dl
>            - st,lis331dl-accel
>            - st,lis331dlh-accel
Conor Dooley June 23, 2024, 2:30 p.m. UTC | #2
On Sun, Jun 23, 2024 at 11:03:05AM +0100, Jonathan Cameron wrote:
> On Sat, 22 Jun 2024 18:03:46 +0530
> Kaustabh Chakraborty <kauschluss@disroot.org> wrote:
> 
> > LIS2DS12 is an accelerometer by STMicroelectronics. It is identifiable by
> > its WhoAmI value 0x43.
> > 
> > Its register interface is not compatible with existing parts. For example:
> > 
> > - The full-scale values are present in register 0x20, in bits 2 and 3
> >   (mask 0x0c). Most other supported sensors have the register address set
> >   to 0x21, 0x23, 0x24, or 0x25. There is one sensor setting though
> >   (bearing WhoAmI 0x3b) which has it's address set to 0x20, but the mask is
> >   set to 0x20, not 0x0c.
> > 
> > - The full-scale values 2G, 4G, 8G, and 16G correspond to the register
> >   values 0x00, 0x02, 0x03, 0x01 respectively. None of the sensor settings
> >   have the value 0x01 associated with 16G.
> > 
> > Add the compatible string without any fallback.
> > 
> > Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
> Given the only requested change was this description and everyone seemed
> happy with it in previous thread, I'll pick this series up now.

ye, fine in my books. I should've prob acked explicitly when I assented
to the wording on the previous version.
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 fff7e3d83a02..71c1ee33a393 100644
--- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
+++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
@@ -26,6 +26,7 @@  properties:
           - st,lis2dw12
           - st,lis2hh12
           - st,lis2dh12-accel
+          - st,lis2ds12
           - st,lis302dl
           - st,lis331dl-accel
           - st,lis331dlh-accel