difos/target/linux/bcm27xx/patches-6.12/950-0309-hwmon-aht10-Add-DT-compatible-string.patch
Álvaro Fernández Rojas 8f9e91ad03 bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-05-21 11:32:18 +02:00

33 lines
1,008 B
Diff

From 812b4aa3dee6bea5ec6e557a2b4e9168b7bafae9 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 7 Mar 2023 11:52:36 +0000
Subject: [PATCH] hwmon: (aht10): Add DT compatible string
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/hwmon/aht10.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/hwmon/aht10.c
+++ b/drivers/hwmon/aht10.c
@@ -57,6 +57,12 @@ static const struct i2c_device_id aht10_
};
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
@@ -380,6 +386,7 @@ static int aht10_probe(struct i2c_client
static struct i2c_driver aht10_driver = {
.driver = {
.name = "aht10",
+ .of_match_table = aht10_of_id,
},
.probe = aht10_probe,
.id_table = aht10_id,