diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-04-14 10:45:21 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-04-19 19:58:13 +0100 |
commit | 0e6f6871a1591f4bb0971809c45bc91a991f1967 (patch) | |
tree | 45aa87a59f586c7aff129809ca3cc017b4d36895 /include/linux/platform_data/st_sensors_pdata.h | |
parent | 97865fe41322d83dac4373fe0a0de5b1a1b318c5 (diff) | |
download | op-kernel-dev-0e6f6871a1591f4bb0971809c45bc91a991f1967.zip op-kernel-dev-0e6f6871a1591f4bb0971809c45bc91a991f1967.tar.gz |
iio: st_sensors: support open drain mode
Some types of ST Sensors can be connected to the same IRQ line
as other peripherals using open drain. Add a device tree binding
and a sensor data property to flip the right bit in the interrupt
control register to enable open drain mode on the INT line.
If the line is set to be open drain, also tag on IRQF_SHARED
to the IRQ flags when requesting the interrupt, as the whole
point of using open drain interrupt lines is to share them with
more than one peripheral (wire-or).
Cc: devicetree@vger.kernel.org
Cc: Giuseppe Barba <giuseppe.barba@st.com>
Cc: Denis Ciocca <denis.ciocca@st.com>
Acked-by: Rob Herring <rob@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/platform_data/st_sensors_pdata.h')
-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 7538391..79b0e4c 100644 --- a/include/linux/platform_data/st_sensors_pdata.h +++ b/include/linux/platform_data/st_sensors_pdata.h @@ -16,9 +16,11 @@ * @drdy_int_pin: Redirect DRDY on pin 1 (1) or pin 2 (2). * 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. */ struct st_sensors_platform_data { u8 drdy_int_pin; + bool open_drain; }; #endif /* ST_SENSORS_PDATA_H */ |