OSDN Git Service

iio: imu: st_lsm6dsx: add dts property to disable sensor-hub
authorLorenzo Bianconi <lorenzo@kernel.org>
Sat, 13 Nov 2021 15:23:14 +0000 (16:23 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 4 Dec 2021 15:34:17 +0000 (15:34 +0000)
commit35619155d044830357f06f1d2c8188c4530b4d7a
treea96808dbdabcfa12ff572dfe51d6f5e4c22abeeb
parent1d9b750c92d738cb84eb1531dd85147466202b86
iio: imu: st_lsm6dsx: add dts property to disable sensor-hub

Introduce the capability to disable sensorhub through a device-tree
property since there are some configurations where users want to
explicitly disable sensor-hub auto-probing at bootstrap.
A typical configuration is when the sensorhub clock/data lines are connected
to a pull-up resistor since no slave sensors are connected to the i2c master.
If SDO/SA0 line is connected to the same pull-up resistor, when the driver
tries to probe slave devices connected on sensor-hub, it will force SDO/SA0
line to low, modifying the device i2c address.

Tested-by: Mario Tesi <mario.tesi@st.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/ad7894e7b1c6fb3427fab3f623bb942860ad45cf.1636816719.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c