summaryrefslogtreecommitdiff
path: root/drivers/iio/accel/bmc150-accel-spi.c
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2021-08-02 17:56:56 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-08-08 16:48:30 +0100
commit73d672e63f3062e987f9c92abdeb332e280f47db (patch)
tree5946e4a6986bcc00bcc7d8c800769f1f5fcc7ef4 /drivers/iio/accel/bmc150-accel-spi.c
parent02104141f3fa08c0b8d3924e0db4744212ed5b9a (diff)
iio: accel: bmc150: Make it possible to configure INT2 instead of INT1
Some Bosch accelerometers have two interrupt pins (INT1 and INT2). At the moment, the driver uses only the first one, which is fine for most situations. However, some boards might only have INT2 connected for some reason. Add the necessary bits and configuration to set up INT2. Then try to detect this situation at least for device tree setups by checking if the first interrupt (the one picked by the I2C/SPI core) is actually named "INT2" using the interrupt-names property. of_irq_get_byname() returns either 0 or some error code in case the driver probed without device tree, so in all other cases we fall back to configuring INT1 as before. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210802155657.102766-4-stephan@gerhold.net Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel/bmc150-accel-spi.c')
0 files changed, 0 insertions, 0 deletions