iio: st_sensors: support open drain mode
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 14 Apr 2016 08:45:21 +0000 (10:45 +0200)
committerJonathan Cameron <jic23@kernel.org>
Tue, 19 Apr 2016 18:58:13 +0000 (19:58 +0100)
commit0e6f6871a1591f4bb0971809c45bc91a991f1967
tree45aa87a59f586c7aff129809ca3cc017b4d36895
parent97865fe41322d83dac4373fe0a0de5b1a1b318c5
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>
Documentation/devicetree/bindings/iio/st-sensors.txt
drivers/iio/accel/st_accel_core.c
drivers/iio/common/st_sensors/st_sensors_core.c
drivers/iio/common/st_sensors/st_sensors_trigger.c
drivers/iio/pressure/st_pressure_core.c
include/linux/iio/common/st_sensors.h
include/linux/platform_data/st_sensors_pdata.h