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

From: Javier Carrasco
Date: Wed Nov 08 2023 - 07:44:59 EST


Hello,

On 08.11.23 13:34, Krzysztof Kozlowski wrote:
> On 08/11/2023 13:29, 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@xxxxxxxxx>
>> ---
>
> ...
>
>> +maintainers:
>> + - Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
>> +
>> +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
>
> What does xx stand for? Wildcard? I do not see cc2dxx in part numbers.
> We expect specific compatibles, not generic. What are the differences
> between all parts?
>
There are two device families: cc2dxx and cc2dxxs, where xx indicates
the voltage and the accuracy. That does not change how the devices works
and it is not relevant for the driver. The 's' indicates that it is a
sleep device, and that modifies how it works.
I listed the supported part numbers in the hwmon documentation, where
they are also divided into these two families.
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + interrupts:
>> + maxItems: 3
>> + description: |
>> + The device provides three optional interrupts. READY indicates that
>> + a measurement was finished. LOW indicates a low humidity alarm and
>> + HIGH a high humidity alarm.
>> + All interrupts must be IRQ_TYPE_RISING_EDGE.
>
> Instead use items: with description: for each item.
>
>> +
>> + interrupt-names:
>> + items:
>> + - const: READY
>> + - const: LOW
>> + - const: HIGH
>
> Lowercase names
>
>> +
>> + vdd-supply:
>> + description:
>> + Dedicated, controllable supply-regulator to reset the device and
>> + enter in command mode. If defined, it must provide a GPIO for its
>> + control.
>
> I don't understand what GPIO has anything to do with power supply.
>
>> + If not defined, no alarms will be available.
>> +
>> +
>
> Only one blank line.
>
>> +required:
>> + - compatible
>> + - reg
>> +
>> +additionalProperties: false
>
> Best regards,
> Krzysztof
>
Thanks for your review.

Best regards,
Javier Carrasco