1*e28d0c73SAureo Serrano de Souza.. SPDX-License-Identifier: GPL-2.0-or-later 2*e28d0c73SAureo Serrano de Souza 3*e28d0c73SAureo Serrano de SouzaKernel driver arctic_fan_controller 4*e28d0c73SAureo Serrano de Souza===================================== 5*e28d0c73SAureo Serrano de Souza 6*e28d0c73SAureo Serrano de SouzaSupported devices: 7*e28d0c73SAureo Serrano de Souza 8*e28d0c73SAureo Serrano de Souza* ARCTIC Fan Controller (USB HID, VID 0x3904, PID 0xF001) 9*e28d0c73SAureo Serrano de Souza 10*e28d0c73SAureo Serrano de SouzaAuthor: Aureo Serrano de Souza <aureo.serrano@arctic.de> 11*e28d0c73SAureo Serrano de Souza 12*e28d0c73SAureo Serrano de SouzaDescription 13*e28d0c73SAureo Serrano de Souza----------- 14*e28d0c73SAureo Serrano de Souza 15*e28d0c73SAureo Serrano de SouzaThis driver provides hwmon support for the ARCTIC Fan Controller, a USB 16*e28d0c73SAureo Serrano de SouzaCustom HID device with 10 fan channels. The device sends IN reports about 17*e28d0c73SAureo Serrano de Souzaonce per second containing current RPM values (bytes 11-30, 10 x uint16 LE). 18*e28d0c73SAureo Serrano de SouzaFan speed control is manual-only: the device does not change PWM 19*e28d0c73SAureo Serrano de Souzaautonomously; it only applies a new duty cycle when it receives an OUT 20*e28d0c73SAureo Serrano de Souzareport from the host. 21*e28d0c73SAureo Serrano de Souza 22*e28d0c73SAureo Serrano de SouzaAfter the device applies an OUT report, it sends back a 2-byte ACK IN 23*e28d0c73SAureo Serrano de Souzareport (Report ID 0x02, byte 1 = 0x00 on success) confirming the command 24*e28d0c73SAureo Serrano de Souzawas applied. 25*e28d0c73SAureo Serrano de Souza 26*e28d0c73SAureo Serrano de SouzaUsage notes 27*e28d0c73SAureo Serrano de Souza----------- 28*e28d0c73SAureo Serrano de Souza 29*e28d0c73SAureo Serrano de SouzaSince it is a USB device, hotplug is supported. The device is autodetected. 30*e28d0c73SAureo Serrano de Souza 31*e28d0c73SAureo Serrano de SouzaThe device does not support GET_REPORT, so the driver cannot read back the 32*e28d0c73SAureo Serrano de Souzacurrent hardware PWM state at probe time. The cached PWM values (readable 33*e28d0c73SAureo Serrano de Souzavia pwm[1-10]) start at 0 and reflect only values that have been 34*e28d0c73SAureo Serrano de Souzasuccessfully written. Because each OUT report carries all 10 channel values, 35*e28d0c73SAureo Serrano de Souzawriting a single channel also sends the cached values for all other channels. 36*e28d0c73SAureo Serrano de SouzaUsers should set all channels to the desired values before relying on the 37*e28d0c73SAureo Serrano de Souzacached state. 38*e28d0c73SAureo Serrano de Souza 39*e28d0c73SAureo Serrano de SouzaOn system suspend, the device may lose power and reset its PWM channels to 40*e28d0c73SAureo Serrano de Souzahardware defaults. The driver clears its cached duty values on resume so 41*e28d0c73SAureo Serrano de Souzathat reads reflect the unknown hardware state rather than stale pre-suspend 42*e28d0c73SAureo Serrano de Souzavalues. Userspace is responsible for re-applying the desired duty cycles 43*e28d0c73SAureo Serrano de Souzaafter resume. 44*e28d0c73SAureo Serrano de Souza 45*e28d0c73SAureo Serrano de SouzaSysfs entries 46*e28d0c73SAureo Serrano de Souza------------- 47*e28d0c73SAureo Serrano de Souza 48*e28d0c73SAureo Serrano de Souza================ ============================================================== 49*e28d0c73SAureo Serrano de Souzafan[1-10]_input Fan speed in RPM (read-only). Updated from IN reports at ~1 Hz. 50*e28d0c73SAureo Serrano de Souzapwm[1-10] PWM duty cycle (0-255). Write: sends an OUT report setting the 51*e28d0c73SAureo Serrano de Souza duty cycle (scaled from 0-255 to 0-100% for the device); 52*e28d0c73SAureo Serrano de Souza the cached value is updated only after the device ACKs the 53*e28d0c73SAureo Serrano de Souza command with a success status. Read: returns the last 54*e28d0c73SAureo Serrano de Souza successfully written value; initialized to 0 at driver load 55*e28d0c73SAureo Serrano de Souza and after resume (hardware state unknown). 56*e28d0c73SAureo Serrano de Souza================ ============================================================== 57