Commit 2363c010 authored by David Veenstra's avatar David Veenstra Committed by Jonathan Cameron

staging: iio: ad2s1200: Add dt table

Add device tree table for matching with the vendor ID.
Signed-off-by: default avatarDavid Veenstra <davidjulianveenstra@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1946980b
......@@ -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,
......
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