Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1669418
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Michael Stecklein <m-stecklein@ti.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 3/3] iio: humidity: hdc100x: add match table and device id's |
| Date | Mon, 19 Jun 2017 18:10:04 +0200 |
| Message-ID | <tU7py-4Ul-63@gated-at.bofh.it> (permalink) |
| References | <tU7py-4Ul-61@gated-at.bofh.it> |
| X-Original-To | Jonathan Cameron <jic23@kernel.org>, Hartmut Knaack <knaack.h@gmx.de>, Lars-Peter Clausen <lars@metafoo.de>, Peter Meerwald-Stadler <pmeerw@pmeerw.net>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1497888073; bh=KbRqFBbKfNhP9DL0fwFcHGfAxaRqZo4Xm9XGSohqoww=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=EuoM0+f5VS1B138yzfB6NmZIbDw3i4cc60bCk37UzS/5gzwgEWBMm/BtbDUAVoRvh CEPb7lhbbOpf/vf8MK5T3IuylcTyk7S4Zthh/FN8v2zuXBQlnGGT+aVa+C4Glo649s eM1E5BVYIgb/i+34maW5QBJPJK6+pPD5DwU8cDfY= |
| X-Mailer | git-send-email 2.7.4 |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 35 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | "Andrew F . Davis" <afd@ti.com>, Michael Stecklein <m-stecklein@ti.com>, <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org> |
| X-Original-Date | Mon, 19 Jun 2017 11:01:06 -0500 |
| X-Original-Message-ID | <1497888066-12652-3-git-send-email-m-stecklein@ti.com> |
| X-Original-References | <1497888066-12652-1-git-send-email-m-stecklein@ti.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1669418 |
Show key headers only | View raw
Add of_match_table and point it to a list of compatible device tree
device id's.
Signed-off-by: Michael Stecklein <m-stecklein@ti.com>
---
drivers/iio/humidity/hdc100x.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
index 6778bc7..7851bd9 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -429,9 +429,20 @@ static const struct i2c_device_id hdc100x_id[] = {
};
MODULE_DEVICE_TABLE(i2c, hdc100x_id);
+static const struct of_device_id hdc100x_dt_ids[] = {
+ { .compatible = "ti,hdc1000" },
+ { .compatible = "ti,hdc1008" },
+ { .compatible = "ti,hdc1010" },
+ { .compatible = "ti,hdc1050" },
+ { .compatible = "ti,hdc1080" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, hdc100x_dt_ids);
+
static struct i2c_driver hdc100x_driver = {
.driver = {
.name = "hdc100x",
+ .of_match_table = of_match_ptr(hdc100x_dt_ids),
},
.probe = hdc100x_probe,
.remove = hdc100x_remove,
--
2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v2 3/3] iio: humidity: hdc100x: add match table and device id's Michael Stecklein <m-stecklein@ti.com> - 2017-06-19 18:10 +0200
csiph-web