summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>2015-04-19 02:10:04 -0700
committerJonathan Cameron <jic23@kernel.org>2015-04-19 13:44:28 +0100
commit772154d0ddde6b46a3866c73a16cfbfaf3053be4 (patch)
tree21ec38e04192de1a2b451d948b15c26670466123 /drivers
parenteea53b4a2562e439bfc1a6d13b231f902d9b9e5f (diff)
iio: ltr501: Add ACPI enumeration support
Added ACPI enumeration support for LTR501 chip. Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/light/ltr501.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c
index d9b4536f0067..0162e8652118 100644
--- a/drivers/iio/light/ltr501.c
+++ b/drivers/iio/light/ltr501.c
@@ -17,6 +17,7 @@
#include <linux/err.h>
#include <linux/delay.h>
#include <linux/regmap.h>
+#include <linux/acpi.h>
#include <linux/iio/iio.h>
#include <linux/iio/events.h>
@@ -1264,6 +1265,12 @@ static int ltr501_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(ltr501_pm_ops, ltr501_suspend, ltr501_resume);
+static const struct acpi_device_id ltr_acpi_match[] = {
+ {"LTER0501", 0},
+ { },
+};
+MODULE_DEVICE_TABLE(acpi, ltr_acpi_match);
+
static const struct i2c_device_id ltr501_id[] = {
{ "ltr501", 0 },
{ }
@@ -1274,6 +1281,7 @@ static struct i2c_driver ltr501_driver = {
.driver = {
.name = LTR501_DRV_NAME,
.pm = &ltr501_pm_ops,
+ .acpi_match_table = ACPI_PTR(ltr_acpi_match),
.owner = THIS_MODULE,
},
.probe = ltr501_probe,