aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio/common/st_sensors.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/iio/common/st_sensors.h')
-rw-r--r--include/linux/iio/common/st_sensors.h9
1 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 6670c3d25c58..d029ffac0d69 100644
--- a/include/linux/iio/common/st_sensors.h
+++ b/include/linux/iio/common/st_sensors.h
@@ -37,6 +37,7 @@
37#define ST_SENSORS_DEFAULT_AXIS_ADDR 0x20 37#define ST_SENSORS_DEFAULT_AXIS_ADDR 0x20
38#define ST_SENSORS_DEFAULT_AXIS_MASK 0x07 38#define ST_SENSORS_DEFAULT_AXIS_MASK 0x07
39#define ST_SENSORS_DEFAULT_AXIS_N_BIT 3 39#define ST_SENSORS_DEFAULT_AXIS_N_BIT 3
40#define ST_SENSORS_DEFAULT_STAT_ADDR 0x27
40 41
41#define ST_SENSORS_MAX_NAME 17 42#define ST_SENSORS_MAX_NAME 17
42#define ST_SENSORS_MAX_4WAI 7 43#define ST_SENSORS_MAX_4WAI 7
@@ -121,6 +122,9 @@ struct st_sensor_bdu {
121 * @mask_int2: mask to enable/disable IRQ on INT2 pin. 122 * @mask_int2: mask to enable/disable IRQ on INT2 pin.
122 * @addr_ihl: address to enable/disable active low on the INT lines. 123 * @addr_ihl: address to enable/disable active low on the INT lines.
123 * @mask_ihl: mask to enable/disable active low on the INT lines. 124 * @mask_ihl: mask to enable/disable active low on the INT lines.
125 * @addr_od: address to enable/disable Open Drain on the INT lines.
126 * @mask_od: mask to enable/disable Open Drain on the INT lines.
127 * @addr_stat_drdy: address to read status of DRDY (data ready) interrupt
124 * struct ig1 - represents the Interrupt Generator 1 of sensors. 128 * struct ig1 - represents the Interrupt Generator 1 of sensors.
125 * @en_addr: address of the enable ig1 register. 129 * @en_addr: address of the enable ig1 register.
126 * @en_mask: mask to write the on/off value for enable. 130 * @en_mask: mask to write the on/off value for enable.
@@ -131,6 +135,9 @@ struct st_sensor_data_ready_irq {
131 u8 mask_int2; 135 u8 mask_int2;
132 u8 addr_ihl; 136 u8 addr_ihl;
133 u8 mask_ihl; 137 u8 mask_ihl;
138 u8 addr_od;
139 u8 mask_od;
140 u8 addr_stat_drdy;
134 struct { 141 struct {
135 u8 en_addr; 142 u8 en_addr;
136 u8 en_mask; 143 u8 en_mask;
@@ -212,6 +219,7 @@ struct st_sensor_settings {
212 * @odr: Output data rate of the sensor [Hz]. 219 * @odr: Output data rate of the sensor [Hz].
213 * num_data_channels: Number of data channels used in buffer. 220 * num_data_channels: Number of data channels used in buffer.
214 * @drdy_int_pin: Redirect DRDY on pin 1 (1) or pin 2 (2). 221 * @drdy_int_pin: Redirect DRDY on pin 1 (1) or pin 2 (2).
222 * @int_pin_open_drain: Set the interrupt/DRDY to open drain.
215 * @get_irq_data_ready: Function to get the IRQ used for data ready signal. 223 * @get_irq_data_ready: Function to get the IRQ used for data ready signal.
216 * @tf: Transfer function structure used by I/O operations. 224 * @tf: Transfer function structure used by I/O operations.
217 * @tb: Transfer buffers and mutex used by I/O operations. 225 * @tb: Transfer buffers and mutex used by I/O operations.
@@ -233,6 +241,7 @@ struct st_sensor_data {
233 unsigned int num_data_channels; 241 unsigned int num_data_channels;
234 242
235 u8 drdy_int_pin; 243 u8 drdy_int_pin;
244 bool int_pin_open_drain;
236 245
237 unsigned int (*get_irq_data_ready) (struct iio_dev *indio_dev); 246 unsigned int (*get_irq_data_ready) (struct iio_dev *indio_dev);
238 247