iio: mma8452: support either of the available interrupt pins
authorMartin Kepplinger <martink@posteo.de>
Thu, 15 Oct 2015 13:10:32 +0000 (15:10 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 25 Oct 2015 11:02:42 +0000 (11:02 +0000)
commitd2a3e0931a8f3b95b910096d022ffd98adbd075c
treef7625c8d23263741bdc4524d541decb531283bcf
parentc3af8a28f43315fc46753465a4e77e5619dd9f30
iio: mma8452: support either of the available interrupt pins

This change is important in order for everyone to be easily able to use the
driver for one of the supported accelerometer chips!

Until now, the driver blindly assumed that the INT1 interrupt line is wired
on a user's board. But these devices have 2 interrupt lines and can route
their interrupt sources to one of them. Now, if "INT2" is found and matches
i2c_client->irq, INT2 will be used.

The chip's default actually is INT2, which is why probably many boards will
have it wired and can make use of this.

Of course, this also falls back to assuming INT1, so for existing users
nothing will break. The new functionality is described in the bindings doc.

Signed-off-by: Martin Kepplinger <martin.kepplinger@theobroma-systems.com>
For the binding: Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Documentation/devicetree/bindings/iio/accel/mma8452.txt
drivers/iio/accel/mma8452.c
This page took 0.02568 seconds and 5 git commands to generate.