mbox series

[0/3] iio: st-sensors: Add LSM303C accelerometer+magnetometer

Message ID 20230106102239.9647-1-stephan@gerhold.net
Headers show
Series iio: st-sensors: Add LSM303C accelerometer+magnetometer | expand

Message

Stephan Gerhold Jan. 6, 2023, 10:22 a.m. UTC
Add support for the ST LSM303C [1] accelerometer and magnetometer combo 
sensor in st_accel and st_magn. LSM303C seems to be more or less
a combination of LIS2HH12 as accelerometer and LIS3MDL as magnetometer
so this series just adds two new compatibles for the two sensors that 
are already supported.

[1]: https://www.st.com/resource/en/datasheet/lsm303c.pdf

Stephan Gerhold (3):
  dt-bindings: iio: st-sensors: Add LSM303C accelerometer+magnetometer
  iio: accel: st_accel: Add LSM303C
  iio: magnetometer: st_magn: Add LSM303C

 Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 2 ++
 drivers/iio/accel/Kconfig                                | 2 +-
 drivers/iio/accel/st_accel.h                             | 1 +
 drivers/iio/accel/st_accel_core.c                        | 1 +
 drivers/iio/accel/st_accel_i2c.c                         | 5 +++++
 drivers/iio/accel/st_accel_spi.c                         | 5 +++++
 drivers/iio/magnetometer/Kconfig                         | 2 +-
 drivers/iio/magnetometer/st_magn.h                       | 1 +
 drivers/iio/magnetometer/st_magn_core.c                  | 1 +
 drivers/iio/magnetometer/st_magn_i2c.c                   | 5 +++++
 drivers/iio/magnetometer/st_magn_spi.c                   | 5 +++++
 11 files changed, 28 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski Jan. 6, 2023, 12:35 p.m. UTC | #1
On 06/01/2023 11:22, Stephan Gerhold wrote:
> The ST LSM303C [1] is a accelerometer and magnetometer combo sensor
> compatible with the existing ST sensor bindings. Accelerometer and
> magnetometer are exposed through separate I2C/SPI devices, so document
> separate compatibles with -accel and -magn suffix.
> 
> [1]: https://www.st.com/resource/en/datasheet/lsm303c.pdf


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

Best regards,
Krzysztof
Linus Walleij Jan. 7, 2023, 11:56 p.m. UTC | #2
On Fri, Jan 6, 2023 at 11:24 AM Stephan Gerhold <stephan@gerhold.net> wrote:

> Add support for the ST LSM303C [1] accelerometer and magnetometer combo
> sensor in st_accel and st_magn. LSM303C seems to be more or less
> a combination of LIS2HH12 as accelerometer and LIS3MDL as magnetometer
> so this series just adds two new compatibles for the two sensors that
> are already supported.
>
> [1]: https://www.st.com/resource/en/datasheet/lsm303c.pdf
>
> Stephan Gerhold (3):
>   dt-bindings: iio: st-sensors: Add LSM303C accelerometer+magnetometer
>   iio: accel: st_accel: Add LSM303C
>   iio: magnetometer: st_magn: Add LSM303C

This patch set:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Jonathan Cameron Jan. 8, 2023, 1:02 p.m. UTC | #3
On Sun, 8 Jan 2023 00:56:22 +0100
Linus Walleij <linus.walleij@linaro.org> wrote:

> On Fri, Jan 6, 2023 at 11:24 AM Stephan Gerhold <stephan@gerhold.net> wrote:
> 
> > Add support for the ST LSM303C [1] accelerometer and magnetometer combo
> > sensor in st_accel and st_magn. LSM303C seems to be more or less
> > a combination of LIS2HH12 as accelerometer and LIS3MDL as magnetometer
> > so this series just adds two new compatibles for the two sensors that
> > are already supported.
> >
> > [1]: https://www.st.com/resource/en/datasheet/lsm303c.pdf
> >
> > Stephan Gerhold (3):
> >   dt-bindings: iio: st-sensors: Add LSM303C accelerometer+magnetometer
> >   iio: accel: st_accel: Add LSM303C
> >   iio: magnetometer: st_magn: Add LSM303C  
> 
> This patch set:
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Series applied to the togreg branch of iio.git and pushed out as testing 
for 0-day to take a poke at it.

Note, still time for others to review as I'll probably not push this out as
a non rebasing tree until next weekendish.

Thanks,

Jonathan

> 
> Yours,
> Linus Walleij