hwmon: add driver for NZXT Kraken X42/X52/X62/X72
authorJonas Malaco <jonas@protocubo.io>
Fri, 19 Mar 2021 04:55:44 +0000 (01:55 -0300)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 20 Apr 2021 13:50:14 +0000 (06:50 -0700)
commit82e3430dfa8c32f35ce24a5c628e3e221f168769
treea35b7ad478d02c4f51fe40583f9732760ba29675
parentaf9a973040bd5c27dfa1c7b5e970b7cf9238b530
hwmon: add driver for NZXT Kraken X42/X52/X62/X72

These are "all-in-one" CPU liquid coolers that can be monitored and
controlled through a proprietary USB HID protocol.

While the models have differently sized radiators and come with varying
numbers of fans, they are all indistinguishable at the software level.

The driver exposes fan/pump speeds and coolant temperature through the
standard hwmon sysfs interface.

Fan and pump control, while supported by the devices, are not currently
exposed.  The firmware accepts up to 61 trip points per channel
(fan/pump), but the same set of trip temperatures has to be maintained
for both; with pwmX_auto_point_Y_temp attributes, users would need to
maintain this invariant themselves.

Instead, fan and pump control, as well as LED control (which the device
also supports for 9 addressable RGB LEDs on the CPU water block) are
left for existing and already mature user-space tools, which can still
be used alongside the driver, thanks to hidraw.  A link to one, which I
also maintain, is provided in the documentation.

The implementation is based on USB traffic analysis.  It has been
runtime tested on x86_64, both as a built-in driver and as a module.

Signed-off-by: Jonas Malaco <jonas@protocubo.io>
Link: https://lore.kernel.org/r/20210319045544.416138-1-jonas@protocubo.io
[groeck: Removed unnecessary spinlock.h include]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/index.rst
Documentation/hwmon/nzxt-kraken2.rst [new file with mode: 0644]
MAINTAINERS
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/nzxt-kraken2.c [new file with mode: 0644]