From: Jonathan Cameron <jic23@kernel.org>
To: Jonathan LoBue <jlobue10@gmail.com>
Cc: jagathjog1996@gmail.com, luke@ljones.dev,
benato.denis96@gmail.com, linux-iio@vger.kernel.org,
Andy Shevchenko <andy.shevchenko@gmail.com>,
lkml@antheas.dev
Subject: Re: [PATCH 2/2] iio: imu: bmi323: Add and enable ACPI Match Table
Date: Sun, 11 Feb 2024 16:31:18 +0000 [thread overview]
Message-ID: <20240211163118.5c306a13@jic23-huawei> (raw)
In-Reply-To: <4956451.31r3eYUQgx@nobara-ally-pc>
On Sat, 10 Feb 2024 14:34:11 -0800
Jonathan LoBue <jlobue10@gmail.com> wrote:
> From c65d1ef44d749958f02d2b9a50a0e788b4497854 Mon Sep 17 00:00:00 2001
> From: Jonathan LoBue <jlobue10@gmail.com>
> Date: Sat, 10 Feb 2024 12:31:54 -0800
> Subject: [PATCH 2/2] iio: imu: bmi323: Add and enable ACPI Match Table
>
> This patch adds the ACPI match table for ASUS ROG ALLY to load the bmi323
> driver with an ACPI match of "BOSC0200".
>
> Co-developed-by: Jonathan LoBue <jlobue10@gmail.com>
> Signed-off-by: Jonathan LoBue <jlobue10@gmail.com>
> Co-developed-by: Luke D. Jones <luke@ljones.dev>
> Signed-off-by: Luke D. Jones <luke@ljones.dev>
> Co-developed-by: Denis Benato <benato.denis96@gmail.com>
> Signed-off-by: Denis Benato <benato.denis96@gmail.com>
> Co-developed-by: Antheas Kapenekakis <lkml@antheas.dev>
> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
This approach is sustainable or maintainable. Let's wait to see
what people think of the suggestion I made of a wrapper driver that
is capable of identifying the device and causing the correct driver
to be loaded.
If nothing else this has no DMI type protections so if this one loads on
a board where it is a BMC150 compatible part we'll end up in the same
mess you were seeing just the other way around.
Jonathan
> ---
> drivers/iio/imu/bmi323/bmi323_i2c.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/iio/imu/bmi323/bmi323_i2c.c b/drivers/iio/imu/bmi323/bmi323_i2c.c
> index 20a8001b9956..346ba2d1a169 100644
> --- a/drivers/iio/imu/bmi323/bmi323_i2c.c
> +++ b/drivers/iio/imu/bmi323/bmi323_i2c.c
> @@ -5,6 +5,7 @@
> * Copyright (C) 2023, Jagath Jog J <jagathjog1996@gmail.com>
> */
>
> +#include <linux/acpi.h>
> #include <linux/i2c.h>
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> @@ -93,6 +94,12 @@ static int bmi323_i2c_probe(struct i2c_client *i2c)
> return bmi323_core_probe(dev);
> }
>
> +static const struct acpi_device_id bmi323_acpi_match[] = {
> + {"BOSC0200"},
> + { },
> +};
> +MODULE_DEVICE_TABLE(acpi, bmi323_acpi_match);
> +
> static const struct i2c_device_id bmi323_i2c_ids[] = {
> { "bmi323" },
> { }
> @@ -109,6 +116,7 @@ static struct i2c_driver bmi323_i2c_driver = {
> .driver = {
> .name = "bmi323",
> .of_match_table = bmi323_of_i2c_match,
> + .acpi_match_table = ACPI_PTR(bmi323_acpi_match),
> },
> .probe = bmi323_i2c_probe,
> .id_table = bmi323_i2c_ids,
next prev parent reply other threads:[~2024-02-11 16:31 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 16:05 [PATCH] iio: imu: bmi323: Support loading of bmi323 driver for ASUS ROG ALLY Jonathan LoBue
2024-02-10 15:25 ` Jonathan Cameron
2024-02-10 16:23 ` Jonathan LoBue
2024-02-10 16:49 ` Jonathan Cameron
2024-02-10 20:43 ` Jonathan LoBue
2024-02-10 22:32 ` [PATCH 1/2] iio: accel: bmc150: ASUS ROG ALLY Abort Loading Jonathan LoBue
2024-02-11 17:04 ` Andy Shevchenko
2024-02-12 7:21 ` Jonathan LoBue
2024-02-12 9:46 ` Andy Shevchenko
2024-02-13 2:39 ` [PATCH v1] iio: imu: bmi323: Add and enable ACPI Match Table Jonathan LoBue
2024-02-13 10:49 ` Andy Shevchenko
2024-02-13 17:14 ` Jonathan LoBue
2024-02-13 17:29 ` Andy Shevchenko
2024-02-13 22:38 ` [PATCH v2 1/2] iio: accel: bmc150: Duplicate ACPI entries Jonathan LoBue
2024-02-14 9:35 ` Andy Shevchenko
2024-02-14 15:07 ` Jonathan LoBue
2024-02-14 15:39 ` Andy Shevchenko
2024-02-14 16:16 ` Jonathan Cameron
2024-02-13 22:39 ` [PATCH v2 2/2] iio: imu: bmi323: Add and enable ACPI Match Table Jonathan LoBue
2024-02-14 9:39 ` Andy Shevchenko
2024-02-14 15:15 ` Jonathan LoBue
2024-02-14 15:31 ` Andy Shevchenko
2024-02-14 17:35 ` Jonathan LoBue
2024-02-14 18:21 ` Andy Shevchenko
2024-02-14 16:19 ` Jonathan Cameron
2024-02-13 2:47 ` [PATCH 1/2] iio: accel: bmc150: ASUS ROG ALLY Abort Loading Jonathan LoBue
2024-02-10 22:34 ` [PATCH 2/2] iio: imu: bmi323: Add and enable ACPI Match Table Jonathan LoBue
2024-02-11 16:31 ` Jonathan Cameron [this message]
2024-02-11 17:08 ` Andy Shevchenko
2024-02-12 7:30 ` Jonathan LoBue
2024-02-12 9:50 ` Andy Shevchenko
2024-02-12 17:33 ` Jonathan LoBue
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=20240211163118.5c306a13@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=benato.denis96@gmail.com \
--cc=jagathjog1996@gmail.com \
--cc=jlobue10@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=lkml@antheas.dev \
--cc=luke@ljones.dev \
/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