diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/iio/common/st_sensors.h | 7 | ||||
| -rw-r--r-- | include/linux/platform_data/st_sensors_pdata.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index 497f2b3a5a62..97f1b465d04f 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h | |||
| @@ -105,6 +105,11 @@ struct st_sensor_fullscale { | |||
| 105 | struct st_sensor_fullscale_avl fs_avl[ST_SENSORS_FULLSCALE_AVL_MAX]; | 105 | struct st_sensor_fullscale_avl fs_avl[ST_SENSORS_FULLSCALE_AVL_MAX]; |
| 106 | }; | 106 | }; |
| 107 | 107 | ||
| 108 | struct st_sensor_sim { | ||
| 109 | u8 addr; | ||
| 110 | u8 value; | ||
| 111 | }; | ||
| 112 | |||
| 108 | /** | 113 | /** |
| 109 | * struct st_sensor_bdu - ST sensor device block data update | 114 | * struct st_sensor_bdu - ST sensor device block data update |
| 110 | * @addr: address of the register. | 115 | * @addr: address of the register. |
| @@ -197,6 +202,7 @@ struct st_sensor_transfer_function { | |||
| 197 | * @bdu: Block data update register. | 202 | * @bdu: Block data update register. |
| 198 | * @das: Data Alignment Selection register. | 203 | * @das: Data Alignment Selection register. |
| 199 | * @drdy_irq: Data ready register of the sensor. | 204 | * @drdy_irq: Data ready register of the sensor. |
| 205 | * @sim: SPI serial interface mode register of the sensor. | ||
| 200 | * @multi_read_bit: Use or not particular bit for [I2C/SPI] multi-read. | 206 | * @multi_read_bit: Use or not particular bit for [I2C/SPI] multi-read. |
| 201 | * @bootime: samples to discard when sensor passing from power-down to power-up. | 207 | * @bootime: samples to discard when sensor passing from power-down to power-up. |
| 202 | */ | 208 | */ |
| @@ -213,6 +219,7 @@ struct st_sensor_settings { | |||
| 213 | struct st_sensor_bdu bdu; | 219 | struct st_sensor_bdu bdu; |
| 214 | struct st_sensor_das das; | 220 | struct st_sensor_das das; |
| 215 | struct st_sensor_data_ready_irq drdy_irq; | 221 | struct st_sensor_data_ready_irq drdy_irq; |
| 222 | struct st_sensor_sim sim; | ||
| 216 | bool multi_read_bit; | 223 | bool multi_read_bit; |
| 217 | unsigned int bootime; | 224 | unsigned int bootime; |
| 218 | }; | 225 | }; |
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 @@ | |||
| 17 | * Available only for accelerometer and pressure sensors. | 17 | * Available only for accelerometer and pressure sensors. |
| 18 | * Accelerometer DRDY on LSM330 available only on pin 1 (see datasheet). | 18 | * Accelerometer DRDY on LSM330 available only on pin 1 (see datasheet). |
| 19 | * @open_drain: set the interrupt line to be open drain if possible. | 19 | * @open_drain: set the interrupt line to be open drain if possible. |
| 20 | * @spi_3wire: enable spi-3wire mode. | ||
| 20 | */ | 21 | */ |
| 21 | struct st_sensors_platform_data { | 22 | struct st_sensors_platform_data { |
| 22 | u8 drdy_int_pin; | 23 | u8 drdy_int_pin; |
| 23 | bool open_drain; | 24 | bool open_drain; |
| 25 | bool spi_3wire; | ||
| 24 | }; | 26 | }; |
| 25 | 27 | ||
| 26 | #endif /* ST_SENSORS_PDATA_H */ | 28 | #endif /* ST_SENSORS_PDATA_H */ |
