mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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: Thiago L. A. Miller <tmiller@mochsl.org.br> Signed-off-by: Thiago L. A. Miller <tmiller@mochsl.org.br> Co-developed-by: Osvaldo M. Yasuda <omyasuda@yahoo.com.br> Signed-off-by: Osvaldo M. Yasuda <omyasuda@yahoo.com.br> Signed-off-by: João Victor Marques de Oliveira <joao.marques.oliveira@usp.br> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
0bae068509
commit
266233967c
1 changed files with 11 additions and 0 deletions
|
@ -521,9 +521,20 @@ static const struct spi_device_id 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 = {
|
||||
.driver = {
|
||||
.name = "ad9834",
|
||||
.of_match_table = ad9834_of_match
|
||||
},
|
||||
.probe = ad9834_probe,
|
||||
.remove = ad9834_remove,
|
||||
|
|
Loading…
Reference in a new issue