diff options
author | Marcelo Schmitt <marcelo.schmitt1@gmail.com> | 2018-11-24 11:18:57 -0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-11-25 09:58:08 +0000 |
commit | bac257b0d2a1e06426f7db56abeda7c2ffcf0752 (patch) | |
tree | 318744424c722241cafb6930b8685e389b1ec400 /drivers/staging/iio | |
parent | b911b0ab0d89d8488ae0d21db121907dcacef6ad (diff) | |
download | linux-bac257b0d2a1e06426f7db56abeda7c2ffcf0752.tar.gz linux-bac257b0d2a1e06426f7db56abeda7c2ffcf0752.tar.bz2 linux-bac257b0d2a1e06426f7db56abeda7c2ffcf0752.zip |
staging: iio: ad5933: add device tree support
Add a of_device_id struct variable and subsequent call to
MODULE_DEVICE_TABLE macro to complete device tree support.
Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/impedance-analyzer/ad5933.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c index f9bcb8310e21..9e52384f5370 100644 --- a/drivers/staging/iio/impedance-analyzer/ad5933.c +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c @@ -786,9 +786,18 @@ static const struct i2c_device_id ad5933_id[] = { MODULE_DEVICE_TABLE(i2c, ad5933_id); +static const struct of_device_id ad5933_of_match[] = { + { .compatible = "adi,ad5933" }, + { .compatible = "adi,ad5934" }, + { }, +}; + +MODULE_DEVICE_TABLE(of, ad5933_of_match); + static struct i2c_driver ad5933_driver = { .driver = { .name = "ad5933", + .of_match_table = ad5933_of_match, }, .probe = ad5933_probe, .remove = ad5933_remove, |