]> asedeno.scripts.mit.edu Git - linux.git/commit
iio: imu: adis16480: Add support for configurable drdy indicator
authorStefan Popa <stefan.popa@analog.com>
Wed, 27 Feb 2019 16:14:22 +0000 (18:14 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 4 Apr 2019 19:19:42 +0000 (20:19 +0100)
commitcede2f899d8f85baea32ff2e8a89a97aaac339b9
tree50002066efa6d862f116a059a4819e627a420596
parentabbde2792999c9ad3514dd25d7f8d9a96034fe16
iio: imu: adis16480: Add support for configurable drdy indicator

The FNCTIO_CTRL register provides configuration control for each I/O pin
(DIO1, DIO2, DIO3 and DIO4).

This patch adds the option to configure each DIOx pin as data ready
indicator with positive or negative polarity by reading the 'interrupts'
and 'interrupt-names' properties from the devicetree. The
'interrupt-names' property is optional, if it is not specified, then the
DIO1 pin is used as default data ready signal.

Although the factory default assigns DIO2 as data ready signal, in the
versions previous this patch, DIO1 pin was used. We should leave this
configuration as is, since some devices might be expecting the interrupt
on the wrong physical pin.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/adis16480.c