summaryrefslogtreecommitdiff
path: root/drivers/iio/light/al3320a.c
diff options
context:
space:
mode:
authorMarius Hoch <mail@mariushoch.de>2023-04-21 01:26:31 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-05-13 17:56:05 +0100
commit5b24fdd991e53f10514cb6a6096f76bf555ffeac (patch)
tree062f8ba35e3fc0f7168846a828c9dc42b9fe9f1f /drivers/iio/light/al3320a.c
parentb4d32eb31f49358ad9de1baed92844e7a4cc5de0 (diff)
downloadlwn-5b24fdd991e53f10514cb6a6096f76bf555ffeac.tar.gz
lwn-5b24fdd991e53f10514cb6a6096f76bf555ffeac.zip
iio: light: al3320a: Handle ACPI device CALS0001
This sensor can be found as CALS0001 on the Lenovo Yoga Tablet 2 series. Tested on a Lenovo Yoga Tablet 2 1051-F. Signed-off-by: Marius Hoch <mail@mariushoch.de> Tested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230420232631.68864-1-mail@mariushoch.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/light/al3320a.c')
-rw-r--r--drivers/iio/light/al3320a.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/iio/light/al3320a.c b/drivers/iio/light/al3320a.c
index 9ff28bbf34bb..36214d790f71 100644
--- a/drivers/iio/light/al3320a.c
+++ b/drivers/iio/light/al3320a.c
@@ -16,6 +16,7 @@
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/mod_devicetable.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
@@ -247,11 +248,18 @@ static const struct of_device_id al3320a_of_match[] = {
};
MODULE_DEVICE_TABLE(of, al3320a_of_match);
+static const struct acpi_device_id al3320a_acpi_match[] = {
+ {"CALS0001"},
+ { },
+};
+MODULE_DEVICE_TABLE(acpi, al3320a_acpi_match);
+
static struct i2c_driver al3320a_driver = {
.driver = {
.name = AL3320A_DRV_NAME,
.of_match_table = al3320a_of_match,
.pm = pm_sleep_ptr(&al3320a_pm_ops),
+ .acpi_match_table = al3320a_acpi_match,
},
.probe_new = al3320a_probe,
.id_table = al3320a_id,