Skip to content

Commit c98d351

Browse files
mranostayRobertCNelson
authored andcommitted
hwmon: tmp468: add device tree support
Signed-off-by: Matt Ranostay <[email protected]>
1 parent 47f1160 commit c98d351

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/hwmon/tmp468.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,19 @@ static const struct i2c_device_id tmp468_id[] = {
8282
};
8383
MODULE_DEVICE_TABLE(i2c, tmp468_id);
8484

85+
static const struct of_device_id tmp468_of_match[] = {
86+
{
87+
.compatible = "ti,tmp464",
88+
.data = (void *)tmp464,
89+
},
90+
{
91+
.compatible = "ti,tmp468",
92+
.data = (void *)tmp468,
93+
},
94+
{},
95+
};
96+
MODULE_DEVICE_TABLE(of, tmp468_of_match);
97+
8598
/*
8699
* Client data
87100
*/
@@ -488,6 +501,7 @@ static struct i2c_driver tmp468_driver = {
488501
.class = I2C_CLASS_HWMON,
489502
.driver = {
490503
.name = "tmp468",
504+
.of_match_table = of_match_ptr(tmp468_of_match),
491505
},
492506
.probe = tmp468_probe,
493507
.id_table = tmp468_id,

0 commit comments

Comments
 (0)