aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
diff options
context:
space:
mode:
authorBrian Masney <masneyb@onstation.org>2017-07-06 18:56:18 -0400
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2017-07-09 18:18:29 +0100
commite3404a632a2ab3d8a7d9ed987cf84ca48bca5290 (patch)
tree33376589f6a67fd31be0c65cf049454327636dbc /drivers/staging/iio
parentiio: adc: Add support for DLN2 ADC (diff)
downloadlinux-dev-e3404a632a2ab3d8a7d9ed987cf84ca48bca5290.tar.xz
linux-dev-e3404a632a2ab3d8a7d9ed987cf84ca48bca5290.zip
staging: iio: tsl2x7x: add of_match table for device tree support
Add device tree support for the tsl2x7x IIO driver with no custom properties. The device tree documentation is in a separate commit so that the changes to trivial-devices.txt can go in via the device tree subsystem. Signed-off-by: Brian Masney <masneyb@onstation.org> CC: Rob Herring <robh+dt@kernel.org> CC: Mark Rutland <mark.rutland@arm.com> CC: devicetree@vger.kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r--drivers/staging/iio/light/tsl2x7x.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c
index 146719928fb3..8148986b2049 100644
--- a/drivers/staging/iio/light/tsl2x7x.c
+++ b/drivers/staging/iio/light/tsl2x7x.c
@@ -2026,6 +2026,21 @@ static struct i2c_device_id tsl2x7x_idtable[] = {
MODULE_DEVICE_TABLE(i2c, tsl2x7x_idtable);
+static const struct of_device_id tsl2x7x_of_match[] = {
+ { .compatible = "amstaos,tsl2571" },
+ { .compatible = "amstaos,tsl2671" },
+ { .compatible = "amstaos,tmd2671" },
+ { .compatible = "amstaos,tsl2771" },
+ { .compatible = "amstaos,tmd2771" },
+ { .compatible = "amstaos,tsl2572" },
+ { .compatible = "amstaos,tsl2672" },
+ { .compatible = "amstaos,tmd2672" },
+ { .compatible = "amstaos,tsl2772" },
+ { .compatible = "amstaos,tmd2772" },
+ {}
+};
+MODULE_DEVICE_TABLE(of, tsl2x7x_of_match);
+
static const struct dev_pm_ops tsl2x7x_pm_ops = {
.suspend = tsl2x7x_suspend,
.resume = tsl2x7x_resume,
@@ -2035,6 +2050,7 @@ static const struct dev_pm_ops tsl2x7x_pm_ops = {
static struct i2c_driver tsl2x7x_driver = {
.driver = {
.name = "tsl2x7x",
+ .of_match_table = tsl2x7x_of_match,
.pm = &tsl2x7x_pm_ops,
},
.id_table = tsl2x7x_idtable,