diff options
author | Nishad Kamdar <nishadkamdar@gmail.com> | 2018-11-14 23:16:14 +0530 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-11-16 18:32:36 +0000 |
commit | c24a4173f6bbea49b09ae2c137db23035d3a7932 (patch) | |
tree | 0c49daa0ded2a46c51266e59c7238ede15b8a213 /drivers/staging/iio | |
parent | 639eab7482174618bbac08af7445f34f5430bf4f (diff) | |
download | linux-c24a4173f6bbea49b09ae2c137db23035d3a7932.tar.gz linux-c24a4173f6bbea49b09ae2c137db23035d3a7932.tar.bz2 linux-c24a4173f6bbea49b09ae2c137db23035d3a7932.zip |
staging: iio: ad7816: Add device tree table.
Add device tree table for matching vendor ID.
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/adc/ad7816.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c index a2fead85cd46..5209651a1b25 100644 --- a/drivers/staging/iio/adc/ad7816.c +++ b/drivers/staging/iio/adc/ad7816.c @@ -422,6 +422,14 @@ static int ad7816_probe(struct spi_device *spi_dev) return 0; } +static const struct of_device_id ad7816_of_match[] = { + { .compatible = "adi,ad7816", }, + { .compatible = "adi,ad7817", }, + { .compatible = "adi,ad7818", }, + { } +}; +MODULE_DEVICE_TABLE(of, ad7816_of_match); + static const struct spi_device_id ad7816_id[] = { { "ad7816", ID_AD7816 }, { "ad7817", ID_AD7817 }, @@ -434,6 +442,7 @@ MODULE_DEVICE_TABLE(spi, ad7816_id); static struct spi_driver ad7816_driver = { .driver = { .name = "ad7816", + .of_match_table = ad7816_of_match, }, .probe = ad7816_probe, .id_table = ad7816_id, |