All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] iio: humidity: hdc100x: Add ACPI HID table
@ 2022-01-28  4:20 Kai-Heng Feng
  2022-01-28 13:53 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Kai-Heng Feng @ 2022-01-28  4:20 UTC (permalink / raw)
  To: jic23, lars
  Cc: andy.shevchenko, Kai-Heng Feng, Matt Ranostay, Your Name,
	Chris Lesiak, linux-iio, linux-kernel

x86 boards may use ACPI HID "TXNW1010" for the hdc100x device.

TI told us "The ACPI ID for TI is: https://uefi.org/node/1028 (TXNW),
therefore it would most likely be appropriate to use TXNW1010."

So add an ACPI match table for that accordingly.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
v3:
 - Add info from vendor
 - Drop redundant line and comma.
 - Wording change.

v2:
 - Change the ID to follow ACPI Spec
 - Add __maybe_unused to avoid compiler warning
 
 drivers/iio/humidity/hdc100x.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
index 9e0fce917ce4c..47f8e8ef56d68 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -417,10 +417,17 @@ static const struct of_device_id hdc100x_dt_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, hdc100x_dt_ids);
 
+static const struct acpi_device_id hdc100x_acpi_match[] = {
+	{ "TXNW1010" },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, hdc100x_acpi_match);
+
 static struct i2c_driver hdc100x_driver = {
 	.driver = {
 		.name	= "hdc100x",
 		.of_match_table = hdc100x_dt_ids,
+		.acpi_match_table = hdc100x_acpi_match,
 	},
 	.probe = hdc100x_probe,
 	.id_table = hdc100x_id,
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] iio: humidity: hdc100x: Add ACPI HID table
  2022-01-28  4:20 [PATCH v3] iio: humidity: hdc100x: Add ACPI HID table Kai-Heng Feng
@ 2022-01-28 13:53 ` Andy Shevchenko
  2022-01-30 13:45   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2022-01-28 13:53 UTC (permalink / raw)
  To: Kai-Heng Feng
  Cc: Jonathan Cameron, Lars-Peter Clausen, Matt Ranostay, Your Name,
	Chris Lesiak, linux-iio, Linux Kernel Mailing List

On Fri, Jan 28, 2022 at 6:21 AM Kai-Heng Feng
<kai.heng.feng@canonical.com> wrote:
>
> x86 boards may use ACPI HID "TXNW1010" for the hdc100x device.
>
> TI told us "The ACPI ID for TI is: https://uefi.org/node/1028 (TXNW),
> therefore it would most likely be appropriate to use TXNW1010."

So, they basically agree on using it, did I get it right?

> So add an ACPI match table for that accordingly.

Assuming TI is aware of the ID,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> v3:
>  - Add info from vendor
>  - Drop redundant line and comma.
>  - Wording change.
>
> v2:
>  - Change the ID to follow ACPI Spec
>  - Add __maybe_unused to avoid compiler warning
>
>  drivers/iio/humidity/hdc100x.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
> index 9e0fce917ce4c..47f8e8ef56d68 100644
> --- a/drivers/iio/humidity/hdc100x.c
> +++ b/drivers/iio/humidity/hdc100x.c
> @@ -417,10 +417,17 @@ static const struct of_device_id hdc100x_dt_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(of, hdc100x_dt_ids);
>
> +static const struct acpi_device_id hdc100x_acpi_match[] = {
> +       { "TXNW1010" },
> +       { }
> +};
> +MODULE_DEVICE_TABLE(acpi, hdc100x_acpi_match);
> +
>  static struct i2c_driver hdc100x_driver = {
>         .driver = {
>                 .name   = "hdc100x",
>                 .of_match_table = hdc100x_dt_ids,
> +               .acpi_match_table = hdc100x_acpi_match,
>         },
>         .probe = hdc100x_probe,
>         .id_table = hdc100x_id,
> --
> 2.33.1
>


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] iio: humidity: hdc100x: Add ACPI HID table
  2022-01-28 13:53 ` Andy Shevchenko
@ 2022-01-30 13:45   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2022-01-30 13:45 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Kai-Heng Feng, Lars-Peter Clausen, Matt Ranostay, Your Name,
	Chris Lesiak, linux-iio, Linux Kernel Mailing List

On Fri, 28 Jan 2022 15:53:11 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Fri, Jan 28, 2022 at 6:21 AM Kai-Heng Feng
> <kai.heng.feng@canonical.com> wrote:
> >
> > x86 boards may use ACPI HID "TXNW1010" for the hdc100x device.
> >
> > TI told us "The ACPI ID for TI is: https://uefi.org/node/1028 (TXNW),
> > therefore it would most likely be appropriate to use TXNW1010."  
> 
> So, they basically agree on using it, did I get it right?
> 
> > So add an ACPI match table for that accordingly.  
> 
> Assuming TI is aware of the ID,
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
With that assumption I'm applying this to the togreg branch of iio.git which
will be pushed out as testing for 0-day to take a look at.

Still time to pull it out before I push this out as non rebasing if
we have misunderstood the above.

Thanks,

Jonathan

> 
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > ---
> > v3:
> >  - Add info from vendor
> >  - Drop redundant line and comma.
> >  - Wording change.
> >
> > v2:
> >  - Change the ID to follow ACPI Spec
> >  - Add __maybe_unused to avoid compiler warning
> >
> >  drivers/iio/humidity/hdc100x.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
> > index 9e0fce917ce4c..47f8e8ef56d68 100644
> > --- a/drivers/iio/humidity/hdc100x.c
> > +++ b/drivers/iio/humidity/hdc100x.c
> > @@ -417,10 +417,17 @@ static const struct of_device_id hdc100x_dt_ids[] = {
> >  };
> >  MODULE_DEVICE_TABLE(of, hdc100x_dt_ids);
> >
> > +static const struct acpi_device_id hdc100x_acpi_match[] = {
> > +       { "TXNW1010" },
> > +       { }
> > +};
> > +MODULE_DEVICE_TABLE(acpi, hdc100x_acpi_match);
> > +
> >  static struct i2c_driver hdc100x_driver = {
> >         .driver = {
> >                 .name   = "hdc100x",
> >                 .of_match_table = hdc100x_dt_ids,
> > +               .acpi_match_table = hdc100x_acpi_match,
> >         },
> >         .probe = hdc100x_probe,
> >         .id_table = hdc100x_id,
> > --
> > 2.33.1
> >  
> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-30 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28  4:20 [PATCH v3] iio: humidity: hdc100x: Add ACPI HID table Kai-Heng Feng
2022-01-28 13:53 ` Andy Shevchenko
2022-01-30 13:45   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.