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

Javier Carrasco posted 4 patches 2 years, 1 month ago
There is a newer version of this series
[PATCH v2 4/4] dt-bindings: hwmon: Add Amphenol ChipCap 2
Posted by Javier Carrasco 2 years, 1 month ago
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
+
+  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>;
+        };
+    };

-- 
2.39.2
Re: [PATCH v2 4/4] dt-bindings: hwmon: Add Amphenol ChipCap 2
Posted by Krzysztof Kozlowski 2 years, 1 month ago
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
Re: [PATCH v2 4/4] dt-bindings: hwmon: Add Amphenol ChipCap 2
Posted by Javier Carrasco 2 years, 1 month ago

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
Re: [PATCH v2 4/4] dt-bindings: hwmon: Add Amphenol ChipCap 2
Posted by Krzysztof Kozlowski 2 years, 1 month ago
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
Re: [PATCH v2 4/4] dt-bindings: hwmon: Add Amphenol ChipCap 2
Posted by Javier Carrasco 2 years, 1 month ago

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
Re: [PATCH v2 4/4] dt-bindings: hwmon: Add Amphenol ChipCap 2
Posted by Conor Dooley 2 years, 1 month ago
On Thu, Nov 09, 2023 at 10:25:39AM +0100, Javier Carrasco wrote:
> 
> 
> 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.

I'm not sure what was said in the prior feedback, but it would be
possible, if any of these devices have an identical programming model,
is allow one of their compatibles in isolation and use that compatible
as a fallback for all other devices that have an identical or compatible
programming model.