Re: [PATCH v3 08/10] dt-bindings: iio: bma255: Allow multiple interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 11 Jun 2021 10:09:01 +0200
Stephan Gerhold <stephan@xxxxxxxxxxx> wrote:

> BMA253 has two interrupt pins (INT1 and INT2) that can be configured
> independently. At the moment the bmc150-accel driver does not make use
> of them but it might be able to in the future, so it's useful to already
> specify all available interrupts in the device tree.
> 
> Set maxItems: 2 for interrupts to allow specifying a second one.
> This is necessary as preparation to move the bosch,bma254 compatible
> from bosch,bma180.yaml to bosch,bma255.yaml since bma180 allows two
> interrupts, but BMA254 is better supported by the bmc150-accel driver.
> 
> Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
> Signed-off-by: Stephan Gerhold <stephan@xxxxxxxxxxx>
> ---
>  .../devicetree/bindings/iio/accel/bosch,bma255.yaml        | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
> index 8afb0fe8ef5c..65b299a5619b 100644
> --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
> @@ -32,7 +32,12 @@ properties:
>    vddio-supply: true
>  
>    interrupts:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2
> +    description: |
> +      The first interrupt listed must be the one connected to the INT1 pin,
> +      the second (optional) interrupt listed must be the one connected to the
> +      INT2 pin (if available).

As this is a direct copy from the bma180 binding and we are moving devices
from one to the other, we need to support this as the default.
Longer term, from the bma253 datasheet, it look looks the two pins are equally
capable so if we get a board where only the int2 pin is connected then we will
need to use interrupt-names to distinguish the two (as we do in other drivers).

Another thing to note is that we don't have to have separate binding docs just
because we have separate drivers. At somepoint we might want to consider just
fusing the two docs.
 
Anyhow, work for another day!

Jonathan


>  
>    mount-matrix:
>      description: an optional 3x3 mounting rotation matrix.




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux