Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: andy.shevchenko@gmail.com
Cc: Gwendal Grignou <gwendal@chromium.org>,
	swboyd@chromium.org, linux-iio@vger.kernel.org
Subject: Re: [PATCH v2] iio: proximity: sx_common: Add old register mapping
Date: Mon, 16 Jan 2023 17:33:45 +0000	[thread overview]
Message-ID: <20230116173346.43c1ee20@jic23-huawei> (raw)
In-Reply-To: <Y8RE0QBbNWbfwi0l@surfacebook>

On Sun, 15 Jan 2023 20:24:17 +0200
andy.shevchenko@gmail.com wrote:

> 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.
> 
Dropped this patch for now so this discussion can continue.

Jonathan


      reply	other threads:[~2023-01-16 17:42 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
2023-01-16 17:33   ` Jonathan Cameron [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=20230116173346.43c1ee20@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=gwendal@chromium.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