Commit 1c00dcd3 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Jonathan Cameron

iio: dac: ad7303: Add OF match table

The Documentation/devicetree/bindings/iio/dac/ad7303.txt DT binding doc
lists "adi,ad7303" as a compatible string but the corresponding driver
does not have an OF match table. Add the table to the driver so the SPI
core can do an OF style match.
Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 9c68be3e
...@@ -281,6 +281,12 @@ static int ad7303_remove(struct spi_device *spi) ...@@ -281,6 +281,12 @@ static int ad7303_remove(struct spi_device *spi)
return 0; return 0;
} }
static const struct of_device_id ad7303_spi_of_match[] = {
{ .compatible = "adi,ad7303", },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, ad7303_spi_of_match);
static const struct spi_device_id ad7303_spi_ids[] = { static const struct spi_device_id ad7303_spi_ids[] = {
{ "ad7303", 0 }, { "ad7303", 0 },
{} {}
...@@ -290,6 +296,7 @@ MODULE_DEVICE_TABLE(spi, ad7303_spi_ids); ...@@ -290,6 +296,7 @@ MODULE_DEVICE_TABLE(spi, ad7303_spi_ids);
static struct spi_driver ad7303_driver = { static struct spi_driver ad7303_driver = {
.driver = { .driver = {
.name = "ad7303", .name = "ad7303",
.of_match_table = of_match_ptr(ad7303_spi_of_match),
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.probe = ad7303_probe, .probe = ad7303_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment