mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
iio: si7020: Add devicetree support and trivial bindings
This adds devicetree support for the si7020 iio driver. Since it works well without requiring any additional property, its compatible string is added to the trivial i2c devices bindings list. Signed-off-by: Paul Kocialkowski <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
d1c6753412
commit
b0d8019854
2 changed files with 11 additions and 1 deletions
|
|
@ -154,8 +154,17 @@ static const struct i2c_device_id si7020_id[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(i2c, si7020_id);
|
||||
|
||||
static const struct of_device_id si7020_dt_ids[] = {
|
||||
{ .compatible = "silabs,si7020" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, si7020_dt_ids);
|
||||
|
||||
static struct i2c_driver si7020_driver = {
|
||||
.driver.name = "si7020",
|
||||
.driver = {
|
||||
.name = "si7020",
|
||||
.of_match_table = of_match_ptr(si7020_dt_ids),
|
||||
},
|
||||
.probe = si7020_probe,
|
||||
.id_table = si7020_id,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue