From: Brian Masney <masneyb@onstation.org>
To: jic23@kernel.org, linux-iio@vger.kernel.org
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
linux-kernel@vger.kernel.org, Jon.Brenner@ams.com,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org
Subject: [PATCH 1/6] staging: iio: tsl2x7x: add of_match table for device tree support
Date: Thu, 29 Jun 2017 13:03:47 -0400 [thread overview]
Message-ID: <20170629170352.11264-2-masneyb@onstation.org> (raw)
In-Reply-To: <20170629170352.11264-1-masneyb@onstation.org>
Add device tree support for the tsl2x7x IIO driver with no custom
properties.
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
---
Documentation/devicetree/bindings/trivial-devices.txt | 10 ++++++++++
drivers/staging/iio/light/tsl2x7x.c | 16 ++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/Documentation/devicetree/bindings/trivial-devices.txt b/Documentation/devicetree/bindings/trivial-devices.txt
index 35f406d..0e6e953 100644
--- a/Documentation/devicetree/bindings/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/trivial-devices.txt
@@ -21,6 +21,16 @@ adi,adt7490 +/-1C TDM Extended Temp Range I.C
adi,adxl345 Three-Axis Digital Accelerometer
adi,adxl346 Three-Axis Digital Accelerometer (backward-compatibility value "adi,adxl345" must be listed too)
ams,iaq-core AMS iAQ-Core VOC Sensor
+amstaos,tsl2571 AMS/TAOS ALS and proximity sensor
+amstaos,tsl2671 AMS/TAOS ALS and proximity sensor
+amstaos,tmd2671 AMS/TAOS ALS and proximity sensor
+amstaos,tsl2771 AMS/TAOS ALS and proximity sensor
+amstaos,tmd2771 AMS/TAOS ALS and proximity sensor
+amstaos,tsl2572 AMS/TAOS ALS and proximity sensor
+amstaos,tsl2672 AMS/TAOS ALS and proximity sensor
+amstaos,tmd2672 AMS/TAOS ALS and proximity sensor
+amstaos,tsl2772 AMS/TAOS ALS and proximity sensor
+amstaos,tmd2772 AMS/TAOS ALS and proximity sensor
at,24c08 i2c serial eeprom (24cxx)
atmel,at97sc3204t i2c trusted platform module (TPM)
capella,cm32181 CM32181: Ambient Light Sensor
diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c
index 1467199..3f4f1f3 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,
--
2.9.4
next prev parent reply other threads:[~2017-06-29 17:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 17:03 [PATCH 0/6] staging: iio: tsl2x7x: staging cleanups Brian Masney
2017-06-29 17:03 ` Brian Masney [this message]
2017-07-06 18:55 ` [PATCH 1/6] staging: iio: tsl2x7x: add of_match table for device tree support Rob Herring
2017-06-29 17:03 ` [PATCH 2/6] staging: iio: tsl2x7x: remove redundant power_state sysfs attribute Brian Masney
2017-06-29 17:03 ` [PATCH 3/6] staging: iio: tsl2x7x: remove tsl2x7x_i2c_read() Brian Masney
2017-06-29 19:26 ` Frans Klaver
2017-06-29 17:03 ` [PATCH 4/6] staging: iio: tsl2x7x: cleaned up i2c calls in tsl2x7x_als_calibrate() Brian Masney
2017-06-29 17:03 ` [PATCH 5/6] staging: iio: tsl2x7x: refactor {read,write}_event_value to allow handling multiple iio_event_infos Brian Masney
2017-07-01 9:40 ` Jonathan Cameron
2017-07-01 10:37 ` Brian Masney
2017-07-01 11:58 ` Jonathan Cameron
2017-06-29 17:03 ` [PATCH 6/6] staging: iio: tsl2x7x: use usleep_range() instead of mdelay() Brian Masney
2017-06-30 15:21 ` [PATCH 0/6] staging: iio: tsl2x7x: staging cleanups Brian Masney
2017-06-30 16:08 ` Jon Brenner
2017-07-01 9:42 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170629170352.11264-2-masneyb@onstation.org \
--to=masneyb@onstation.org \
--cc=Jon.Brenner@ams.com \
--cc=devel@driverdev.osuosl.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).