Commit 62cfc057 authored by David Mosberger-Tang's avatar David Mosberger-Tang Committed by Guenter Roeck

hwmon: (sht4x) Add device tree match table

This patch enables automatic loading of the sht4x module via a device
tree table entry.
Signed-off-by: default avatarDavid Mosberger-Tang <davidm@egauge.net>
Link: https://lore.kernel.org/r/20211121160637.2312106-1-davidm@egauge.netSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent e380095b
......@@ -281,9 +281,16 @@ static const struct i2c_device_id sht4x_id[] = {
};
MODULE_DEVICE_TABLE(i2c, sht4x_id);
static const struct of_device_id sht4x_of_match[] = {
{ .compatible = "sensirion,sht4x" },
{ }
};
MODULE_DEVICE_TABLE(of, sht4x_of_match);
static struct i2c_driver sht4x_driver = {
.driver = {
.name = "sht4x",
.of_match_table = sht4x_of_match,
},
.probe = sht4x_probe,
.id_table = sht4x_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment