Commit 26623396 authored by João Victor Marques de Oliveira's avatar João Victor Marques de Oliveira Committed by Jonathan Cameron

staging: iio: ad9834: add of_device_id table

Add a of_device_id struct array of_match_table variable and subsequent
call to MODULE_DEVICE_TABLE macro to enable explicit device tree support.
Co-developed-by: default avatarThiago L. A. Miller <tmiller@mochsl.org.br>
Signed-off-by: default avatarThiago L. A. Miller <tmiller@mochsl.org.br>
Co-developed-by: default avatarOsvaldo M. Yasuda <omyasuda@yahoo.com.br>
Signed-off-by: default avatarOsvaldo M. Yasuda <omyasuda@yahoo.com.br>
Signed-off-by: default avatarJoão Victor Marques de Oliveira <joao.marques.oliveira@usp.br>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 0bae0685
...@@ -521,9 +521,20 @@ static const struct spi_device_id ad9834_id[] = { ...@@ -521,9 +521,20 @@ static const struct spi_device_id ad9834_id[] = {
}; };
MODULE_DEVICE_TABLE(spi, ad9834_id); MODULE_DEVICE_TABLE(spi, ad9834_id);
static const struct of_device_id ad9834_of_match[] = {
{.compatible = "adi,ad9833"},
{.compatible = "adi,ad9834"},
{.compatible = "adi,ad9837"},
{.compatible = "adi,ad9838"},
{}
};
MODULE_DEVICE_TABLE(of, ad9834_of_match);
static struct spi_driver ad9834_driver = { static struct spi_driver ad9834_driver = {
.driver = { .driver = {
.name = "ad9834", .name = "ad9834",
.of_match_table = ad9834_of_match
}, },
.probe = ad9834_probe, .probe = ad9834_probe,
.remove = ad9834_remove, .remove = ad9834_remove,
......
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