diff options
author | David Veenstra <davidjulianveenstra@gmail.com> | 2018-05-18 20:22:41 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-05-20 12:02:17 +0100 |
commit | 2363c010ce65a68a4a9bcc27c99b7b5e1a478b8a (patch) | |
tree | 75d89b679c8452b43c24b056d87d3faf3b91c454 /drivers/staging/iio | |
parent | 1946980b8f4227ff8543ea21dea8dddd5b161310 (diff) |
staging: iio: ad2s1200: Add dt table
Add device tree table for matching with the vendor ID.
Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/resolver/ad2s1200.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/staging/iio/resolver/ad2s1200.c b/drivers/staging/iio/resolver/ad2s1200.c index 9a8aa2448897..67d9747f88a6 100644 --- a/drivers/staging/iio/resolver/ad2s1200.c +++ b/drivers/staging/iio/resolver/ad2s1200.c @@ -154,6 +154,13 @@ static int ad2s1200_probe(struct spi_device *spi) return devm_iio_device_register(&spi->dev, indio_dev); } +static const struct of_device_id ad2s1200_of_match[] = { + { .compatible = "adi,ad2s1200", }, + { .compatible = "adi,ad2s1205", }, + { } +}; +MODULE_DEVICE_TABLE(of, ad2s1200_of_match); + static const struct spi_device_id ad2s1200_id[] = { { "ad2s1200" }, { "ad2s1205" }, @@ -164,6 +171,7 @@ MODULE_DEVICE_TABLE(spi, ad2s1200_id); static struct spi_driver ad2s1200_driver = { .driver = { .name = DRV_NAME, + .of_match_table = of_match_ptr(ad2s1200_of_match), }, .probe = ad2s1200_probe, .id_table = ad2s1200_id, |