diff mbox series

[v1,3/3] dt-bindings: hwmon: add sht3x devicetree binding

Message ID DB4PR10MB6261859DA1087597DDC3CCB39226A@DB4PR10MB6261.EURPRD10.PROD.OUTLOOK.COM (mailing list archive)
State Changes Requested
Headers show
Series [v1,1/3] hwmon: (sht3x) convert some of sysfs interface to hwmon | expand

Commit Message

JuenKit Yip June 26, 2023, 7:29 a.m. UTC
From: JuenKit Yip <JuenKit_Yip@hotmail.com>

add sht3x devicetree binding files

Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
---
v1:
  - fix semantics error

 .../bindings/hwmon/sensirion,sht3x.yaml       | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml

Comments

Krzysztof Kozlowski June 26, 2023, 7:36 a.m. UTC | #1
On 26/06/2023 09:29, JuenKit_Yip@hotmail.com wrote:
> From: JuenKit Yip <JuenKit_Yip@hotmail.com>
> 
> add sht3x devicetree binding files
> 
> Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
> ---
> v1:
>   - fix semantics error

How first release can have already fixes? Against what? Is it truly v1?

What is a "semantics error"?

A nit, subject: drop second/last, redundant "devicetree binding". The
"dt-bindings" prefix is already stating that these are bindings.


> 
>  .../bindings/hwmon/sensirion,sht3x.yaml       | 35 +++++++++++++++++++
>  1 file changed, 35 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..71a50bd57af2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
> @@ -0,0 +1,35 @@
> +# 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,sht3x

The actual devices are SHT30, 31 and 35. I understand they don't differ
in programming interface, but still don't use wildcard, so just
sensirion,sht30

> +      - sensirion,sts3x

Similarly - no wildcards.

Missing blank line.


> +  reg:
> +    maxItems: 1

Missing vdd-supply (required) and reset-gpios (optional).

> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +


Best regards,
Krzysztof
JuenKit Yip June 27, 2023, 12:29 a.m. UTC | #2
在 2023/6/26 15:36, Krzysztof Kozlowski 写道:
> On 26/06/2023 09:29, JuenKit_Yip@hotmail.com wrote:
>> From: JuenKit Yip <JuenKit_Yip@hotmail.com>
>>
>> add sht3x devicetree binding files
>>
>> Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
>> ---
>> v1:
>>    - fix semantics error
> How first release can have already fixes? Against what? Is it truly v1?
>
> What is a "semantics error"?
>
> A nit, subject: drop second/last, redundant "devicetree binding". The
> "dt-bindings" prefix is already stating that these are bindings.
>
>
>>   .../bindings/hwmon/sensirion,sht3x.yaml       | 35 +++++++++++++++++++
>>   1 file changed, 35 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..71a50bd57af2
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
>> @@ -0,0 +1,35 @@
>> +# 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,sht3x
> The actual devices are SHT30, 31 and 35. I understand they don't differ
> in programming interface, but still don't use wildcard, so just
> sensirion,sht30
>
>> +      - sensirion,sts3x
> Similarly - no wildcards.
>
> Missing blank line.
>
>
>> +  reg:
>> +    maxItems: 1
> Missing vdd-supply (required) and reset-gpios (optional).

It means that we should implement relevant codes about vdd-supply?

>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +additionalProperties: false
>> +
>
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski June 27, 2023, 6:05 a.m. UTC | #3
On 27/06/2023 02:29, JuenKit Yip wrote:
>>
>>
>>> +  reg:
>>> +    maxItems: 1
>> Missing vdd-supply (required) and reset-gpios (optional).
> 
> It means that we should implement relevant codes about vdd-supply?

It means your binding should have vdd-supply, which is required, and
reset-gpios, which is optional.


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml b/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
new file mode 100644
index 000000000000..71a50bd57af2
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/sensirion,sht3x.yaml
@@ -0,0 +1,35 @@ 
+# 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,sht3x
+      - sensirion,sts3x
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      sensor@4a {
+        compatible = "sensirion,sht3x";
+        reg = <0x4a>;
+      };
+    };