Commit Graph

5 Commits

Author SHA1 Message Date
Colin Ian King b1ca80e4a2 platform/x86: GPD pocket fan: fix spelling mistake: "Mill-celcius" -> "millicelsius"
Trivial fix to spelling mistake in MODULE_PARM_DESC text and remove
unnecessary hyphen.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-02-15 12:21:48 +02:00
Hans de Goede e5778689a9 platform/x86: GPD pocket fan: Stop work on suspend
Stop the work on suspend, otherwise it may run between our suspend method
running and the system suspending, possibly restarting the fan which
we've just stopped.

Note we already requeue the work on resume, so that we get a fresh speed
at resume.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-01-29 20:44:16 +02:00
Hans de Goede 594ce6db32 platform/x86: GPD pocket fan: Use a min-speed of 2 while charging
Newer versions of the GPD pocket BIOS set the fan-speed to 2 when a
charger gets plugged in while the device is off. Mirror this in our
fan driver and use a minimum speed of 2 while charging,

Cc: James <kernel@madingley.org>
Suggested-by: James <kernel@madingley.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-01-29 20:44:15 +02:00
Hans de Goede d890acf728 platform/x86: GPD pocket fan: Set speed to max on get_temp failure
When we fail to get the temperature, assume the worst and set the speed
to max.

While at it introduce a define for MAX_SPEED.

Cc: James <kernel@madingley.org>
Suggested-by: James <kernel@madingley.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-01-29 20:44:15 +02:00
Hans de Goede 1b46f17d68 platform/x86: Add driver for GPD pocket custom fan controller
Add a driver for the GPD pocket device's custom fan controller, which
gets controlled through 2 GPIOs listed in a FAN02501 ACPI device.

Cc: James <kernel@madingley.org>
Suggested-by: James <kernel@madingley.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-12-21 14:56:28 +02:00