Kartik Kulkarni
unread,Jul 25, 2019, 4:07:12 PM7/25/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Lars-Peter Clausen, Michael Hennerich, Stefan Popa, Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler, Greg Kroah-Hartman, linu...@vger.kernel.org, de...@driverdev.osuosl.org, linux-...@vger.kernel.org, kerne...@googlegroups.com, Kartik Kulkarni, Matheus Tavares
Add the of_device_id struct and the respective
of_match_device entry to complete device tree support.
Signed-off-by: Kartik Kulkarni <
kartik...@gmail.com>
Reviewed-by: Matheus Tavares <
matheus.b...@usp.br>
---
drivers/staging/iio/adc/ad7280a.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
index 2d9c7551f314..ded0ba093a28 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -1027,9 +1027,16 @@ static const struct spi_device_id ad7280_id[] = {
};
MODULE_DEVICE_TABLE(spi, ad7280_id);
+static const struct of_device_id ad7280_of_match[] = {
+ { .compatible = "adi,ad7280a", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, ad7280_of_match);
+
static struct spi_driver ad7280_driver = {
.driver = {
.name = "ad7280a",
+ .of_match_table = ad7280_of_match,
},
.probe = ad7280_probe,
.id_table = ad7280_id,
--
2.20.1