diff options
author | Alexander Sverdlin <alexander.sverdlin@gmail.com> | 2022-12-23 17:26:36 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-12-30 18:05:16 +0000 |
commit | 80cbddf59009933274989cb39d52eb8f0a43839f (patch) | |
tree | e23422b0afc6fea46c228cb86d32a5e1cb78ae39 /drivers/iio | |
parent | 08025a3bd9e0b975c1c2b59e31aa7c18d27786b7 (diff) |
iio: adc: ep93xx: Add OF support
Prepare for EP93xx conversion to DT.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://lore.kernel.org/r/20221223162636.6488-2-alexander.sverdlin@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/ep93xx_adc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c index fd5a9404c8dc..a35e6cead67d 100644 --- a/drivers/iio/adc/ep93xx_adc.c +++ b/drivers/iio/adc/ep93xx_adc.c @@ -21,6 +21,7 @@ #include <linux/module.h> #include <linux/mutex.h> #include <linux/platform_device.h> +#include <linux/of.h> /* * This code could benefit from real HR Timers, but jiffy granularity would @@ -227,9 +228,16 @@ static int ep93xx_adc_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id ep93xx_adc_of_ids[] = { + { .compatible = "cirrus,ep9301-adc" }, + {} +}; +MODULE_DEVICE_TABLE(of, ep93xx_adc_of_ids); + static struct platform_driver ep93xx_adc_driver = { .driver = { .name = "ep93xx-adc", + .of_match_table = ep93xx_adc_of_ids, }, .probe = ep93xx_adc_probe, .remove = ep93xx_adc_remove, |