Index of /kernel/hwmon/autofan

Name                    Last modified       Size  

Parent Directory 18-Jul-2010 10:06 - fan_speed 05-Oct-2008 09:07 1k fan_speed-result-no-fan 05-Oct-2008 09:07 1k

Notes
``````
Need to be superuser to run zx-test-fan-div as it writes to the 
driver sysfs settings.  Shell script is written for bash. 
Change the filepaths near top of script to match your driver.

Fan low limit setpoint error displayed as percentage.

This is one very tested algorithm, based on Jean Delvare's algorithm 
with much automated testing of various changes.  Along the way I also 
changed scaling macros to static inlines and checked error sources 
from setpoint entry to measurement reading.

User fan low limit speed input tested to quite silly values.

/*
 * set fan speed low limit:
 *
 * - value is zero: disable fan speed low limit alarm
 *
 * - value is below fan speed measurement range: enable fan speed low
 *   limit alarm to be asserted while fan speed too slow to measure
 *
 * - otherwise: select fan clock divider to suit fan speed low limit,
 *   measurement code may adjust registers to ensure fan speed reading
 */

The fan speed measurement code will adjust fan clock divider upwards 
on measurement overflow, as well as compensating the fan low limit 
speed register if required.  The adjustment algorithm trades accuracy 
in the fan low limit alarm setpoint in order to produce a fan speed 
reading when fan is spinning above minimum measureable speed.

A chip with maximum fan clock divider of 8 can measure down to 644 rpm, 
assuming the common two pulses per fan revolution.


/home/hwmon/autofan