* [PATCH v3 2/3] hwmon: (sht3x) add devicetree support
[not found] <20230703140818.427403-1-JuenKit_Yip@hotmail.com>
@ 2023-07-03 14:08 ` JuenKit Yip
2023-07-03 14:08 ` [PATCH v3 3/3] dt-bindings: hwmon: add sht3x devicetree binding JuenKit Yip
1 sibling, 0 replies; 4+ messages in thread
From: JuenKit Yip @ 2023-07-03 14:08 UTC (permalink / raw)
To: jdelvare, robh+dt, krzysztof.kozlowski+dt, conor+dt, linux
Cc: linux-hwmon, devicetree, linux-kernel, JuenKit Yip
add "compatible" property for supporting devicetree
Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
---
v3:
- fix wildcards problem
drivers/hwmon/sht3x.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/sht3x.c b/drivers/hwmon/sht3x.c
index 79657910b79e..bb8586233adc 100644
--- a/drivers/hwmon/sht3x.c
+++ b/drivers/hwmon/sht3x.c
@@ -911,8 +911,23 @@ static int sht3x_probe(struct i2c_client *client)
return PTR_ERR_OR_ZERO(hwmon_dev);
}
+/* devicetree ID table */
+static const struct of_device_id sht3x_of_match[] = {
+ { .compatible = "sensirion,sht30" },
+ { .compatible = "sensirion,sht31" },
+ { .compatible = "sensirion,sht35" },
+ { .compatible = "sensirion,sts30" },
+ { .compatible = "sensirion,sts31" },
+ { .compatible = "sensirion,sts35" },
+ {},
+};
+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,
};
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 3/3] dt-bindings: hwmon: add sht3x devicetree binding
[not found] <20230703140818.427403-1-JuenKit_Yip@hotmail.com>
2023-07-03 14:08 ` [PATCH v3 2/3] hwmon: (sht3x) add devicetree support JuenKit Yip
@ 2023-07-03 14:08 ` JuenKit Yip
2023-07-03 14:39 ` Krzysztof Kozlowski
1 sibling, 1 reply; 4+ messages in thread
From: JuenKit Yip @ 2023-07-03 14:08 UTC (permalink / raw)
To: jdelvare, robh+dt, krzysztof.kozlowski+dt, conor+dt, linux
Cc: linux-hwmon, devicetree, linux-kernel, JuenKit Yip
add sht3x devicetree binding files
Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
---
v3:
- fix wildcards problem
- add vdd-supply property
.../bindings/hwmon/sensirion,sht3x.yaml | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
diff --git a/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml b/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
new file mode 100644
index 000000000000..bef2eb492a47
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/sensirion,sht3x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sensirion SHT3x-DIS humidity and temperature sensor
+
+maintainers:
+ - JuenKit Yip <JuenKit_Yip@hotmail.com>
+
+properties:
+ compatible:
+ enum:
+ - sensirion,sht30
+ - sensirion,sht31
+ - sensirion,sht35
+ - sensirion,sts30
+ - sensirion,sts31
+ - sensirion,sts35
+
+ reg:
+ maxItems: 1
+
+ vdd-supply:
+ description: regulator that drives the VDD pin
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ sensor@4a {
+ compatible = "sensirion,sht31";
+ reg = <0x4a>;
+ vdd-supply = <®_sht31>;
+ };
+ };
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 3/3] dt-bindings: hwmon: add sht3x devicetree binding
2023-07-03 14:08 ` [PATCH v3 3/3] dt-bindings: hwmon: add sht3x devicetree binding JuenKit Yip
@ 2023-07-03 14:39 ` Krzysztof Kozlowski
2023-07-19 15:27 ` Guenter Roeck
0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-03 14:39 UTC (permalink / raw)
To: JuenKit Yip, jdelvare, robh+dt, krzysztof.kozlowski+dt, conor+dt,
linux
Cc: linux-hwmon, devicetree, linux-kernel
On 03/07/2023 16:08, JuenKit Yip wrote:
> add sht3x devicetree binding files
>
> Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
> ---
> v3:
> - fix wildcards problem
> - add vdd-supply property
No improvements in subject.
>
> .../bindings/hwmon/sensirion,sht3x.yaml | 45 +++++++++++++++++++
> 1 file changed, 45 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
>
> diff --git a/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml b/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
> new file mode 100644
> index 000000000000..bef2eb492a47
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
> @@ -0,0 +1,45 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hwmon/sensirion,sht3x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Sensirion SHT3x-DIS humidity and temperature sensor
> +
> +maintainers:
> + - JuenKit Yip <JuenKit_Yip@hotmail.com>
> +
> +properties:
> + compatible:
> + enum:
> + - sensirion,sht30
> + - sensirion,sht31
> + - sensirion,sht35
> + - sensirion,sts30
> + - sensirion,sts31
> + - sensirion,sts35
Your driver change suggests these are compatible, so make them such with
oneOf and a list.
> +
> + reg:
> + maxItems: 1
> +
> + vdd-supply:
> + description: regulator that drives the VDD pin
Missing reset-gpios. It's the second ignored comment.
This is a friendly reminder during the review process.
It seems my previous comments were not fully addressed. Maybe my
feedback got lost between the quotes, maybe you just forgot to apply it.
Please go back to the previous discussion and either implement all
requested changes or keep discussing them.
Thank you.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 3/3] dt-bindings: hwmon: add sht3x devicetree binding
2023-07-03 14:39 ` Krzysztof Kozlowski
@ 2023-07-19 15:27 ` Guenter Roeck
0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2023-07-19 15:27 UTC (permalink / raw)
To: Krzysztof Kozlowski, JuenKit Yip, jdelvare, robh+dt,
krzysztof.kozlowski+dt, conor+dt
Cc: linux-hwmon, devicetree, linux-kernel
On 7/3/23 07:39, Krzysztof Kozlowski wrote:
> On 03/07/2023 16:08, JuenKit Yip wrote:
>> add sht3x devicetree binding files
>>
>> Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
>> ---
>> v3:
>> - fix wildcards problem
>> - add vdd-supply property
>
> No improvements in subject.
>>
>> .../bindings/hwmon/sensirion,sht3x.yaml | 45 +++++++++++++++++++
>> 1 file changed, 45 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml b/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
>> new file mode 100644
>> index 000000000000..bef2eb492a47
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
>> @@ -0,0 +1,45 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/hwmon/sensirion,sht3x.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Sensirion SHT3x-DIS humidity and temperature sensor
>> +
>> +maintainers:
>> + - JuenKit Yip <JuenKit_Yip@hotmail.com>
>> +
>> +properties:
>> + compatible:
>> + enum:
>> + - sensirion,sht30
>> + - sensirion,sht31
>> + - sensirion,sht35
>> + - sensirion,sts30
>> + - sensirion,sts31
>> + - sensirion,sts35
>
> Your driver change suggests these are compatible, so make them such with
> oneOf and a list.
>
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + vdd-supply:
>> + description: regulator that drives the VDD pin
>
> Missing reset-gpios. It's the second ignored comment.
>
> This is a friendly reminder during the review process.
>
> It seems my previous comments were not fully addressed. Maybe my
> feedback got lost between the quotes, maybe you just forgot to apply it.
> Please go back to the previous discussion and either implement all
> requested changes or keep discussing them.
>
To clarify from previous replies: the properties need to be described
(because the chip needs a supply voltage, and because it has a reset pin,
and bindings should be complete), but that doesn't mean that the driver
has to implement them.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-19 15:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230703140818.427403-1-JuenKit_Yip@hotmail.com>
2023-07-03 14:08 ` [PATCH v3 2/3] hwmon: (sht3x) add devicetree support JuenKit Yip
2023-07-03 14:08 ` [PATCH v3 3/3] dt-bindings: hwmon: add sht3x devicetree binding JuenKit Yip
2023-07-03 14:39 ` Krzysztof Kozlowski
2023-07-19 15:27 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).