bcm27xx: update 6.1 patches from RPi foundation
[openwrt/staging/xback.git] / target / linux / bcm27xx / patches-6.1 / 950-0577-hwmon-aht10-Add-DT-compatible-string.patch
1 From b77c63aa6c620edb9ad908b5660d24fb3e27bd12 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Tue, 7 Mar 2023 11:52:36 +0000
4 Subject: [PATCH] hwmon: (aht10): Add DT compatible string
5
6 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
7 ---
8 drivers/hwmon/aht10.c | 7 +++++++
9 1 file changed, 7 insertions(+)
10
11 --- a/drivers/hwmon/aht10.c
12 +++ b/drivers/hwmon/aht10.c
13 @@ -332,9 +332,16 @@ static const struct i2c_device_id aht10_
14 };
15 MODULE_DEVICE_TABLE(i2c, aht10_id);
16
17 +static const struct of_device_id aht10_of_id[] = {
18 + { .compatible = "aosong,aht10", },
19 + { }
20 +};
21 +MODULE_DEVICE_TABLE(of, aht10_of_id);
22 +
23 static struct i2c_driver aht10_driver = {
24 .driver = {
25 .name = "aht10",
26 + .of_match_table = aht10_of_id,
27 },
28 .probe = aht10_probe,
29 .id_table = aht10_id,