public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Justin Weiss <justin@justinweiss.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Derek J . Clark" <derekjohn.clark@gmail.com>,
	"Philip Müller" <philm@manjaro.org>,
	"Alex Lanzano" <lanzano.alex@gmail.com>
Subject: Re: [PATCH v3 4/6] iio: imu: bmi270: Add support for BMI260
Date: Tue, 22 Oct 2024 19:54:03 +0300	[thread overview]
Message-ID: <ZxfYq1Eo2xhVhIei@smile.fi.intel.com> (raw)
In-Reply-To: <87msiwm90s.fsf@justinweiss.com>

On Tue, Oct 22, 2024 at 08:50:43AM -0700, Justin Weiss wrote:
> Justin Weiss <justin@justinweiss.com> writes:

...

> The ACPI IDs with device pointers are here:
> 
> > +static const struct acpi_device_id bmi270_acpi_match[] = {
> > +	/* OrangePi NEO */
> > +	{ "BMI0260",  (kernel_ulong_t)&bmi260_chip_info },
> > +	/* GPD Win Mini, Aya Neo AIR Pro, OXP Mini Pro, etc. */
> > +	{ "BMI0160",  (kernel_ulong_t)&bmi260_chip_info },
> > +	/* GPD Win Max 2 */
> > +	{ "10EC5280", (kernel_ulong_t)&bmi260_chip_info },
> > +	{ }

Cool! But please, keep them alphabetically ordered by ID.

Can we push OrangePI NED to go and fix ACPI IDs eventually?

> > +};
> 
> I pulled DSDT device excerpts for the GPD Win Mini (which uses the
> BMI0160 ACPI ID, even though it has a bmi260) and the OrangePi NEO
> (which uses the BMI0260 ACPI ID).
> 
> I couldn't find a shipping device with a bmi260 using the 10EC5280 ACPI
> ID. Some prototype devices with the bmi260 may have used them:
> https://lore.kernel.org/all/CAFqHKTm2WRNkcSoBEE=oNbfu_9d9RagQHLydmv6q1=snO_MXyA@mail.gmail.com/
> 
> I can remove that ID from this changeset for now.

Yes, please do not add anything that has no evidence of existence in the wild
or approved vendor allocated ID.

> GPD Win Mini:

Add short parts of these to the commit message, or better split these to two
patches each of them adding a new ID to the table.

See below what I do want to see there (no need to have everything),
i.e. I removed unneeded lines:

> Device (BMI2)
> {
>     Name (_ADR, Zero)  // _ADR: Address

My gosh, can this be fixed (seems rhetorical)? The _ADR must NOT be present
together with _HID.  It's against the ACPI specifications.

>     Name (_HID, "BMI0160")  // _HID: Hardware ID
>     Name (_CID, "BMI0160")  // _CID: Compatible ID
>     Name (_DDN, "Accelerometer")  // _DDN: DOS Device Name
>     Name (_UID, One)  // _UID: Unique ID
>     Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
>     {
>         Name (RBUF, ResourceTemplate ()
>         {
>             I2cSerialBusV2 (0x0068, ControllerInitiated, 0x00061A80,
>                 AddressingMode7Bit, "\\_SB.I2CB",
>                 0x00, ResourceConsumer, , Exclusive,
>                 )
>             GpioInt (Edge, ActiveLow, Exclusive, PullDefault, 0x0000,
>                 "\\_SB.GPIO", 0x00, ResourceConsumer, ,
>                 )
>                 {   // Pin list
>                     0x008B
>                 }
>         })
>         Return (RBUF) /* \_SB_.I2CB.BMI2._CRS.RBUF */
>     }
      ...
> }
> 

> OrangePi NEO:

Same comments for this device.

...

> > +static const struct acpi_device_id bmi270_acpi_match[] = {
> > +	{ "BOSC0260",  (kernel_ulong_t)&bmi260_chip_info },
> > +	{ }
> > +};
> 
> I can't find any evidence of BOSC0260 being used, besides existing in
> the Windows driver. As suggested in an earlier review, I added it here
> to encourage people looking at this driver in the future to use the
> correct ACPI ID.

Are you official representative of Bosch or do you have a proof by the vendor
that they allocated this ID? Otherwise we may NOT allocate IDs on their behalf
and has not to be added.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-10-22 16:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-20 22:00 [PATCH v3 0/6] Add i2c driver for Bosch BMI260 IMU Justin Weiss
2024-10-20 22:00 ` [PATCH v3 1/6] iio: imu: bmi270: Remove unused FREQUENCY / SCALE attributes Justin Weiss
2024-10-22 18:41   ` Jonathan Cameron
2024-10-20 22:00 ` [PATCH v3 2/6] iio: imu: bmi270: Provide chip info as configuration structure Justin Weiss
2024-10-22 18:43   ` Jonathan Cameron
2024-10-20 22:00 ` [PATCH v3 3/6] dt-bindings: iio: imu: bmi270: Add Bosch BMI260 Justin Weiss
2024-10-21  7:38   ` Krzysztof Kozlowski
2024-10-22 15:51     ` Justin Weiss
2024-10-20 22:00 ` [PATCH v3 4/6] iio: imu: bmi270: Add support for BMI260 Justin Weiss
2024-10-22 15:50   ` Justin Weiss
2024-10-22 16:54     ` Andy Shevchenko [this message]
2024-10-22 19:34       ` Jonathan Cameron
2024-10-25 15:42         ` Justin Weiss
2024-10-25 16:34           ` Andy Shevchenko
2024-10-24  6:40     ` Philip Müller
2024-10-24  7:01       ` Andy Shevchenko
2024-10-20 22:00 ` [PATCH v3 5/6] iio: imu: bmi270: Add triggered buffer for Bosch BMI270 IMU Justin Weiss
2024-10-20 22:00 ` [PATCH v3 6/6] iio: imu: bmi270: Add scale and sampling frequency to " Justin Weiss

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=ZxfYq1Eo2xhVhIei@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=conor+dt@kernel.org \
    --cc=derekjohn.clark@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=justin@justinweiss.com \
    --cc=krzk+dt@kernel.org \
    --cc=lanzano.alex@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philm@manjaro.org \
    --cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox