Commit Graph

299 Commits

Author SHA1 Message Date
Mario Tesi
a64c7c7b2d
drivers:iio:stm:imu:st_ism330is: add ST MEMS IMU ISM330IS sensor support
Added support tu ISM330IS ST MEMS IMU sensor with following features:
 - Sensor Hub
    1) Maximum of 2 device supported to be chosen from the following
       part numbers:
       - LIS2MDL 3-axis magnetometer
       - LPS22HH pressure
    2) Possibility to configure pull up on I2C master interface through
       device tree
    3) Self scan on I2C master interface of supported device, including
       multi address devices
    4) Configure SHUB sensor ODR
 - Self-test
    verifying the functionality of the device without moving it.
    The Self Test procedure can be performed on the Accelerometer and
    also on Gyro sensor separately using the selftest entry of the sysfs.
 - Acc, gyro and temperature data reading (with sensitivity and raw data)
 - External trigger

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I6de3f216b54244dae7127ae48e38b7939009e248
2023-12-18 22:02:08 +01:00
Mario Tesi
2dae89e66f
drivers:iio:stm:imu:st_lsm6dsv16bx: add lsm6dsv16b support to driver
Lsm6dsv16b sensor is managed by the same general driver
as it implements a subset of the functions of lsm6dsv16bx.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I4f5f22978d90619c5629b803c1283f1d70e0e7dd
2023-12-18 22:02:08 +01:00
Mario Tesi
876ab6c015
drivers:iio:stm:imu: add support to lsm6dsv16bx STMEMS IMU sensor
Added support for the imu lsm6dsv16bx sensor. The current driver
version supports the following features:
 - Acc and Gyro in continuous mode supported by the internal HW FIFO
 - QVAR sensor for presence and touch detection, data of QVAR are
   managed internally by HW FIFO.
 - SFLP Embedded Sensor Fusion Function Game Rotation vector sensor.
 - TDM slave interface configuration for accelerometer data.
 - MLC / FSM programmable functions.
 - Free fall, step counter, step detection, wake-up, significant
   motion, tilt, tap, double tap, 6D and sleep change embedded
   functions event detection.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I1f2ad688261cba90b5c3633ccd9fc6fb0301d771
2023-12-18 22:02:00 +01:00
Mario Tesi
115ea4079c
drivers:iio:stm:accel: Add support to LIS2DU12 STMEMS accel
Added support to STMEMS acc LIS2DU12 sensor.
The following features has been included:
 - Acc and Temp sensor in FIFO
 - Embedded features event detection supported:
   - Wake-up
   - Free fall
   - Tap
   - Double Tap
   - 6D / 4D
   - activity / inactivity
 - Embedded features parameters configuration
 - Self test procedure

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I89df1f65ca14e01bc424b8e26de2c972cf71b999
2023-12-05 14:20:48 +01:00
Mario Tesi
b314796715
drivers:iio:stm:imu:st_lsm6dsvx: align the ODRs with latest specs
Align the odrs with those of the latest specifications.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I11efae9be3d5b86476c2ab5c4b46ecfbbc3a5dbd
2023-12-01 16:13:32 +01:00
Mario Tesi
73f3b2a697
drivers:iio:stm:imu:st_lsm6dsvx: prepare the driver to support other devices
Groups togheter the settings and full scale structures to better
manage the support of new devices of same family.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Iddfcc7e7d7a167ef8572b14bc37ba49ed513336f
2023-12-01 16:13:32 +01:00
Mario Tesi
14a46fbb7d
drivers:iio:stm:imu:st_asm330lhhx: added support to ASM330LHB IMU sensor
Added support of the new IMU sensor which belongs to the same
sensor family.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I8565887c5a94465efce0ed6e0f7cc3ebded196f6
2023-12-01 16:13:31 +01:00
mariotesi
def5986331
drivers:iio:stm:imu:st_asm330lhhx: disable irq line during suspend
The IRQ enable/disable status is independent of the IRQ enable
status so an IRQ can be disabled and still wake up the system
as long as the IRQ has wake feature active.
For this reason, while system is suspending, it is more correct
to disable the interrupts during the suspend phase and enable
them again at the end of the resume phase.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: Ib90cb491f93490b35c7416898eeac9903472c97d
2023-12-01 16:13:31 +01:00
mariotesi
0606118263
drivers:iio:stm:accel:st_lis2dw12: add support to suspend resume operations
Added suspend and resume pm functions to manage system pm
callbacks. The devicetree wakeup-source property allow to
configure wake-up mode for all enabled sensors.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: If44f72bd2593711f495d11c87d82c224ba0f277c
2023-12-01 16:13:21 +01:00
mariotesi
efe8afbe40
drivers:iio:stm:accel:st_lis2dw12: replace i2c/spi interfaces with regmap
Some drivers like lis2dw12 have not yet benefited from regmap
support which unifies and simplifies access to the communication
interfaces with devices and already implements all the transport
synchronization and optimization mechanisms internally.
This patch add support of regmap api to lis2dw12 and compatible
devices.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I412e8a0e27636e3b49f747b5f6cb4e64ee3d0269
2023-12-01 10:07:14 +01:00
mariotesi
a4d9103148
drivers:iio:stm:accel:st_lis2duxs12: updates registers and bitmasks to new DS
Updated registers and bitmasks aligning the driver to the new rev
4 datasheet.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: Ifbcf714d17cf881d9d66ff6eef7df2589bcec63e
2023-11-21 09:10:06 +01:00
Mario Tesi
9cd00ee4c2 drivers:iio:stm:accel: add support to h3lis331dl STMEMS accel sensor
Add support to the h3lis331dl STMEMS accel sensor with the
following basic features:
 - Accel raw data read
 - Buffered data read
 - Trigger support

h3lis331dl driver include support for H3LIS331DL and LIS331DLH
STMEMS accel sensor devices.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Ic8553294d1e646aa048b3f4be294d8d6d3916035
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/296337
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-15 23:09:08 +01:00
mariotesi
6798553410 drivers:iio:stm:imu:st_lsm6dsm: add support to lps22hh
Added support for the external pressure sensor lps22hh.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I33746439fff76dfd03487f48ba2bb50d5a641763
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/326054
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-15 23:09:08 +01:00
mariotesi
6876605ae0 stm-ldd-iio: remove MAY_WAKEUP from default config
the may wakeup functionality has been removed from the
driver and managed via device tree where supported by
the target, for this reason defining it in the sensor
default config is no longer necessary.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: If4de48330aebb923453c67f61ad845236d9f0670
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/326363
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-15 23:09:08 +01:00
Mario Tesi
6d5cb1ac0f drivers:iio:stm:imu:st_lsm6dsrx: fix suspend/resume procedures
The iio_devs structure for unallocated devices could be
NULL so it is not healthy to recover the private pointer
when unallocated.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Ibf3e87627303fc1da4fb95c00288ee6c55a45d0f
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/307587
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-15 23:09:08 +01:00
Mario Tesi
8fe2eed8c6 drivers:iio:stm:imu:st_lsm6dso16is: fix suspend/resume procedures
The iio_devs structure for unallocated devices could be
NULL so it is not healthy to recover the private pointer
when unallocated.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Ie8a0cc6005f54b1c6c03e3f2520af263d52b1a7a
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/307586
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-15 23:09:08 +01:00
Mario Tesi
816d3565cc drivers:iio:stm:imu:st_lsm6dsox: fix suspend/resume procedures
The iio_devs structure for unallocated devices could be
NULL so it is not healthy to recover the private pointer
when unallocated.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I5fe6edf1cd996d4ec16210bf22e8648c546bddd5
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/307585
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-15 23:09:08 +01:00
Mario Tesi
afcad3228e drivers:iio:stm:imu:st_asm330lhhx: correct scale available for temperature sensor
Temperature sensor scale cannot be expressed using the same string
format of the other sensors since it has a non-zero integer part.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I3f05fb9182dad8fb2d04cd6f1f6377ba910cea3b
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/305207
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-15 23:09:08 +01:00
Mario Tesi
f21a642f04 drivers:iio:st:imu:st_asm330lhhx: matches IIO device name to the compatible string
IIO device names are created based on the device name compatible
string defined in the DT. Some of the IIO devices were not constructing
the name correctly but constructing it with an asm330lhhx_ prefix
regardless of the device name.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Ia0df31cd9065dc6681b520a62584c3873fe9dbbd
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/292785
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-15 23:09:08 +01:00
Mario Tesi
eafb31a34c drivers:iio:stm:accel:st_lis2dw12: add support to multiple compatible strings
This driver supports lis2dw12, iis2dlpc and ais2ih ST MEMS
accel sensors. In order to generate the correct sensor
name in IIO sysfs the dynamic management of names based
on the compatible string has been added.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Ic6d9d98bba8b28f0df8dad2ca7e6853b9f158830
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/298312
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-15 23:09:08 +01:00
Mario Tesi
35a23598c4 drivers:iio:stm:accel:st_lis2dw12: updated Kconfig comments
Updated the description of the already compatible
supported devices by this driver.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I9b293637089c7fc1aafffcd5fec5f4b3f4edc5fa
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/296746
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-15 23:09:08 +01:00
Mario Tesi
ad8e9c9c06 drivers:iio:stm:accel:st_lis2dw12: Add multiple interrupt management
The sensor family whose founder is lis2dw12 includes the possibility
to internally detect some gestures such as TAP, double TAP, wake up,
etc.

These events are notified to the system processor via a dedicated
interrupt pin which in the previous version of the driver could not
be dissociated from the accelerometer sensor interrupt pin.

With this new version of the driver it is now possible to define a
dedicated interrupt for the management of embedded events distinct
from the accelerometer sensor interrupt.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Iac61300266582d01c0505605189c874abd1f6eb0
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/339390
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-15 23:09:08 +01:00
Matteo Dameno
6c3aaf9420 drivers:iio:stm:magnetometer:st_mag40: selftest feature
adds selftest feature management to the driver as for
AN5069 from https://www.st.com
The feature can be managed by selftest and  selftest_available
sysfs iio files; device needs to be disabled
before to perform selftest

Change-Id: I7e035517a13b8fac1c493a16fa903bd5d503500f
Signed-off-by: Matteo Dameno <matteo.damenom@st.com>
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/338788
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Mario TESI <mario.tesi@st.com>
2023-11-10 17:54:23 +01:00
Mario Tesi
553dbbcd03 drivers:iio:stm:pressure:st_ilps22qs: add support to interleaved mode
Enable reading QVAR and Pressure data using interleaved mode.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I67a1929a027ca96dc114d1cea3d79f9881073917
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/292591
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-03 17:38:18 +01:00
Mario Tesi
a99961ef6e drivers:iio:stm:pressure:st_ilps22qs: add support to QVAR/AH
The ilps22qs pressure sensor supports analog hub (AH)
function for processing analog input data and Qvar for
detecting the change in electrical charge.
When using the QVAR/AH feature it will be necessary
to deactivate the pressure sensor and vice versa because
these share the same output registers.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I326960a9fcdfa32d49c65c6a42bb2100b256e247
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/291894
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-03 17:38:18 +01:00
Mario Tesi
2335ba801c drivers:iio:stm:pressure:st_ilps22qs: add support to ilps28qws
Added support to the ilps28qws device that is the waterproof
version of the ilps22qs, it shares the same basic functionalities
of ilps22qs pressure sensor.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I883bdc5842c9daa6501304ad10e776e11cda1c17
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/286584
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-03 17:38:18 +01:00
Mario Tesi
3a162cf3d9 drivers:iio:stm:pressure: add support to ilps22qs STMEMS Pressure sensor
Preliminary version of ilps22qs STMEMS Pressure driver to enable
reading data from pressure and temperature sensors.
Since the interrupts of the device are exclusively software, timers
have been used for the management of the data polling in continuous
mode with IIO buffer.

Available features:
 - Configure ODR for Pressure and Temperature sensor
 - Reading raw Pressure and Temperature sensor data
 - Reading IIO buffer Pressure and Temperature sensor data

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Ifce3655b2687911b88bdbc854f6ff42778b60a40
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/284832
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-03 17:38:18 +01:00
mariotesi
d51f3298c0 drivers:iio:stm:imu:st_lsm6dso16is: rework self-test procedure
After enabling the sensor discard the first sample
because it could be prior to the activation of the
self-test procedure.
With this reworking the procedure is now faithful
to the application note.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I30aa6c34575ed346dc4e3e34aa283721650ab4b9
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/336875
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-02 11:09:20 +01:00
mariotesi
1dd9fc843b drivers:iio:stm:imu:st_lsm6dsox: rework self-test procedure
After enabling the sensor discard the first sample
because it could be prior to the activation of the
self-test procedure.
With this reworking the procedure is now faithful
to the application note.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I26ae22d85ae5fd6f9be15e57f1e70ddaffc2c311
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/336874
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-11-02 11:09:20 +01:00
mariotesi
c6c8798654 drivers:iio:stm:imu:st_lsm6dsvx: rework self-test procedure
After enabling the sensor discard the first sample
because it could be prior to the activation of the
self-test procedure.
With this reworking the procedure is now faithful
to the application note.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I2a590df2b22fdd3f8ab73558901c513b3d960a50
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/336873
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-02 11:09:20 +01:00
mariotesi
ab0db8a9c7 drivers:iio:stm:imu:st_lsm6dsrx: add delay during gyro self-test
During the gyro self-test procedure, a delay of 150ms must be
inserted between the gyro power-off and power-on phase.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: Ieca6ba8ed4708227650b7761823b8b73c26f0980
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/333376
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-02 11:09:20 +01:00
mariotesi
eb47872371 drivers:iio:stm:imu:st_ism330dhcx: add self test procedure
Added selfr-test procedure for acc and gyro sensors.

Possible sels-tests are:
positive sign and negative sign according to AN5398.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I86ab7c6ef6e6475d2d8337531fbcfe9a4d4ee904
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/333375
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-02 11:09:20 +01:00
mariotesi
fae638ec9b drivers:iio:stm:imu:st_asm330lhhx: add delay during gyro self-test
During the gyro self-test procedure, a delay of 150ms must be
inserted between the gyro power-off and power-on phase.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I556ad49fc2a44d0066bf05db32cc99a50be01d6c
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/333374
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-02 11:09:20 +01:00
Mario Tesi
00dafc186d drivers:iio:stm:magnetometer:st_mag40: use dev_to_iio_dev() in sysfs callbacks
On kernel 6.1 the `dev_get_drvdata()` in IIO sysfs callbacks cause
a kernel panic because the IIO core as well as most other drivers have
switched over to using `dev_to_iio_dev()`.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I1284174ebc0bc5b8ab3634d4912f9562ba76dbea
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/335847
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-10-31 17:45:11 +01:00
Mario Tesi
46cffd34d7 drivers:iio:stm:accel:st_acc33: use dev_to_iio_dev() in sysfs callbacks
On kernel 6.1 the `dev_get_drvdata()` in IIO sysfs callbacks cause
a kernel panic because the IIO core as well as most other drivers have
switched over to using `dev_to_iio_dev()`.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I891493c3562dea8ce71e1653bc5f938947afb876
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/335869
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-10-31 17:43:07 +01:00
mariotesi
492ec504f9 drivers:iio:stm:pressure:st_lps22df: add 4060 hPa full scale to lps28dfw
This commit add to compatible STMEMS pressure device
lps28dfw support up to 4060 hPa full scale.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I654548c05730e5940e912c9c46e7233a79e770c8
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/336274
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-10-27 10:21:12 +02:00
mariotesi
d16f631654 drivers:iio:stm:pressure:st_lps22df: fix 'Bad address' error in setting sampling_frequency
The function st_lps22df_write_raw() should return 0
to indicate a successful frequency configuration,
rather than returning the value from st_lps22df_get_odr().

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I318b6a7f0ed5851541f560286f8a12bf2a726906
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/336076
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-10-27 10:21:12 +02:00
Matteo DAMENO
28af5617e0 drivers:iio:stm:imu:st_asm330lxxh: add support to ASM330LHHXG1
Added support for ASM330LHHXG1 imu sensor to st_asm330lhhx driver.

Change-Id: I55b0f0a4138e818f089c78f1e7c35d382ac19f9e
Signed-off-by: Matteo DAMENO <matteo.damenom@st.com>
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/333673
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Mario TESI <mario.tesi@st.com>
2023-10-13 17:14:07 +02:00
Matteo DAMENO
f7e5022912 stm: move kernel 6.1.y stm patches out of WIP stage
All drivers are now working properly in kernel version 6.1.y.
This patch just rename the patches folder so to mark
that are not anymore in WIP.

Change-Id: Ia9f3f1693c92431071bb9d42fd70144a3e7c1873
Signed-off-by: Matteo DAMENO <matteo.damenom@st.com>
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/327813
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Reviewed-by: Mario TESI <mario.tesi@st.com>
2023-10-12 18:09:37 +02:00
Mario Tesi
07766380c8 drivers:iio:stm:imu:st_asm330lhhx: avoid to set invalid odr values
Prevent applying invalid odr values to the device, especially the
null value.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I6eca531089c8ef4663dbd886804a91f98c881425
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/293585
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-09-22 00:45:52 +02:00
Mario Tesi
b1f69ff9c6 drivers:iio:stm:imu: Fix check when odr change
The callback function raw_get_fmt does not check mask
IIO_CHAN_INFO_SAMP_FREQ and returns error when sensor
odr is changed.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Idf4ee04e89d67d8d2ad52611c28c9314b3dca1e7
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/303978
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-09-22 00:45:52 +02:00
mariotesi
87a218df8b drivers:iio:stm:imu: remove duplicate hwtimestamp link
When imu drivers that support the hwtimestamp feature
are compiled as modules there is a duplication of links
to the hwtimestamp file which does not occur when the
driver is compiled built-in. This patch removes duplication
in the Makefile.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I3a01cdf5b59fbc681c614ea37bf19ffd04b038b0
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/326093
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-09-15 16:05:18 +02:00
mariotesi
fd9092e177 drivers:iio:stm: remove all custom types previously introduced in IIO
All the patches applied to the IIO framework file types.h have been
removed, then concentrated and replaced with different ones (prefixed
by STM_) in a single stm driver file:
drivers/iio/stm/common/stm_iio_types.h
which is expected to be shared with the application layer or hal.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I66ca184fe31f3b09bfe830187d9e3f096dd219f1
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/323957
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-09-14 22:54:51 +02:00
Mario Tesi
b6abc92c02 drivers:iio:stm: extends IIO ST MEMS drivers build on k6.1
Cumulative patch to allow build IIO ST MEMS drivers on k6.1

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I1fa2524b21c800eefbfeee85d9abc26e4b2a2eef
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/295087
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-09-14 20:16:18 +02:00
Mario Tesi
5b1943eda5 stm: add kernel patch for build ST MEMS drivers on k6.1
The IIO ST drivers for MEMS are located in the related
path drivers/iio/stm. In order to enable the build is
requested to add this path to Kconfig and Makefile of
the iio folder, moreover are requested some new IIO
types to handle the extended events generated by these
sensors.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I276c1eaf4237cc93568e1832bab85294480077de
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/295086
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-09-14 20:15:56 +02:00
mariotesi
363529453e stm: Removed support for LTS kernel (4.9) EOL
The LTS 4.9 kernel version entered EOL in January 2023
for this reason it will no longer be supported and updated
in this repo.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I17fb2b26f9b6939190080322952d084060304018
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/324710
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-09-14 20:15:40 +02:00
mariotesi
015ea32b3b drivers:iio:stm:imu:st_lsm6dso16is: add lsm6dso16is device to kernel build
The st_lsm6dso16is driver was not included in the kernel build
because it was not added in the top level Kconfig/Makefile,
furthermore the default config contained a typo.

In lsm6dso16is_defconfig there is a wrong device name,
this fix enables lsm6dso16is module compilation.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I92df0ca4c3e29af6bcaef5ce80a78d494672ef00
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/325964
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-09-14 17:26:12 +02:00
mariotesi
8b346fe8b2 drivers:iio:stm:imu:st_lsm6dso16is: fix compile warnings
Initialize the odr to correct value in set odr function and
remove warning for varialble array length in the function to
read one shot data from sensor hub.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I69e6e8ad8a7b427fb8a9791ecf60230a9a9640f3
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/327204
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-09-14 16:34:07 +02:00
mariotesi
a9bf4167c4 driver:iio:stm:imu:st_asm330lhhx: Added support to 125dps gyro full scale
This contribution extends the support of all full scale
supported by this sensor (for the gyro was missing support
to 125 dps).

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I59d1ad9e91283de9ec879fb9955a888c44d0f089
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/321052
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-08-04 13:37:46 +02:00
Mario Tesi
aa9e1facb9 drivers:iio:stm:imu:st_lsm6dsvx: avoid to set invalid odr values
back porting of the commit:

commit 8281b4fba1df ("drivers:iio:stm:imu:st_asm330lhhx: avoid to set invalid odr values")

This fix solves the issue after setting the odr as only the
least significant part is changed.

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: Idb95500d6a370bc411faa3ed2fe0768e563eb9dc
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/294835
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-07-05 17:08:53 +02:00