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

x86 boards may use ACPI HID "TXN1010" to for hdc100x device.

So add an ACPI match table for that accordingly.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
v2:
 - Change the ID to follow ACPI Spec
 - Add __maybe_unused to avoid compiler warning

 drivers/iio/humidity/hdc100x.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
index 9e0fce917ce4c..c6c71ca1d2017 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -417,10 +417,18 @@ static const struct of_device_id hdc100x_dt_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, hdc100x_dt_ids);
 
+static const struct acpi_device_id __maybe_unused hdc100x_acpi_match[] = {
+	{ "TXN1010" },
+	{ },
+};
+
+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 = ACPI_PTR(hdc100x_acpi_match),
 	},
 	.probe = hdc100x_probe,
 	.id_table = hdc100x_id,
-- 
2.33.1


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

end of thread, other threads:[~2022-01-07 10:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06  4:12 [PATCH v2] iio: humidity: hdc100x: Add ACPI HID table Kai-Heng Feng
2022-01-06 14:32 ` Andy Shevchenko
2022-01-07  4:14   ` Kai-Heng Feng
2022-01-07 10:35     ` Andy Shevchenko

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.