xref: /linux/Documentation/hwmon/pwm-fan.rst (revision 6c8c1406)
1Kernel driver pwm-fan
2=====================
3
4This driver enables the use of a PWM module to drive a fan. It uses the
5generic PWM interface thus it is hardware independent. It can be used on
6many SoCs, as long as the SoC supplies a PWM line driver that exposes
7the generic PWM API.
8
9Author: Kamil Debski <k.debski@samsung.com>
10
11Description
12-----------
13
14The driver implements a simple interface for driving a fan connected to
15a PWM output. It uses the generic PWM interface, thus it can be used with
16a range of SoCs. The driver exposes the fan to the user space through
17the hwmon's sysfs interface.
18
19The fan rotation speed returned via the optional 'fan1_input' is extrapolated
20from the sampled interrupts from the tachometer signal within 1 second.
21
22The driver provides the following sensor accesses in sysfs:
23
24=============== ======= =======================================================
25fan1_input	ro	fan tachometer speed in RPM
26pwm1_enable	rw	keep enable mode, defines behaviour when pwm1=0
27			0 -> disable pwm and regulator
28			1 -> enable pwm; if pwm==0, disable pwm, keep regulator enabled
29			2 -> enable pwm; if pwm==0, keep pwm and regulator enabled
30			3 -> enable pwm; if pwm==0, disable pwm and regulator
31pwm1		rw	relative speed (0-255), 255=max. speed.
32=============== ======= =======================================================
33