Srinivas Pandruvada 84baf1725d ACPI / fan: Fix error reading cur_state
On some platforms with ACPI4 variable speed fan, reading cur_state from
cooling device returns "invalid value" error. This confuses user space
applications.

This issue occurs as the current driver doesn't take account of
"FineGrainControl" from _FIF(Fan Information). When the "FineGrainControl"
is set, _FSL(FSL Set Level) takes argument as a percent, which doesn't
have to match from any control value from _FPS(Fan Performance States).
It is also possible that the Fan is not actually running at the requested
speed returning a lower speed.
On some platforms the BIOS is setting fan speed to a level during boot,
which will not have an exact match to _FPS control values. The current
implementation will treat this level as invalid value.

The simple change is to atleast return state corresponding to a maximum
control value in the _FPS compared to the current level.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-10-10 02:20:43 +02:00
..
2016-07-26 18:48:23 -07:00
2015-07-08 02:27:32 +02:00
2016-04-27 23:42:57 +02:00
2016-04-27 23:42:57 +02:00
2015-07-08 02:27:32 +02:00
2016-01-04 22:10:30 +01:00
2015-07-08 02:27:32 +02:00
2015-07-08 02:27:32 +02:00
2016-10-10 02:20:43 +02:00
2015-11-07 01:30:10 +01:00
2015-07-08 02:27:32 +02:00
2016-08-02 17:12:29 -04:00
2015-09-01 03:38:43 +02:00
2015-09-01 15:52:35 +02:00
2016-07-19 12:32:39 -07:00