Re: [PATCH v2 3/3] hwmon: (sht3x) Add support for GXCAS GXHT30
From: Guenter Roeck
Date: Thu Mar 19 2026 - 14:21:12 EST
On 3/19/26 04:38, Zaixiang Xu wrote:
Add support for GXCAS GXHT30 sensor to the sht3x driver. The GXHT30 is software compatible with the Sensirion SHT3x series.
Line length. Please run checkpatch --strict on your patches.
Signed-off-by: Zaixiang Xu <zaixiang.xu.dev@xxxxxxxxx>
---
drivers/hwmon/sht3x.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/sht3x.c b/drivers/hwmon/sht3x.c
index 08306ccb6d0b..4384c18115e9 100644
--- a/drivers/hwmon/sht3x.c
+++ b/drivers/hwmon/sht3x.c
@@ -934,13 +934,26 @@ static const struct i2c_device_id sht3x_ids[] = {
{"sht3x", sht3x},
{"sts3x", sts3x},
{"sht85", sht3x},
+ {"gxht30", sht3x},
{}
};
MODULE_DEVICE_TABLE(i2c, sht3x_ids);
+static const struct of_device_id sht3x_of_match[] = {
+ { .compatible = "sensirion,sht3x" },
+ { .compatible = "sensirion,sts3x" },
+ { .compatible = "sensirion,sht85" },
+ { .compatible = "gxcas,gxht30" },
As mentioned in the bindings feedback, those should be explicit chip
names and not include wildcards.
Also, this is doing more than advertised in the commit description.
It adds explicit devicetree bindings support. That should be a separate patch.
Thanks,
Guenter
+ { }
+};
+MODULE_DEVICE_TABLE(of, sht3x_of_match);
+
static struct i2c_driver sht3x_i2c_driver = {
- .driver.name = "sht3x",
+ .driver = {
+ .name = "sht3x",
+ .of_match_table = sht3x_of_match,
+ },
.probe = sht3x_probe,
.id_table = sht3x_ids,
};
@@ -948,5 +961,6 @@ module_i2c_driver(sht3x_i2c_driver);
MODULE_AUTHOR("David Frey <david.frey@xxxxxxxxxxxxx>");
MODULE_AUTHOR("Pascal Sachs <pascal.sachs@xxxxxxxxxxxxx>");
+MODULE_AUTHOR("Zaixiang Xu <zaixiang.xu.dev@xxxxxxxxx>");
MODULE_DESCRIPTION("Sensirion SHT3x humidity and temperature sensor driver");
MODULE_LICENSE("GPL");