From: Hans de Goede <hdegoede@redhat.com>
To: Jonathan Cameron <jic23@kernel.org>, J Lo <jlobue10@gmail.com>
Cc: linux-iio@vger.kernel.org,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"jagath jogj" <jagathjog1996@gmail.com>,
"Luke Jones" <luke@ljones.dev>,
"Denis Benato" <benato.denis96@gmail.com>,
"Antheas Kapenekakis" <lkml@antheas.dev>,
"Derek John Clark" <derekjohn.clark@gmail.com>
Subject: Re: [PATCH v5 0/2] Add bmi323 support for ASUS ROG ALLY
Date: Fri, 16 Feb 2024 13:01:37 +0100 [thread overview]
Message-ID: <343952bf-8222-41ec-8eca-13e1008efaa2@redhat.com> (raw)
In-Reply-To: <20240216113545.33b46e19@jic23-huawei>
Hi Jonathan,
On 2/16/24 12:35, Jonathan Cameron wrote:
> On Thu, 15 Feb 2024 10:19:52 -0800
> J Lo <jlobue10@gmail.com> wrote:
>
>> From: Jonathan LoBue <jlobue10@gmail.com>
>
> Hi Jonathan
>
> Cover letter should always include at least a short overview of what
> the patch is doing.
>
> Long term this solution may be a pain to maintain.
> The reasoning is the DT path where we have moved over time to allow
> for fallback compatibles (same concept exists in ACPI even if it is
> little used) to be used even if we don't recognise a ID read from
> the chip. The intent being to allow old kernels to work with new
> devices where they really are backwards compatible.
>
> If that gets fixed in these drivers, we will have to explicitly
> exclude ACPI IDs.
>
> Hopefully we'll pick up such issues in review though so this should be fine.
>
> I'd like input from Hans though on whether this solution of duplicating
> the IDs generally works out longer term and is appropriate here.
The BOSC0200 ACPI ID is used in a lot of devices and the ACPI
tables of these devices are not under our control. So we really
have no other option.
Having 2 different drivers match/bind to the same (ACPI or other)
id/device is not unheard of. As long as the probe() method then figures
out it is not the right device and cleanly exits then this is fine.
I'll run a test with patch 2/2 + the bmi323 driver enabled
on a device with a BOSC0200 ACPI id which does actually need
the bmc150 driver to make sure that the bmi323 driver properly
refuses to bind there.
I do see that both drivers write to a reset-register before reading
the id register and those registers are different ...
Looking at the registers used for reset then on the bmc150 it
seems that the bmi323 code is writing the last bytes of the fifo
which should be fine.
And when the bmc150 code is trying to reset a bmi323 it is
writing to the BMI323_FEAT_IO_STATUS_REG. Since the bmi323
driver does a reset itself and programs that register
during init I guess that should be fine to since the value
written by bmc150's probe() will be overwritten.
I'll get back to with test results of letting the bmi323 driver
probe a BOSC0200 (*) device, before the bmc150 driver probes
it and see if things still work then.
Regards,
Hans
*) which will typically be a BMA250E
>> Changes since v4:
>> - Fixed comment location in bmc150.
>> - Fixed signed off by portion.
>>
>> Jonathan LoBue (2):
>> iio: accel: bmc150: Duplicate ACPI entries
>> iio: imu: bmi323: Add and enable ACPI Match Table
>>
>> drivers/iio/accel/bmc150-accel-i2c.c | 13 +++++++++++++
>> drivers/iio/imu/bmi323/bmi323_i2c.c | 20 ++++++++++++++++++++
>> 2 files changed, 33 insertions(+)
>> --
>> 2.43.0
>
prev parent reply other threads:[~2024-02-16 12:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 18:19 [PATCH v5 0/2] Add bmi323 support for ASUS ROG ALLY J Lo
2024-02-15 18:24 ` [PATCH v5 1/2] iio: accel: bmc150: Duplicate ACPI entries Jonathan LoBue
2024-02-16 11:37 ` Jonathan Cameron
2024-02-16 14:30 ` Jonathan LoBue
2024-02-16 15:49 ` Jonathan Cameron
2024-02-15 18:24 ` [PATCH v5 2/2] iio: imu: bmi323: Add and enable ACPI Match Table Jonathan LoBue
2024-02-16 11:41 ` Jonathan Cameron
2024-02-16 11:35 ` [PATCH v5 0/2] Add bmi323 support for ASUS ROG ALLY Jonathan Cameron
2024-02-16 12:01 ` Hans de Goede [this message]
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=343952bf-8222-41ec-8eca-13e1008efaa2@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy.shevchenko@gmail.com \
--cc=benato.denis96@gmail.com \
--cc=derekjohn.clark@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jagathjog1996@gmail.com \
--cc=jic23@kernel.org \
--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