Re: [PATCH v2] iio: proximity: sx_common: Add old register mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 15 Jan 2023 20:24:17 +0200
andy.shevchenko@xxxxxxxxx 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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux