[PATCH] iio: dps310: Add ACPI HID table

Kai-Heng Feng posted 1 patch 4 years, 5 months ago
drivers/iio/pressure/dps310.c | 8 ++++++++
1 file changed, 8 insertions(+)
[PATCH] iio: dps310: Add ACPI HID table
Posted by Kai-Heng Feng 4 years, 5 months ago
x86 boards may use ACPI HID "IFX3100" to for dps310 device.

So add an ACPI match table for that accordingly.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/iio/pressure/dps310.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/iio/pressure/dps310.c b/drivers/iio/pressure/dps310.c
index 0730380ceb692..ad5920b107e63 100644
--- a/drivers/iio/pressure/dps310.c
+++ b/drivers/iio/pressure/dps310.c
@@ -812,9 +812,17 @@ static const struct i2c_device_id dps310_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, dps310_id);
 
+static const struct acpi_device_id __maybe_unused dps310_acpi_match[] = {
+	{ "IFX3100" },
+	{ },
+};
+
+MODULE_DEVICE_TABLE(acpi, dps310_acpi_match);
+
 static struct i2c_driver dps310_driver = {
 	.driver = {
 		.name = DPS310_DEV_NAME,
+		.acpi_match_table = ACPI_PTR(dps310_acpi_match),
 	},
 	.probe = dps310_probe,
 	.id_table = dps310_id,
-- 
2.33.1

Re: [PATCH] iio: dps310: Add ACPI HID table
Posted by Andy Shevchenko 4 years, 5 months ago
On Thu, Jan 6, 2022 at 6:44 AM Kai-Heng Feng
<kai.heng.feng@canonical.com> wrote:
>
> x86 boards may use ACPI HID "IFX3100" to for dps310 device.
>
> So add an ACPI match table for that accordingly.

All the same comments as per hdc100x patch.

-- 
With Best Regards,
Andy Shevchenko