File: pwm-fan.rst

package info (click to toggle)
linux 6.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,488,076 kB
  • sloc: ansic: 23,401,844; asm: 266,744; sh: 108,976; makefile: 49,705; python: 36,927; perl: 36,810; cpp: 6,044; yacc: 4,904; lex: 2,722; awk: 1,440; ruby: 25; sed: 5
file content (32 lines) | stat: -rw-r--r-- 1,344 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Kernel driver pwm-fan
=====================

This driver enables the use of a PWM module to drive a fan. It uses the
generic PWM interface thus it is hardware independent. It can be used on
many SoCs, as long as the SoC supplies a PWM line driver that exposes
the generic PWM API.

Author: Kamil Debski <k.debski@samsung.com>

Description
-----------

The driver implements a simple interface for driving a fan connected to
a PWM output. It uses the generic PWM interface, thus it can be used with
a range of SoCs. The driver exposes the fan to the user space through
the hwmon's sysfs interface.

The fan rotation speed returned via the optional 'fan1_input' is extrapolated
from the sampled interrupts from the tachometer signal within 1 second.

The driver provides the following sensor accesses in sysfs:

=============== ======= =======================================================
fan1_input	ro	fan tachometer speed in RPM
pwm1_enable	rw	keep enable mode, defines behaviour when pwm1=0
			0 -> disable pwm and regulator
			1 -> enable pwm; if pwm==0, disable pwm, keep regulator enabled
			2 -> enable pwm; if pwm==0, keep pwm and regulator enabled
			3 -> enable pwm; if pwm==0, disable pwm and regulator
pwm1		rw	relative speed (0-255), 255=max. speed.
=============== ======= =======================================================