Thread (1 message) 1 message, 1 author, 2017-06-20

Re: [PATCH 1/2] iio: temperature: tsys01: Add OF match table

From: Jonathan Cameron <hidden>
Date: 2017-06-20 17:14:59
Also in: linux-iio

On Tue, 13 Jun 2017 21:22:22 +0530
Manivannan Sadhasivam [off-list ref] wrote:
Add of_match_table for Measurement Specialties TSYS01 temperature sensor

Signed-off-by: Manivannan Sadhasivam <redacted>
Applied.  Thanks,
quoted hunk
---
 drivers/iio/temperature/tsys01.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/drivers/iio/temperature/tsys01.c b/drivers/iio/temperature/tsys01.c
index 3e60c61..d8aa211 100644
--- a/drivers/iio/temperature/tsys01.c
+++ b/drivers/iio/temperature/tsys01.c
@@ -214,11 +214,18 @@ static const struct i2c_device_id tsys01_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, tsys01_id);
 
+static const struct of_device_id tsys01_of_match[] = {
+	{ .compatible = "meas,tsys01", },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, tsys01_of_match);
+
 static struct i2c_driver tsys01_driver = {
 	.probe = tsys01_i2c_probe,
 	.id_table = tsys01_id,
 	.driver = {
 		   .name = "tsys01",
+		   .of_match_table = of_match_ptr(tsys01_of_match),
 		   },
 };
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help