linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Stephan Gerhold <stephan@gerhold.net>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	Bastien Nocera <hadess@hadess.net>,
	Hans de Goede <hdegoede@redhat.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v3 08/10] dt-bindings: iio: bma255: Allow multiple interrupts
Date: Fri, 11 Jun 2021 18:59:41 +0100	[thread overview]
Message-ID: <20210611185941.3487efc6@jic23-huawei> (raw)
In-Reply-To: <20210611080903.14384-9-stephan@gerhold.net>

On Fri, 11 Jun 2021 10:09:01 +0200
Stephan Gerhold <stephan@gerhold.net> 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@linaro.org>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
>  .../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.


  reply	other threads:[~2021-06-11 17:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11  8:08 [PATCH v3 00/10] iio: accel: bmc150: Add support for BMA253/BMA254 Stephan Gerhold
2021-06-11  8:08 ` [PATCH v3 01/10] iio: accel: bmc150: Fix bma222 scale unit Stephan Gerhold
2021-06-11  8:08 ` [PATCH v3 02/10] iio: accel: bmc150: Clarify combo modules in Kconfig Stephan Gerhold
2021-06-11  8:08 ` [PATCH v3 03/10] iio: accel: bmc150: Drop misleading/duplicate chip identifiers Stephan Gerhold
2021-06-11  8:08 ` [PATCH v3 04/10] iio: accel: bmc150: Drop duplicated documentation of supported chips Stephan Gerhold
2021-06-11  8:08 ` [PATCH v3 05/10] iio: accel: bmc150: Sort all chip names alphabetically / by chip ID Stephan Gerhold
2021-06-11  8:08 ` [PATCH v3 06/10] dt-bindings: iio: accel: bma255: Document bosch,bma253 Stephan Gerhold
2021-06-11  8:09 ` [PATCH v3 07/10] iio: accel: bmc150: Add device IDs for BMA253 Stephan Gerhold
2021-06-11  8:09 ` [PATCH v3 08/10] dt-bindings: iio: bma255: Allow multiple interrupts Stephan Gerhold
2021-06-11 17:59   ` Jonathan Cameron [this message]
2021-06-11 18:21     ` Stephan Gerhold
2021-06-11 18:26       ` Jonathan Cameron
2021-06-11 19:21         ` Stephan Gerhold
2021-06-11  8:09 ` [PATCH v3 09/10] dt-bindings: iio: accel: bma180/bma255: Move bma254 to bma255 schema Stephan Gerhold
2021-06-11  8:09 ` [PATCH v3 10/10] iio: accel: bma180/bmc150: Move BMA254 to bmc150-accel driver Stephan Gerhold
2021-06-11 17:35 ` [PATCH v3 00/10] iio: accel: bmc150: Add support for BMA253/BMA254 Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210611185941.3487efc6@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hadess@hadess.net \
    --cc=hdegoede@redhat.com \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=stephan@gerhold.net \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).