Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0-or-later
0002 
0003 Kernel driver nzxt-smart2
0004 =========================
0005 
0006 Supported devices:
0007 
0008 - NZXT RGB & Fan controller
0009 - NZXT Smart Device v2
0010 
0011 Description
0012 -----------
0013 
0014 This driver implements monitoring and control of fans plugged into the device.
0015 Besides typical speed monitoring and PWM duty cycle control, voltage and current
0016 is reported for every fan.
0017 
0018 The device also has two connectors for RGB LEDs; support for them isn't
0019 implemented (mainly because there is no standardized sysfs interface).
0020 
0021 Also, the device has a noise sensor, but the sensor seems to be completely
0022 useless (and very imprecise), so support for it isn't implemented too.
0023 
0024 Usage Notes
0025 -----------
0026 
0027 The device should be autodetected, and the driver should load automatically.
0028 
0029 If fans are plugged in/unplugged while the system is powered on, the driver
0030 must be reloaded to detect configuration changes; otherwise, new fans can't
0031 be controlled (`pwm*` changes will be ignored). It is necessary because the
0032 device has a dedicated "detect fans" command, and currently, it is executed only
0033 during initialization. Speed, voltage, current monitoring will work even without
0034 reload. As an alternative to reloading the module, a userspace tool (like
0035 `liquidctl`_) can be used to run "detect fans" command through hidraw interface.
0036 
0037 The driver coexists with userspace tools that access the device through hidraw
0038 interface with no known issues.
0039 
0040 .. _liquidctl: https://github.com/liquidctl/liquidctl
0041 
0042 Sysfs entries
0043 -------------
0044 
0045 ======================= ========================================================
0046 fan[1-3]_input          Fan speed monitoring (in rpm).
0047 curr[1-3]_input         Current supplied to the fan (in milliamperes).
0048 in[0-2]_input           Voltage supplied to the fan (in millivolts).
0049 pwm[1-3]                Controls fan speed: PWM duty cycle for PWM-controlled
0050                         fans, voltage for other fans. Voltage can be changed in
0051                         9-12 V range, but the value of the sysfs attribute is
0052                         always in 0-255 range (1 = 9V, 255 = 12V). Setting the
0053                         attribute to 0 turns off the fan completely.
0054 pwm[1-3]_enable         1 if the fan can be controlled by writing to the
0055                         corresponding pwm* attribute, 0 otherwise. The device
0056                         can control only the fans it detected itself, so the
0057                         attribute is read-only.
0058 pwm[1-3]_mode           Read-only, 1 for PWM-controlled fans, 0 for other fans
0059                         (or if no fan connected).
0060 update_interval         The interval at which all inputs are updated (in
0061                         milliseconds). The default is 1000ms. Minimum is 250ms.
0062 ======================= ========================================================