i8k: Autodetect fan RPM multiplier

This patch adds new function i8k_get_fan_nominal_speed() for doing SMM call
which will return nominal fan RPM for specified fan speed. It returns nominal
RPM value at which fan operate when speed (0, 1, 2, 3) is set. It looks like
RPM value is not accurate, but still provides very useful information.

New function i8k_get_fan_nominal_speed() is used for determinate if fan
multiplier is 1 or 30. If function for maximal fan value success and returned
RPM value too high (above 30000) then fan multiplier is set to 1. Otherwise
multiplier is not changed and default value 30 is used.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 file changed