Commit 393de146 authored by Kurt Borja's avatar Kurt Borja Committed by Guenter Roeck
Browse files

hwmon: (sht21) Add devicetree support

parent 7e5969a4
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -282,8 +282,19 @@ static const struct i2c_device_id sht21_id[] = {
};
MODULE_DEVICE_TABLE(i2c, sht21_id);

static const struct of_device_id sht21_of_match[] = {
	{ .compatible = "sensirion,sht20" },
	{ .compatible = "sensirion,sht21" },
	{ .compatible = "sensirion,sht25" },
	{ }
};
MODULE_DEVICE_TABLE(of, sht21_of_match);

static struct i2c_driver sht21_driver = {
	.driver.name = "sht21",
	.driver = {
		.name = "sht21",
		.of_match_table = sht21_of_match,
	},
	.probe       = sht21_probe,
	.id_table    = sht21_id,
};