162306a36Sopenharmony_ciKernel driver pwm-fan
262306a36Sopenharmony_ci=====================
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciThis driver enables the use of a PWM module to drive a fan. It uses the
562306a36Sopenharmony_cigeneric PWM interface thus it is hardware independent. It can be used on
662306a36Sopenharmony_cimany SoCs, as long as the SoC supplies a PWM line driver that exposes
762306a36Sopenharmony_cithe generic PWM API.
862306a36Sopenharmony_ci
962306a36Sopenharmony_ciAuthor: Kamil Debski <k.debski@samsung.com>
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciDescription
1262306a36Sopenharmony_ci-----------
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ciThe driver implements a simple interface for driving a fan connected to
1562306a36Sopenharmony_cia PWM output. It uses the generic PWM interface, thus it can be used with
1662306a36Sopenharmony_cia range of SoCs. The driver exposes the fan to the user space through
1762306a36Sopenharmony_cithe hwmon's sysfs interface.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciThe fan rotation speed returned via the optional 'fan1_input' is extrapolated
2062306a36Sopenharmony_cifrom the sampled interrupts from the tachometer signal within 1 second.
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciThe driver provides the following sensor accesses in sysfs:
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci=============== ======= =======================================================
2562306a36Sopenharmony_cifan1_input	ro	fan tachometer speed in RPM
2662306a36Sopenharmony_cipwm1_enable	rw	keep enable mode, defines behaviour when pwm1=0
2762306a36Sopenharmony_ci			0 -> disable pwm and regulator
2862306a36Sopenharmony_ci			1 -> enable pwm; if pwm==0, disable pwm, keep regulator enabled
2962306a36Sopenharmony_ci			2 -> enable pwm; if pwm==0, keep pwm and regulator enabled
3062306a36Sopenharmony_ci			3 -> enable pwm; if pwm==0, disable pwm and regulator
3162306a36Sopenharmony_cipwm1		rw	relative speed (0-255), 255=max. speed.
3262306a36Sopenharmony_ci=============== ======= =======================================================
33