mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 01:22:07 +00:00
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>
This commit is contained in:
parent
a5dfc572ee
commit
ee8ea7472f
@ -256,9 +256,16 @@ static const struct i2c_device_id cm3323_id[] = {
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(i2c, 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 = {
|
static struct i2c_driver cm3323_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = CM3323_DRV_NAME,
|
.name = CM3323_DRV_NAME,
|
||||||
|
.of_match_table = cm3323_of_match,
|
||||||
},
|
},
|
||||||
.probe = cm3323_probe,
|
.probe = cm3323_probe,
|
||||||
.id_table = cm3323_id,
|
.id_table = cm3323_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user