diff options
author | Siddharth Manthan <siddharth.manthan@gmail.com> | 2021-07-28 13:00:48 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-08-08 16:25:40 +0200 |
commit | ee8ea7472ff7e56d015fcaf0924c043688ca29e8 (patch) | |
tree | b9331c8b8e7da788b72758b617c1d2ad620d195a /drivers/iio/light/cm3323.c | |
parent | dt-bindings: Add bindings for Capella cm3323 Ambient Light Sensor (diff) | |
download | linux-ee8ea7472ff7e56d015fcaf0924c043688ca29e8.tar.xz linux-ee8ea7472ff7e56d015fcaf0924c043688ca29e8.zip |
iio: light: cm3323: Add of_device_id table
Add an of_device_id table to explicitly support the Capella cm3323
Ambient Light Sensor rather than relying on matching against the
i2c_device_id table.
Signed-off-by: Siddharth Manthan <siddharth.manthan@gmail.com>
Link: https://lore.kernel.org/r/20210728110048.14593-2-siddharth.manthan@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/light/cm3323.c')
-rw-r--r-- | drivers/iio/light/cm3323.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iio/light/cm3323.c b/drivers/iio/light/cm3323.c index 6d1b0ffd144b..fd9a8c27de2e 100644 --- a/drivers/iio/light/cm3323.c +++ b/drivers/iio/light/cm3323.c @@ -256,9 +256,16 @@ static const struct i2c_device_id cm3323_id[] = { }; MODULE_DEVICE_TABLE(i2c, cm3323_id); +static const struct of_device_id cm3323_of_match[] = { + { .compatible = "capella,cm3323", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, cm3323_of_match); + static struct i2c_driver cm3323_driver = { .driver = { .name = CM3323_DRV_NAME, + .of_match_table = cm3323_of_match, }, .probe = cm3323_probe, .id_table = cm3323_id, |