From: Stephan Gerhold <stephan@gerhold.net>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Rob Herring <robh+dt@kernel.org>,
linux-iio <linux-iio@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>
Subject: Re: [PATCH] dt-bindings: iio: accel: bma255: Fix bmc150/bmi055 compatible
Date: Wed, 2 Dec 2020 15:07:51 +0100 [thread overview]
Message-ID: <X8eft05jIxD382Mt@gerhold.net> (raw)
In-Reply-To: <CACRpkdYu77Tcv9bk8q_BfKmien0S2sRg3Kicd_AeSrzrKD+Ywg@mail.gmail.com>
On Wed, Dec 02, 2020 at 01:08:57PM +0100, Linus Walleij wrote:
> On Wed, Dec 2, 2020 at 9:36 AM Stephan Gerhold <stephan@gerhold.net> wrote:
>
> > The bmc150-accel-i2c.c driver has an "_accel" suffix for the
> > compatibles of BMC150 and BMI055. This is necessary because BMC150
> > contains both accelerometer (bosch,bmc150_accel) and magnetometer
> > (bosch,bmc150_magn) and therefore "bosch,bmc150" would be ambiguous.
> >
> > However, the binding documentation suggests using "bosch,bmc150".
> > Add the "_accel" suffix for BMC150 and BMI055 so the binding docs
> > match what is expected by the driver.
> >
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Fixes: 496a39526fce8 ("iio: accel: bmc150-accel: Add DT bindings")
> > Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
>
> I see this pattern elsewhere so by tradition:
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> I suppose this is one of those situations where the two parts of the
> component are on the same physical I2C bus, and phsycially inside
> the same package, but accessed at two different I2C addresses?
>
Yep, it looks like this (from
arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi):
&blsp_i2c2 {
status = "okay";
accelerometer@10 {
compatible = "bosch,bmc150_accel";
reg = <0x10>;
interrupt-parent = <&msmgpio>;
interrupts = <115 IRQ_TYPE_EDGE_RISING>;
};
magnetometer@12 {
compatible = "bosch,bmc150_magn";
reg = <0x12>;
};
};
They look pretty much like separate components in the device tree.
> These components are kind of ambiguous by nature. Technically
> both devices could have the same compatible (by the label on the
> package) but then we would need some other property on the node
> to say which compatible is for which part of the component,
> so tagging on "_function" like bmc150_accel and bmc150_magn
> is one way to solve this, and I don't know anything better.
>
The _accel and _magn compatibles are also actively used already, so
unless there is a significantly better option I think it's better to
keep existing uses working.
Thanks!
Stephan
next prev parent reply other threads:[~2020-12-02 14:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 8:35 [PATCH] dt-bindings: iio: accel: bma255: Fix bmc150/bmi055 compatible Stephan Gerhold
2020-12-02 12:08 ` Linus Walleij
2020-12-02 14:07 ` Stephan Gerhold [this message]
2020-12-09 18:17 ` Rob Herring
2020-12-13 13:25 ` Jonathan Cameron
2021-01-14 20:59 ` Jonathan Cameron
2021-01-15 8:37 ` Stephan Gerhold
2021-01-15 13:56 ` 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=X8eft05jIxD382Mt@gerhold.net \
--to=stephan@gerhold.net \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.