staging: iio: ad2s1210: Add device tree table.
authorNishad Kamdar <nishadkamdar@gmail.com>
Wed, 31 Oct 2018 16:00:36 +0000 (21:30 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 11 Nov 2018 15:29:46 +0000 (15:29 +0000)
Add device tree table for matching vendor ID.

Note that as the driver is still heavily in flux and there are some
non obvious aspects to a comprehensive binding, that binding will
be submitted at a later date (before leaving staging!)

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/resolver/ad2s1210.c

index 2359441..cec9d99 100644 (file)
@@ -699,6 +699,12 @@ static int ad2s1210_remove(struct spi_device *spi)
        return 0;
 }
 
+static const struct of_device_id ad2s1210_of_match[] = {
+       { .compatible = "adi,ad2s1210", },
+       { }
+};
+MODULE_DEVICE_TABLE(of, ad2s1210_of_match);
+
 static const struct spi_device_id ad2s1210_id[] = {
        { "ad2s1210" },
        {}
@@ -708,6 +714,7 @@ MODULE_DEVICE_TABLE(spi, ad2s1210_id);
 static struct spi_driver ad2s1210_driver = {
        .driver = {
                .name = DRV_NAME,
+               .of_match_table = of_match_ptr(ad2s1210_of_match),
        },
        .probe = ad2s1210_probe,
        .remove = ad2s1210_remove,