public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jesus Gonzalez <jesusmgh@gmail.com>
Cc: jic23@kernel.org, lars@metafoo.de, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/1] Add 10EC5280 to bmi160_i2c ACPI IDs to allow binding on some devices
Date: Wed, 7 Feb 2024 15:54:50 +0200	[thread overview]
Message-ID: <ZcOLql2RGmPP10EY@smile.fi.intel.com> (raw)
In-Reply-To: <20240206171132.35000-2-jesusmgh@gmail.com>

On Tue, Feb 06, 2024 at 06:11:33PM +0100, Jesus Gonzalez wrote:
> "10EC5280" is used by several manufacturers like Lenovo, GPD, or AYA (and
> probably others) in their ACPI table as the ID for the bmi160 IMU. This
> means the bmi160_i2c driver won't bind to it, and the IMU is unavailable
> to the user. Manufacturers have been approached on several occasions to
> try getting a BIOS with a fixed ID, mostly without actual positive
> results, and since affected devices are already a few years old, this is
> not expected to change. This patch enables using the bmi160_i2c driver for
> the bmi160 IMU on these devices.
> 
> Here is the relevant extract from the DSDT of a GPD Win Max 2 (AMD 6800U
> model) with the latest firmware 1.05 installed. GPD sees this as WONTFIX
> with the argument of the device working with the Windows drivers.
> 
> 	Device (BMA2)
> 	{
> 	    Name (_ADR, Zero)  // _ADR: Address
> 	    Name (_HID, "10EC5280")  // _HID: Hardware ID
> 	    Name (_CID, "10EC5280")  // _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 (0x0069, ControllerInitiated, 0x00061A80,
> 		        AddressingMode7Bit, "\\_SB.I2CC",
> 		        0x00, ResourceConsumer, , Exclusive,
> 		        )
> 		})
> 		Return (RBUF) /* \_SB_.I2CC.BMA2._CRS.RBUF */
> 	    }
> 	    
> 	    ...
> 	    
> 	}

...

> +/*
> + * FIRMWARE BUG WORKAROUND: ID "10EC5280"
> + * Some manufacturers like GPD, Lenovo or Aya used the incorrect
> + * ID "10EC5280" for bmi160 in their DSDT. A fixed firmware is not
> + * available as of Feb 2024 after trying to work with OEMs, and
> + * this is not expected to change anymore since at least some of
> + * the affected devices are from 2021/2022.
> + */

The location of the comment is wrong, it should be...

>  static const struct acpi_device_id bmi160_acpi_match[] = {

...here as you have had it previously. Just make sure it properly formed.

Maybe Jonathan can amend when applying, dunno.

> +	{"10EC5280", 0},
>  	{"BMI0160", 0},
>  	{ },

With the comment in the proper location,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-02-07 13:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 13:50 [PATCH 1/1] Add 10EC5280 to bmi160_i2c ACPI IDs to allow binding on some devices Andy Shevchenko
2024-02-05 18:36 ` [PATCH v2 " Jesus Gonzalez
2024-02-06 12:35   ` Andy Shevchenko
2024-02-06 17:11     ` [PATCH v3 " Jesus Gonzalez
2024-02-07 13:54       ` Andy Shevchenko [this message]
2024-02-07 19:55         ` [PATCH v4 " Jesus Gonzalez
2024-02-08 10:58           ` Andy Shevchenko
2024-02-10 16:02           ` Jonathan Cameron
2024-02-19 19:16             ` Jesus Miguel Gonzalez Herrero

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=ZcOLql2RGmPP10EY@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=jesusmgh@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.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