diff options
author | Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> | 2017-07-05 21:30:01 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2017-07-06 21:32:29 +0300 |
commit | a7b8829d242b1a58107e9c02b09e93aec446d55c (patch) | |
tree | 95f3fd426b135148789c66f2f066b83cd91ab912 /include/linux/platform_data | |
parent | 631b010abc5b57009c6a8328f51492665f6ef310 (diff) | |
download | linux-a7b8829d242b1a58107e9c02b09e93aec446d55c.tar.xz |
iio: accel: st_accel: add SPI-3wire support
Add SPI Serial Interface Mode (SIM) register information
in st_sensor_settings look up table to support devices
(like LSM303AGR accel sensor) that allow just SPI-3wire
communication mode. SIM mode has to be configured before any
other operation since it is not enabled by default and the driver
is not able to read without that configuration
Whilst a fairly substantial patch, the actual logic is simple and it
is better to have the generic fix than a band aid.
Fixes: ddc05fa28606 (iio: st-accel: add support for lsm303agr accel)
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r-- | include/linux/platform_data/st_sensors_pdata.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/platform_data/st_sensors_pdata.h b/include/linux/platform_data/st_sensors_pdata.h index 79b0e4cdb814..f8274b0c6888 100644 --- a/include/linux/platform_data/st_sensors_pdata.h +++ b/include/linux/platform_data/st_sensors_pdata.h @@ -17,10 +17,12 @@ * Available only for accelerometer and pressure sensors. * Accelerometer DRDY on LSM330 available only on pin 1 (see datasheet). * @open_drain: set the interrupt line to be open drain if possible. + * @spi_3wire: enable spi-3wire mode. */ struct st_sensors_platform_data { u8 drdy_int_pin; bool open_drain; + bool spi_3wire; }; #endif /* ST_SENSORS_PDATA_H */ |