1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/6.6/target/linux/bcm27xx/patches-6.6/0417-hwmon-aht10-Add-DT-compatible-string.patch
Ycarus (Yannick Chabanois) 12de1d2995 Add RPI kernel 6.6 support
2024-04-05 20:55:33 +02:00

38 lines
1.1 KiB
Diff

From 71a8a96cae95a95f6cea29ca650bf08289c30993 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 7 Mar 2023 11:52:36 +0000
Subject: [PATCH 0417/1002] hwmon: (aht10): Add DT compatible string
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/hwmon/aht10.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/hwmon/aht10.c b/drivers/hwmon/aht10.c
index f136bf3ff40a..558ef3af4486 100644
--- a/drivers/hwmon/aht10.c
+++ b/drivers/hwmon/aht10.c
@@ -57,6 +57,12 @@ static const struct i2c_device_id aht10_id[] = {
};
MODULE_DEVICE_TABLE(i2c, aht10_id);
+static const struct of_device_id aht10_of_id[] = {
+ { .compatible = "aosong,aht10", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, aht10_of_id);
+
/**
* struct aht10_data - All the data required to operate an AHT10/AHT20 chip
* @client: the i2c client associated with the AHT10/AHT20
@@ -381,6 +387,7 @@ static int aht10_probe(struct i2c_client *client)
static struct i2c_driver aht10_driver = {
.driver = {
.name = "aht10",
+ .of_match_table = aht10_of_id,
},
.probe = aht10_probe,
.id_table = aht10_id,
--
2.44.0