From: andy.shevchenko@gmail.com
To: Gwendal Grignou <gwendal@chromium.org>
Cc: jic23@kernel.org, swboyd@chromium.org, linux-iio@vger.kernel.org
Subject: Re: [PATCH v2] iio: proximity: sx_common: Add old register mapping
Date: Sun, 15 Jan 2023 20:24:17 +0200 [thread overview]
Message-ID: <Y8RE0QBbNWbfwi0l@surfacebook> (raw)
In-Reply-To: <20221220193926.126366-1-gwendal@chromium.org>
Tue, Dec 20, 2022 at 11:39:26AM -0800, Gwendal Grignou kirjoitti:
> Older firmwares still send sensor configuration using a list of
> registers with opaque values defined during sensor tuning.
> sx9234 and sx9360 sensor on ACPI based devices are concerned.
> More schema to configure the sensors will be needed to support devices
> designed for windows, like Samsung Galaxy Book2.
>
> Support schema is: "<_HID>.<register_name>". For instance
> "STH9324,reg_adv_ctrl2" in:
>
> Scope (\_SB.PCI0.I2C2)
> {
> Device (SX28)
> {
> Name (_HID, "STH9324") // _HID: Hardware ID
> ...
> Name (_DSD, Package (0x02) // _DSD: Device-Specific Data
> {
> ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /*
> Device Properties for _DSD */,
> Package (0x3F)
> {
> ...
> Package (0x02)
> {
> "STH9324,reg_adv_ctrl2",
> Zero
> },`
...
Can we use acpi_device_hid() from the ACPI companion device instead of calling
acpi_match_device()?
Note that in this case you won't need half of this patch that passes acpi_id
here and there.
...
> + scnprintf(prop, ARRAY_SIZE(prop), "%s,reg_%s", id->id, reg_def->property);
Why c? The regular snprintf() will work the same since you haven't checked for
the error.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-01-15 18:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-20 19:39 [PATCH v2] iio: proximity: sx_common: Add old register mapping Gwendal Grignou
2022-12-23 15:40 ` Jonathan Cameron
2023-01-14 17:24 ` Jonathan Cameron
2023-01-11 18:45 ` Stephen Boyd
2023-01-15 18:24 ` andy.shevchenko [this message]
2023-01-16 17:33 ` 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=Y8RE0QBbNWbfwi0l@surfacebook \
--to=andy.shevchenko@gmail.com \
--cc=gwendal@chromium.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=swboyd@chromium.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