All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] iio:adc:ltc2471: add match table for existing devices
@ 2020-06-17 13:35 Darius Berghe
  2020-06-17 13:35 ` [PATCH v1 2/3] iio:adc:ltc2471: add ltc2461/ltc2463 compatible strings Darius Berghe
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Darius Berghe @ 2020-06-17 13:35 UTC (permalink / raw)
  To: linux-iio, linux-kernel; +Cc: jic23

OF style match table is the proper way of matching device tree nodes
with drivers and such table was missing, this commit adds it.

Signed-off-by: Darius Berghe <darius.berghe@analog.com>
---
 drivers/iio/adc/ltc2471.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/iio/adc/ltc2471.c b/drivers/iio/adc/ltc2471.c
index 55fab612843a..0e5cdb43a943 100644
--- a/drivers/iio/adc/ltc2471.c
+++ b/drivers/iio/adc/ltc2471.c
@@ -143,9 +143,17 @@ static const struct i2c_device_id ltc2471_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ltc2471_i2c_id);
 
+static const struct of_device_id ltc2471_of_match[] = {
+	{ .compatible = "adi,ltc2471" },
+	{ .compatible = "adi,ltc2473" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, ltc2471_of_match);
+
 static struct i2c_driver ltc2471_i2c_driver = {
 	.driver = {
 		.name = "ltc2471",
+		.of_match_table = of_match_ptr(ltc2471_of_match)
 	},
 	.probe    = ltc2471_i2c_probe,
 	.id_table = ltc2471_i2c_id,
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-06-27 14:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-17 13:35 [PATCH v1 1/3] iio:adc:ltc2471: add match table for existing devices Darius Berghe
2020-06-17 13:35 ` [PATCH v1 2/3] iio:adc:ltc2471: add ltc2461/ltc2463 compatible strings Darius Berghe
2020-06-17 13:35 ` [PATCH v1 3/3] iio:adc:ltc2471: add dt binding yaml Darius Berghe
2020-06-20 15:31   ` Jonathan Cameron
2020-06-22  8:05     ` Berghe, Darius
2020-06-27 14:46       ` Jonathan Cameron
2020-06-20 15:20 ` [PATCH v1 1/3] iio:adc:ltc2471: add match table for existing devices Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.