]> git.baikalelectronics.ru Git - kernel.git/commitdiff
iio: light: cm32181: Add support for ACPI enumeration
authorHans de Goede <hdegoede@redhat.com>
Tue, 28 Apr 2020 17:29:14 +0000 (19:29 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 10 May 2020 09:38:40 +0000 (10:38 +0100)
Add support for ACPI enumeration, this has been tested on a HP
HP Pavilion x2 Detachable 10 (Bay Trail model).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/cm32181.c

index 9fcc8c9548dfe0555a923601b813586d7fb6399a..e20bc9912f8d182180c183b274a375afb3d3fc10 100644 (file)
@@ -344,9 +344,18 @@ static const struct of_device_id cm32181_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, cm32181_of_match);
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id cm32181_acpi_match[] = {
+       { "CPLM3218", 0 },
+       { }
+};
+MODULE_DEVICE_TABLE(acpi, cm32181_acpi_match);
+#endif
+
 static struct i2c_driver cm32181_driver = {
        .driver = {
                .name   = "cm32181",
+               .acpi_match_table = ACPI_PTR(cm32181_acpi_match),
                .of_match_table = cm32181_of_match,
        },
        .probe_new      = cm32181_probe,