* [PATCH v3 1/4] hwmon: (sht21) Documentation cleanup
2025-09-08 1:33 [PATCH v3 0/4] hwmon: (sht21) Add devicetree support Kurt Borja
@ 2025-09-08 1:33 ` Kurt Borja
2025-09-08 1:33 ` [PATCH v3 2/4] hwmon: (sht21) Add support for SHT20, SHT25 chips Kurt Borja
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Kurt Borja @ 2025-09-08 1:33 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Jonathan Corbet, Andy Shevchenko,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, Kurt Borja
Drop extra empty lines and organize sysfs entries in a table.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/hwmon/sht21.rst | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/Documentation/hwmon/sht21.rst b/Documentation/hwmon/sht21.rst
index 1bccc8e8aac8d3532ec17dcdbc6a172102877085..9f66cd51b45dc4b89ce757d2209445478de046cd 100644
--- a/Documentation/hwmon/sht21.rst
+++ b/Documentation/hwmon/sht21.rst
@@ -13,8 +13,6 @@ Supported chips:
https://www.sensirion.com/file/datasheet_sht21
-
-
* Sensirion SHT25
Prefix: 'sht25'
@@ -25,8 +23,6 @@ Supported chips:
https://www.sensirion.com/file/datasheet_sht25
-
-
Author:
Urs Fleisch <urs.fleisch@sensirion.com>
@@ -47,13 +43,11 @@ in the board setup code.
sysfs-Interface
---------------
-temp1_input
- - temperature input
-
-humidity1_input
- - humidity input
-eic
- - Electronic Identification Code
+=================== ============================================================
+temp1_input Temperature input
+humidity1_input Humidity input
+eic Electronic Identification Code
+=================== ============================================================
Notes
-----
--
2.51.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v3 2/4] hwmon: (sht21) Add support for SHT20, SHT25 chips
2025-09-08 1:33 [PATCH v3 0/4] hwmon: (sht21) Add devicetree support Kurt Borja
2025-09-08 1:33 ` [PATCH v3 1/4] hwmon: (sht21) Documentation cleanup Kurt Borja
@ 2025-09-08 1:33 ` Kurt Borja
2025-09-08 13:31 ` Guenter Roeck
2025-09-08 1:33 ` [PATCH v3 3/4] hwmon: (sht21) Add devicetree support Kurt Borja
2025-09-08 1:33 ` [PATCH v3 4/4] dt-bindings: trivial-devices: Add sht2x sensors Kurt Borja
3 siblings, 1 reply; 10+ messages in thread
From: Kurt Borja @ 2025-09-08 1:33 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Jonathan Corbet, Andy Shevchenko,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, Kurt Borja,
stable
All sht2x chips share the same communication protocol so add support for
them.
Cc: stable@vger.kernel.org
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/hwmon/sht21.rst | 10 ++++++++++
drivers/hwmon/Kconfig | 4 ++--
drivers/hwmon/sht21.c | 2 ++
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/Documentation/hwmon/sht21.rst b/Documentation/hwmon/sht21.rst
index 9f66cd51b45dc4b89ce757d2209445478de046cd..d20e8a460ba6c7c8452bcdce68a1fce963413640 100644
--- a/Documentation/hwmon/sht21.rst
+++ b/Documentation/hwmon/sht21.rst
@@ -3,6 +3,16 @@ Kernel driver sht21
Supported chips:
+ * Sensirion SHT20
+
+ Prefix: 'sht20'
+
+ Addresses scanned: none
+
+ Datasheet: Publicly available at the Sensirion website
+
+ https://www.sensirion.com/file/datasheet_sht20
+
* Sensirion SHT21
Prefix: 'sht21'
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 9d28fcf7cd2a6f9e2f54694a717bd85ff4047b46..90dc8051418689e7a92293df15ce35cd822c77ff 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1930,8 +1930,8 @@ config SENSORS_SHT21
tristate "Sensiron humidity and temperature sensors. SHT21 and compat."
depends on I2C
help
- If you say yes here you get support for the Sensiron SHT21, SHT25
- humidity and temperature sensors.
+ If you say yes here you get support for the Sensiron SHT20, SHT21,
+ SHT25 humidity and temperature sensors.
This driver can also be built as a module. If so, the module
will be called sht21.
diff --git a/drivers/hwmon/sht21.c b/drivers/hwmon/sht21.c
index 97327313529b467ed89d8f6b06c2d78efd54efbf..97d71e3361e9d7f0512880149ba6479601b2fc0c 100644
--- a/drivers/hwmon/sht21.c
+++ b/drivers/hwmon/sht21.c
@@ -275,7 +275,9 @@ static int sht21_probe(struct i2c_client *client)
/* Device ID table */
static const struct i2c_device_id sht21_id[] = {
+ { "sht20" },
{ "sht21" },
+ { "sht25" },
{ }
};
MODULE_DEVICE_TABLE(i2c, sht21_id);
--
2.51.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v3 2/4] hwmon: (sht21) Add support for SHT20, SHT25 chips
2025-09-08 1:33 ` [PATCH v3 2/4] hwmon: (sht21) Add support for SHT20, SHT25 chips Kurt Borja
@ 2025-09-08 13:31 ` Guenter Roeck
0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2025-09-08 13:31 UTC (permalink / raw)
To: Kurt Borja, Jean Delvare, Jonathan Corbet, Andy Shevchenko,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, stable
On 9/7/25 18:33, Kurt Borja wrote:
> All sht2x chips share the same communication protocol so add support for
> them.
>
> Cc: stable@vger.kernel.org
FWIW, I am going to drop this when applying. I don't add stable tags
for patches which are not bug fixes. Anyone who wants such patches
backported can request that separately after the patch is upstream.
Guenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 3/4] hwmon: (sht21) Add devicetree support
2025-09-08 1:33 [PATCH v3 0/4] hwmon: (sht21) Add devicetree support Kurt Borja
2025-09-08 1:33 ` [PATCH v3 1/4] hwmon: (sht21) Documentation cleanup Kurt Borja
2025-09-08 1:33 ` [PATCH v3 2/4] hwmon: (sht21) Add support for SHT20, SHT25 chips Kurt Borja
@ 2025-09-08 1:33 ` Kurt Borja
2025-09-08 7:03 ` Krzysztof Kozlowski
2025-09-08 1:33 ` [PATCH v3 4/4] dt-bindings: trivial-devices: Add sht2x sensors Kurt Borja
3 siblings, 1 reply; 10+ messages in thread
From: Kurt Borja @ 2025-09-08 1:33 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Jonathan Corbet, Andy Shevchenko,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, Kurt Borja,
stable
Add DT support for sht2x chips.
Cc: stable@vger.kernel.org
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
drivers/hwmon/sht21.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/sht21.c b/drivers/hwmon/sht21.c
index 97d71e3361e9d7f0512880149ba6479601b2fc0c..627d35070a420ab9e51634bdc5cf5e3de3853326 100644
--- a/drivers/hwmon/sht21.c
+++ b/drivers/hwmon/sht21.c
@@ -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,
};
--
2.51.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v3 3/4] hwmon: (sht21) Add devicetree support
2025-09-08 1:33 ` [PATCH v3 3/4] hwmon: (sht21) Add devicetree support Kurt Borja
@ 2025-09-08 7:03 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-08 7:03 UTC (permalink / raw)
To: Kurt Borja, Jean Delvare, Guenter Roeck, Jonathan Corbet,
Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, stable
On 08/09/2025 03:33, Kurt Borja wrote:
> Add DT support for sht2x chips.
>
> Cc: stable@vger.kernel.org
Describe the bug, otherwise not a stable backport.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 4/4] dt-bindings: trivial-devices: Add sht2x sensors
2025-09-08 1:33 [PATCH v3 0/4] hwmon: (sht21) Add devicetree support Kurt Borja
` (2 preceding siblings ...)
2025-09-08 1:33 ` [PATCH v3 3/4] hwmon: (sht21) Add devicetree support Kurt Borja
@ 2025-09-08 1:33 ` Kurt Borja
2025-09-08 7:02 ` Krzysztof Kozlowski
3 siblings, 1 reply; 10+ messages in thread
From: Kurt Borja @ 2025-09-08 1:33 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Jonathan Corbet, Andy Shevchenko,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, Kurt Borja,
stable
Add sensirion,sht2x trivial sensors.
Cc: stable@vger.kernel.org
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/trivial-devices.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index f3dd18681aa6f81255141bdda6daf8e45369a2c2..952244a7105591a0095b1ae57da7cb7345bdfc61 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -362,6 +362,9 @@ properties:
# Sensirion low power multi-pixel gas sensor with I2C interface
- sensirion,sgpc3
# Sensirion temperature & humidity sensor with I2C interface
+ - sensirion,sht20
+ - sensirion,sht21
+ - sensirion,sht25
- sensirion,sht4x
# Sensortek 3 axis accelerometer
- sensortek,stk8312
--
2.51.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v3 4/4] dt-bindings: trivial-devices: Add sht2x sensors
2025-09-08 1:33 ` [PATCH v3 4/4] dt-bindings: trivial-devices: Add sht2x sensors Kurt Borja
@ 2025-09-08 7:02 ` Krzysztof Kozlowski
2025-09-08 11:28 ` Kurt Borja
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-08 7:02 UTC (permalink / raw)
To: Kurt Borja, Jean Delvare, Guenter Roeck, Jonathan Corbet,
Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, stable
On 08/09/2025 03:33, Kurt Borja wrote:
> Add sensirion,sht2x trivial sensors.
>
> Cc: stable@vger.kernel.org
No, drop. No bug to fix here.
Please organize the patch documenting compatible (DT bindings) before
their user.
See also:
https://elixir.bootlin.com/linux/v6.14-rc6/source/Documentation/devicetree/bindings/submitting-patches.rst#L46
>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 4/4] dt-bindings: trivial-devices: Add sht2x sensors
2025-09-08 7:02 ` Krzysztof Kozlowski
@ 2025-09-08 11:28 ` Kurt Borja
2025-09-08 14:16 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Kurt Borja @ 2025-09-08 11:28 UTC (permalink / raw)
To: Krzysztof Kozlowski, Jean Delvare, Guenter Roeck, Jonathan Corbet,
Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, stable
Hi Krzysztof,
On Mon Sep 8, 2025 at 2:02 AM -05, Krzysztof Kozlowski wrote:
> On 08/09/2025 03:33, Kurt Borja wrote:
>> Add sensirion,sht2x trivial sensors.
>>
>> Cc: stable@vger.kernel.org
>
> No, drop. No bug to fix here.
I included it because stable is fine with device IDs [1]. Is this
avoided with dt-bindings related stuff?
>
> Please organize the patch documenting compatible (DT bindings) before
> their user.
> See also:
> https://elixir.bootlin.com/linux/v6.14-rc6/source/Documentation/devicetree/bindings/submitting-patches.rst#L46
I will reorder.
Thanks for the review!
>>
>
>
> Best regards,
> Krzysztof
[1] https://elixir.bootlin.com/linux/v6.17-rc4/source/Documentation/process/stable-kernel-rules.rst#L15
--
~ Kurt
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 4/4] dt-bindings: trivial-devices: Add sht2x sensors
2025-09-08 11:28 ` Kurt Borja
@ 2025-09-08 14:16 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-08 14:16 UTC (permalink / raw)
To: Kurt Borja, Jean Delvare, Guenter Roeck, Jonathan Corbet,
Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-hwmon, linux-doc, linux-kernel, devicetree, stable
On 08/09/2025 13:28, Kurt Borja wrote:
> Hi Krzysztof,
>
> On Mon Sep 8, 2025 at 2:02 AM -05, Krzysztof Kozlowski wrote:
>> On 08/09/2025 03:33, Kurt Borja wrote:
>>> Add sensirion,sht2x trivial sensors.
>>>
>>> Cc: stable@vger.kernel.org
>>
>> No, drop. No bug to fix here.
>
> I included it because stable is fine with device IDs [1]. Is this
> avoided with dt-bindings related stuff?
You do not add quirks or new IDs. You add something completely new -
support for OF. That's a feature in this driver.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread