Lorenzo Bianconi
16ac43a1b1
iio: imu: st_lsm6dsx: add support to ASM330LHHXG1
...
Add support to STM ASM330LHHXG1 (accelerometer and gyroscope) Mems
sensor.
The ASM330LHHXG1 sensor can use LSM6DSR as fallback device since LSM6DSR
implements all the ASM330LHHXG1 features currently implemented in
st_lsm6dsx.
Link: https://www.st.com/resource/en/datasheet/asm330lhhxg1.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/e3dbe4720cdf407d0152e93b1331306a8c7f5df3.1706961432.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-17 16:16:11 +00:00
Lorenzo Bianconi
0e2bf22aed
iio: imu: st_lsm6dsx: improve kernel docs and comments
...
Improve kernel docs and comments reporting supported sensors in a list in
order to make more easy to add new devices in the future.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/d365d048253d2ff9ee0092d391bbaa9cf0737cff.1706961432.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-02-17 16:16:11 +00:00
Lorenzo Bianconi
18462d0801
iio: imu: st_lsm6dsx: add support to ASM330LHB
...
Add support to STM ASM330LHB (acc + gyro) automotive Mems sensor.
The ASM330LHB sensor can use ASM330LHH as fallback device since it
implements all the ASM330LHB features currently implemented in
st_lsm6dsx.
Datasheet: https://www.st.com/resource/en/datasheet/asm330lhb.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/a1d675457da7aa9e979d8cabea410e942e015e71.1678100533.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2023-03-12 15:56:44 +00:00
Vladimir Oltean
c9c1d6d820
iio: imu: st_lsm6dsx: fix build when CONFIG_IIO_TRIGGERED_BUFFER=m
...
The following kernel linkage error:
st_lsm6dsx_core.o: in function `st_lsm6dsx_sw_buffers_setup':
st_lsm6dsx_core.c:2578: undefined reference to `devm_iio_triggered_buffer_setup_ext'
is caused by the fact that the object owning devm_iio_triggered_buffer_setup_ext()
(drivers/iio/buffer/industrialio-triggered-buffer.o) is allowed to be
built as module when its user (drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c)
is built-in.
The st_lsm6dsx driver already has a "select IIO_BUFFER", so add another
select for IIO_TRIGGERED_BUFFER, to make that option follow what is set
for the st_lsm6dsx driver. This is similar to what other iio drivers do.
Fixes: 2cfb2180c3 ("iio: imu: st_lsm6dsx: introduce sw trigger support")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com >
Link: https://lore.kernel.org/r/20230103130348.1733467-1-vladimir.oltean@nxp.com
Cc: <Stable@vger.kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2023-01-08 12:14:45 +00:00
Lorenzo Bianconi
3a042fda88
iio: imu: st_lsm6dsx: add support to ISM330IS
...
Add support to STM ISM330IS (accelerometer and gyroscope) Mems sensor.
The ISM330IS sensor can use LSM6DSO16IS as fallback device since it
implements all the ISM330IS features currently implemented in
st_lsm6dsx.
Datasheet: https://www.st.com/resource/en/datasheet/ism330is.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/4cd1614060e06f49cd92f5930d8fd40117c07920.1669279604.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-11-24 19:23:23 +00:00
Lorenzo Bianconi
f35e1ee9cb
iio: imu: st_lsm6dsx: add support to LSM6DSO16IS
...
Add support to STM LSM6DSO16IS (accelerometer and gyroscope) Mems sensor.
Datasheet: https://www.st.com/resource/en/datasheet/lsm6dso16is.pdf
Tested-by: Mario Tesi <mario.tesi@st.com >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/df6a9d4653cd69f7204190f8b6a9b618fd48bd23.1668605631.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-11-23 20:50:37 +00:00
Lorenzo Bianconi
46975081f7
iio: imu: st_lsm6dsx: add support to LSM6DSV16X
...
Add support to STM LSM6DSV16X (accelerometer and gyroscope) Mems sensor.
The LSM6DSV16X sensor can use LSM6DSV as fallback device since it
implements all the LSM6DSV16X features currently implemented in
st_lsm6dsx.
Datasheet: https://www.st.com/resource/en/datasheet/lsm6dsv16x.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/284b251f861dff30c399e5736a843c8e3a497249.1667745215.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-11-23 19:58:44 +00:00
Lorenzo Bianconi
a1c6d631ff
iio: imu: st_lsm6dsx: add support to LSM6DSV
...
Add support to STM LSM6DSV (accelerometer and gyroscope)
Mems sensor.
Datasheet: https://www.st.com/resource/en/datasheet/lsm6dsv.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/aad879e7af0fe583bbf043a2b93e32fade79fa19.1667216004.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-11-23 19:44:04 +00:00
Lorenzo Bianconi
186b9e3845
iio: imu: st_lsm6dsx: add support to LSM6DSTX
...
Add support to STM LSM6DSTX (acc + gyro) Mems sensor.
The LSM6DSTX sensor can use LSM6DST as fallback device since it
implements all the LSM6DSTX features currently implemented in
st_lsm6dsx.
Datasheet: https://www.st.com/resource/en/datasheet/lsm6dstx.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/573a232b0f320b2ec92c56fa24393cfb275183fb.1663262890.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-09-21 18:42:54 +01:00
Lorenzo Bianconi
fdd70d7aad
iio: imu: st_lsm6dsx: add support to ASM330LHHX
...
Add support to STM ASM330LHHX (acc + gyro) automotive Mems sensor.
The ASM330LHHX sensor can use LSM6DSR as fallback device since it
implements all the ASM330LHHX features currently implemented in
st_lsm6dsx.
Datasheet: https://www.st.com/resource/en/datasheet/asm330lhhx.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/04e2644772a6761a25c36bb9679979567fdebda3.1649100168.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2022-04-28 19:22:54 +01:00
Lorenzo Bianconi
2c57d26505
iio: imu: st_lsm6dsx: add support to LSM6DSOP
...
Add support to STM LSM6DSOP (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6dsop.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/d3c459ad945ccd1a256f4a217128be214b0c024e.1606642528.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2020-12-03 19:40:24 +00:00
Lorenzo Bianconi
4393e4c533
iio: imu: st_lsm6dsx: add support to LSM6DST
...
Add support to STM LSM6DST (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6dst.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://lore.kernel.org/r/835127b76ef5ad05aa2aac58298aee5f3073fb71.1601985763.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2020-10-10 17:38:36 +01:00
Lorenzo Bianconi
cf9c71b38b
iio: imu: st_lsm6dsx: add support to LSM6DSRX
...
Add support to STM LSM6DSRX 6-axis (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6dsrx.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2019-10-27 16:38:06 +00:00
Lorenzo Bianconi
fa060a3d9c
iio: imu: st_lsm6dsx: add support to LSM6DS0
...
Add support to STM LSM6DS0 6-axis (acc + gyro) Mems sensor
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2019-10-15 21:11:07 +01:00
Martin Kepplinger
52f4b1f196
iio: imu: st_lsm6dsx: add support for accel/gyro unit of lsm9ds1
...
The LSM9DS1's accelerometer / gyroscope unit and it's magnetometer (separately
supported in iio/magnetometer/st_magn*) are located on a separate i2c addresses
on the bus.
For the datasheet, see https://www.st.com/resource/en/datasheet/lsm9ds1.pdf
Treat it just like the LSM6* devices and, despite it's name, hook it up
to the st_lsm6dsx driver, using it's basic functionality.
accelerometer and gyroscope are not independently clocked. It runs at the gyro
frequencies if both are enabled, see chapter 7.12 of the datasheet.
We could have handled this as a single IIO device but we have split
it up to be more consistent with the other more flexible devices.
Despite supporting and testing the LSM9DS1, we call the gyro channels
iio_chan_spec struct "st_lsm6ds0_gyro_channels" because the register
description is equal. This suggests that supporting LSM6DS0 should be
trivial to do.
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2019-09-03 18:55:50 +01:00
Lorenzo Bianconi
db947a79fc
iio: imu: st_lsm6dsx: add support to ISM330DHCX
...
Add support to STM ISM330DHCX 6-axis (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/ism330dhcx.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2019-08-05 15:22:43 +01:00
Vitor Soares
2660b0080b
iio: imu: st_lsm6dsx: add i3c basic support for LSM6DSO and LSM6DSR
...
For today the st_lsm6dsx driver support LSM6DSO and LSM6DSR sensor only in
spi and i2c mode.
The LSM6DSO and LSM6DSR are also i3c capable so let's give i3c support to
them.
Signed-off-by: Vitor Soares <vitor.soares@synopsys.com >
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2019-07-27 22:55:27 +01:00
Lorenzo Bianconi
dbcd2088a7
iio: imu: st_lsm6dsx: add support to LSM6DS3TR-C
...
Add support to STM LSM6DS3TR-C 6-axis (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6ds3tr-c.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2019-07-27 20:11:17 +01:00
Thomas Gleixner
ec8f24b7fa
treewide: Add SPDX license identifier - Makefile/Kconfig
...
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:
GPL-2.0-only
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-05-21 10:50:46 +02:00
Lorenzo Bianconi
43901008fd
iio: imu: st_lsm6dsx: add support to LSM6DSR
...
Add support to STM LSM6DSR 6-axis (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6dsr.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2019-04-07 11:29:43 +01:00
Lorenzo Bianconi
6af0e8a9a7
iio: imu: st_lsm6dsx: add support to LSM6DSOX
...
Add support to STM LSM6DSOX 6-axis (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6dsox.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2019-04-04 20:20:00 +01:00
Lorenzo Bianconi
3054c4ff28
iio: imu: st_lsm6dsx: add support to ASM330LHH
...
Add support to STM ASM330LHH 6-axis (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/asm330lhh.pdf
Tested-by: Mario Tesi <mario.tesi@st.com >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2019-04-04 20:19:49 +01:00
Lorenzo Bianconi
801a6e0af0
iio: imu: st_lsm6dsx: add support to LSM6DSO
...
Add support to STM LSM6DSO 6-axis (acc + gyro) Mems sensor
https://www.st.com/resource/en/datasheet/lsm6dso.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2018-09-02 21:30:47 +01:00
Lorenzo Bianconi
179c8d608c
iio: imu: st_lsm6dsx: add support to ism330dlc
...
Add support to STM ISM330DLC 6-axis (acc + gyro) Mems sensor
http://www.st.com/resource/en/datasheet/ism330dlc.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2018-04-08 17:27:10 +01:00
Lorenzo Bianconi
51a8b70762
iio: imu: st_lsm6dsx: add regmap API support
...
Introduce regmap API support to access to i2c/spi bus instead of
using a custom support. Set max bulk read to
(32 / SAMPLE_SIZE) * SAMPLE_SIZE since spi_write_then_read() used in
regmap_spi indicates that is the max buffer length to use in order to
avoid a kmalloc for each bus access.
Remove lock mutex since concurrency is already managed by regmap API
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com >
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-08 16:03:43 +01:00
Lorenzo Bianconi
df47710a6e
iio: imu: st_lsm6dsx: add support to lsm6ds3h
...
Add support to STM LSM6DS3H 6-axis (acc + gyro) Mems sensor
http://www.st.com/resource/en/datasheet/lsm6ds3h.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com >
Signed-off-by: Jonathan Cameron <jic23@kernel.org >
2017-02-04 12:25:05 +00:00
Lorenzo Bianconi
0b2a3e5f17
iio: imu: st_lsm6dsx: add support to lsm6dsl
...
Add support to STM LSM6DSL 6-axis (acc + gyro) Mems sensor
http://www.st.com/resource/en/datasheet/lsm6dsl.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com >
Signed-off-by: Jonathan Cameron <jic23@kernel.org >
2017-02-04 12:23:37 +00:00
Lorenzo Bianconi
290a6ce11d
iio: imu: add support to lsm6dsx driver
...
Add support to STM LSM6DS3-LSM6DSM 6-axis (acc + gyro) Mems sensor
http://www.st.com/resource/en/datasheet/lsm6ds3.pdf
http://www.st.com/resource/en/datasheet/lsm6dsm.pdf
- continuous mode support
- i2c support
- spi support
- sw fifo mode support
- supported devices: lsm6ds3, lsm6dsm
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com >
Signed-off-by: Jonathan Cameron <jic23@kernel.org >
2017-01-14 12:40:37 +00:00