diff mbox series

[v2,4/4] dt-bindings: hwmon: Add Amphenol ChipCap 2

Message ID 20231020-topic-chipcap2-v2-4-f5c325966fdb@gmail.com
State Superseded
Headers show
Series [v2,1/4] dt-bindings: vendor-prefixes: add Amphenol | expand

Commit Message

Javier Carrasco Nov. 8, 2023, 3:37 p.m. UTC
Add device tree bindings and an example for the ChipCap 2 humidity
and temperature sensor.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
 .../bindings/hwmon/amphenol,chipcap2.yaml          | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)

Comments

Krzysztof Kozlowski Nov. 9, 2023, 8:53 a.m. UTC | #1
On 08/11/2023 16:37, Javier Carrasco wrote:
> Add device tree bindings and an example for the ChipCap 2 humidity
> and temperature sensor.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
>  .../bindings/hwmon/amphenol,chipcap2.yaml          | 68 ++++++++++++++++++++++
>  1 file changed, 68 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml
> new file mode 100644
> index 000000000000..8bb6daa293d3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml
> @@ -0,0 +1,68 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hwmon/amphenol,chipcap2.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ChipCap 2 humidity and temperature iio sensor
> +
> +maintainers:
> +  - Javier Carrasco <javier.carrasco.cruz@gmail.com>
> +
> +description: |
> +  Relative humidity and temperature sensor on I2C bus.
> +
> +  Datasheets:
> +    https://www.amphenol-sensors.com/en/telaire/humidity/527-humidity-sensors/3095-chipcap-2
> +
> +properties:
> +  compatible:
> +    enum:
> +      - amphenol,cc2dxx
> +      - amphenol,cc2dxxs
> +

Nothing improved.

Really, you just ignored the review.

Best regards,
Krzysztof
Javier Carrasco Nov. 9, 2023, 9:02 a.m. UTC | #2
On 09.11.23 09:53, Krzysztof Kozlowski wrote:
> On 08/11/2023 16:37, Javier Carrasco wrote:
>> Add device tree bindings and an example for the ChipCap 2 humidity
>> and temperature sensor.
>>
>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
>> ---
>>  .../bindings/hwmon/amphenol,chipcap2.yaml          | 68 ++++++++++++++++++++++
>>  1 file changed, 68 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml
>> new file mode 100644
>> index 000000000000..8bb6daa293d3
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml
>> @@ -0,0 +1,68 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/hwmon/amphenol,chipcap2.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: ChipCap 2 humidity and temperature iio sensor
>> +
>> +maintainers:
>> +  - Javier Carrasco <javier.carrasco.cruz@gmail.com>
>> +
>> +description: |
>> +  Relative humidity and temperature sensor on I2C bus.
>> +
>> +  Datasheets:
>> +    https://www.amphenol-sensors.com/en/telaire/humidity/527-humidity-sensors/3095-chipcap-2
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - amphenol,cc2dxx
>> +      - amphenol,cc2dxxs
>> +
> 
> Nothing improved.
> 
> Really, you just ignored the review.
> 
> Best regards,
> Krzysztof
> 
I am sorry if I missed something from your first review. I changed the
interrupt description to have one per item as you suggested and removed
the empty line. I did not change the compatible enum to add all part
numbers because it was still under discussion, but now that I know that
I have to add all of them, I will change for the next version.

Best regards,
Javier Carrasco
Krzysztof Kozlowski Nov. 9, 2023, 9:20 a.m. UTC | #3
On 09/11/2023 10:02, Javier Carrasco wrote:
> 
> 
> On 09.11.23 09:53, Krzysztof Kozlowski wrote:
>> On 08/11/2023 16:37, Javier Carrasco wrote:
>>> Add device tree bindings and an example for the ChipCap 2 humidity
>>> and temperature sensor.
>>>
>>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
>>> ---
>>>  .../bindings/hwmon/amphenol,chipcap2.yaml          | 68 ++++++++++++++++++++++
>>>  1 file changed, 68 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml
>>> new file mode 100644
>>> index 000000000000..8bb6daa293d3
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml
>>> @@ -0,0 +1,68 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/hwmon/amphenol,chipcap2.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: ChipCap 2 humidity and temperature iio sensor
>>> +
>>> +maintainers:
>>> +  - Javier Carrasco <javier.carrasco.cruz@gmail.com>
>>> +
>>> +description: |
>>> +  Relative humidity and temperature sensor on I2C bus.
>>> +
>>> +  Datasheets:
>>> +    https://www.amphenol-sensors.com/en/telaire/humidity/527-humidity-sensors/3095-chipcap-2
>>> +
>>> +properties:
>>> +  compatible:
>>> +    enum:
>>> +      - amphenol,cc2dxx
>>> +      - amphenol,cc2dxxs
>>> +
>>
>> Nothing improved.
>>
>> Really, you just ignored the review.
>>
>> Best regards,
>> Krzysztof
>>
> I am sorry if I missed something from your first review. I changed the
> interrupt description to have one per item as you suggested and removed
> the empty line. I did not change the compatible enum to add all part
> numbers because it was still under discussion, but now that I know that
> I have to add all of them, I will change for the next version.

And a new patch should not be sent while discussion happens. Literally I
had no chances to respond to your comment and v2 appears.

Best regards,
Krzysztof
Javier Carrasco Nov. 9, 2023, 9:25 a.m. UTC | #4
On 09.11.23 10:20, Krzysztof Kozlowski wrote:
> On 09/11/2023 10:02, Javier Carrasco wrote:
>>
>>
>> On 09.11.23 09:53, Krzysztof Kozlowski wrote:
>>> On 08/11/2023 16:37, Javier Carrasco wrote:
>>>> Add device tree bindings and an example for the ChipCap 2 humidity
>>>> and temperature sensor.
>>>>
>>>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
>>>> ---
>>>>  .../bindings/hwmon/amphenol,chipcap2.yaml          | 68 ++++++++++++++++++++++
>>>>  1 file changed, 68 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml
>>>> new file mode 100644
>>>> index 000000000000..8bb6daa293d3
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml
>>>> @@ -0,0 +1,68 @@
>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>>> +%YAML 1.2
>>>> +---
>>>> +$id: http://devicetree.org/schemas/hwmon/amphenol,chipcap2.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: ChipCap 2 humidity and temperature iio sensor
>>>> +
>>>> +maintainers:
>>>> +  - Javier Carrasco <javier.carrasco.cruz@gmail.com>
>>>> +
>>>> +description: |
>>>> +  Relative humidity and temperature sensor on I2C bus.
>>>> +
>>>> +  Datasheets:
>>>> +    https://www.amphenol-sensors.com/en/telaire/humidity/527-humidity-sensors/3095-chipcap-2
>>>> +
>>>> +properties:
>>>> +  compatible:
>>>> +    enum:
>>>> +      - amphenol,cc2dxx
>>>> +      - amphenol,cc2dxxs
>>>> +
>>>
>>> Nothing improved.
>>>
>>> Really, you just ignored the review.
>>>
>>> Best regards,
>>> Krzysztof
>>>
>> I am sorry if I missed something from your first review. I changed the
>> interrupt description to have one per item as you suggested and removed
>> the empty line. I did not change the compatible enum to add all part
>> numbers because it was still under discussion, but now that I know that
>> I have to add all of them, I will change for the next version.
> 
> And a new patch should not be sent while discussion happens. Literally I
> had no chances to respond to your comment and v2 appears.
> 
> Best regards,
> Krzysztof
> 
You are right, there is a lot to review and I should have gathered more
feedback. I will wait a few days to receive more input and in the
meantime I will add all part numbers (there is eight of them, which is
manageable) to the documentation and the device tables. Wildcards and
families will be dropped.

Thank for your feedback and best regards,
Javier Carrasco
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml
new file mode 100644
index 000000000000..8bb6daa293d3
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/amphenol,chipcap2.yaml
@@ -0,0 +1,68 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/amphenol,chipcap2.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ChipCap 2 humidity and temperature iio sensor
+
+maintainers:
+  - Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+description: |
+  Relative humidity and temperature sensor on I2C bus.
+
+  Datasheets:
+    https://www.amphenol-sensors.com/en/telaire/humidity/527-humidity-sensors/3095-chipcap-2
+
+properties:
+  compatible:
+    enum:
+      - amphenol,cc2dxx
+      - amphenol,cc2dxxs
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: measurement ready indicator
+      - description: low humidity alarm
+      - description: high humidity alarm
+
+  interrupt-names:
+    items:
+      - const: ready
+      - const: low
+      - const: high
+
+  vdd-supply:
+    description:
+      Dedicated, controllable supply-regulator to reset the device and
+      enter in command mode.
+      If not defined, no alarms will be available.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        humidity@28 {
+            compatible = "amphenol,cc2dxxs";
+            reg = <0x28>;
+            interrupt-parent = <&gpio>;
+            interrupts = <4 IRQ_TYPE_EDGE_RISING>,
+                         <5 IRQ_TYPE_EDGE_RISING>,
+                         <6 IRQ_TYPE_EDGE_RISING>;
+            interrupt-names = "ready", "low", "high";
+            vdd-supply = <&reg_vdd>;
+        };
+    };