This patch changes pwmconfig to perform much smaller steps when testing fans
which have by far most of their speed change with PWM values below 16. This is
true for the fan shipped with an AMD Athlon64 3200+ CPU.

To make the fan control for this fan work, it is also necessary to adjust the 
MINSTART value in /etc/fancontrol considerably down, probably to somewhere
around 5 (4 works at least while the fan is new), and to adjust the MAXTEMP
value upwards to way above what one consider reasonable (try 90). The latter is
necessary as long as the fancontrol scripts interpolates along a straight line
to find a PWM value as a function of CPU temperature.

Volker Kuhlmann, 8 Jan 2006



--- /usr/sbin/pwmconfig.orig	2005-09-13 12:34:49.000000000 +1200
+++ /usr/sbin/pwmconfig	2005-12-20 23:47:34.000000000 +1300
@@ -188,7 +188,9 @@
 
 PLOTTER=gnuplot
 STEP=15
-PDELAY=2
+STEP2=2
+STEP2_BELOW=31
+PDELAY=3
 
 function pwmdetail()
 {
@@ -256,6 +258,7 @@
 			fi
 			break
 		fi
+		test $pwm -lt $STEP2_BELOW && let STEP=$STEP2
 		let pwm=$pwm-$STEP
 	done
 	pwmdisable $P	

