Signed-off-by: Denis Carikli <[email protected]>
---
drivers/iio/adc/ti-adc128s052.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
index 8aca0ff..2558508 100644
--- a/drivers/iio/adc/ti-adc128s052.c
+++ b/drivers/iio/adc/ti-adc128s052.c
@@ -13,10 +13,11 @@
*/
#include <linux/err.h>
-#include <linux/spi/spi.h>
#include <linux/module.h>
#include <linux/iio/iio.h>
+#include <linux/of.h>
#include <linux/regulator/consumer.h>
+#include <linux/spi/spi.h>
struct adc128_configuration {
const struct iio_chan_spec *channels;
@@ -183,10 +184,21 @@ static const struct spi_device_id adc128_id[] = {
};
MODULE_DEVICE_TABLE(spi, adc128_id);
+#ifdef CONFIG_OF
+static const struct of_device_id adc128_of_match[] = {
+ { .compatible = "ti,adc128s052" },
+ { .compatible = "ti,adc122s021" },
+ { .compatible = "ti,adc108s022" },
+ {}
+};
+MODULE_DEVICE_TABLE(of, adc128_of_match);
+#endif
+
static struct spi_driver adc128_driver = {
.driver = {
.name = "adc128s052",
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(adc128_of_match),
},
.probe = adc128_probe,
.remove = adc128_remove,
--
2.4.5
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html