Message ID | 20231020-topic-chipcap2-v1-0-087e21d4b1ed@gmail.com |
---|---|
Headers | show |
Series | hwmon: Add support for Amphenol ChipCap 2 | expand |
On 11/9/23 00:41, Krzysztof Kozlowski wrote: > On 08/11/2023 13:44, Javier Carrasco wrote: > >>>> +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. > > If the number of devices is relatively small, list them all. Otherwise > choose one device model and use it. No family models. No wildcards. > Agreed. There is no guarantee that CC2D[00..99][X] will be the same devices. Guenter
This series adds support and documentation for the Amphenol ChipCap 2 humidity and temperature sensor in its digital version. This I2C device provides 14-bit humidity and temperature measurements as well as low (minimum) and high (maximum) humidity alarms. A ready signal is also available to reduce delays while fetching data. The proposed driver implements the logic to perform measurements with and without the ready signal, EEPROM configuration and alarm signaling. The features this driver does not support (I2C address and command window length modification) have been documented in the "Known Issues" section. The complete supported functionality has been tested with a CC2D33S sensor (a 'sleep' device) connected to a Raspberry Pi Zero 2 w. Different device tree node definitions (with and without regulator, ready and/or alarm signals) have been positively tested. The non-sleep measurement mechanism has been inferred from the first measurement, which is carried out automatically and it is common for all part numbers. Any testing or improvements with a non-sleep device is more than welcome. The tests have also covered the properties added to the hwmon core to account for minimum and maximum humidity alarms. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> --- Javier Carrasco (4): dt-bindings: vendor-prefixes: add Amphenol hwmon: (core) Add support for humidity min/max alarm hwmon: Add support for Amphenol ChipCap 2 dt-bindings: hwmon: Add Amphenol ChipCap 2 .../bindings/hwmon/amphenol,chipcap2.yaml | 72 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + Documentation/hwmon/chipcap2.rst | 73 ++ Documentation/hwmon/index.rst | 1 + MAINTAINERS | 8 + drivers/hwmon/Kconfig | 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/chipcap2.c | 1009 ++++++++++++++++++++ drivers/hwmon/hwmon.c | 2 + include/linux/hwmon.h | 4 + 10 files changed, 1182 insertions(+) --- base-commit: ffc253263a1375a65fa6c9f62a893e9767fbebfa change-id: 20231020-topic-chipcap2-e2d8985430c2 Best regards,