[PATCH] staging: iio: ad9832: Add device tree support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a of_device_id struct variable and subsequent call to
MODULE_DEVICE_TABLE macro to support device tree.

Signed-off-by: João Seckler <joaoseckler@xxxxxxxxx>
Signed-off-by: Anderson Reis <andersonreisrosa@xxxxxxxxx>
Co-developed-by: Anderson Reis  <andersonreisrosa@xxxxxxxxx>
Signed-off-by: Andre Tadeu de Carvalho <andre.tadeu.de.carvalho@xxxxxxxxx>
Co-developed-by: Andre Tadeu de Carvalho <andre.tadeu.de.carvalho@xxxxxxxxx>
---
 drivers/staging/iio/frequency/ad9832.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
index 74308a2e72db..51e97c74c6b2 100644
--- a/drivers/staging/iio/frequency/ad9832.c
+++ b/drivers/staging/iio/frequency/ad9832.c
@@ -451,6 +451,13 @@ static int ad9832_remove(struct spi_device *spi)
 	return 0;
 }
 
+static const struct of_device_id ad9832_of_match[] = {
+	{ .compatible = "adi,ad9832", },
+	{ .compatible = "adi,ad9835", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, ad9832_of_match);
+
 static const struct spi_device_id ad9832_id[] = {
 	{"ad9832", 0},
 	{"ad9835", 0},
-- 
2.11.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux