Re: [PATCH v2 3/4] iio: accel: bmc150: Make it possible to configure INT2 instead of INT1

Linus Walleij
2021-08-03T23:35:05Z

On Mon, Aug 2, 2021 at 5:57 PM Stephan Gerhold <stephan@gerhold.net> wrote:

> 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>

Looks good
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij