hwmon: (aspeed-pwm-tacho) increase fan tach period (again)
authorPaul Fertser <fercerpav@gmail.com>
Thu, 14 Jul 2022 14:23:44 +0000 (17:23 +0300)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 21 Jul 2022 14:15:55 +0000 (07:15 -0700)
commit3b1ea71faccba3abbf71f9a2510c212e1783b6e1
treed994e8fede5baa032b719effc233150965a31ba8
parent09e893092e005a191c1103c00d04806b5fd2e886
hwmon: (aspeed-pwm-tacho) increase fan tach period (again)

The old value allows measuring fan speeds down to about 970 RPM and
gives timeout for anything less than that. It is problematic because it
can also be used as an indicator for fan failure or absence.

Despite having read the relevant section of "ASPEED AST2500/AST2520 A2
Datasheet – V1.7" multiple times I wasn't able to figure out what
exactly "fan tach period" and "fan tach falling point of period" mean
(both are set by the driver from the constant this patch is amending).

Experimentation with a Tioga Pass OCP board (AST2500 BMC) showed that
value of 0x0108 gives time outs for speeds below 1500 RPM and the value
offered by the patch is good for at least 750 RPM (the fans can't spin
any slower so the lower bound is unknown). Measuring with the fans
spinning takes about 30 ms, sometimes down to 18 ms, so about the same
as with the previous value.

This constant was last changed with commit 762b1e888013 ("hwmon:
(aspeed-pwm-tacho) increase fan tach period")

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Link: https://lore.kernel.org/r/20220714142344.27071-1-fercerpav@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/aspeed-pwm-tacho.c