platform/x86: GPD pocket fan: Allow somewhat lower/higher temperature limits
authorHans de Goede <hdegoede@redhat.com>
Mon, 6 Jan 2020 14:42:19 +0000 (15:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Feb 2020 21:22:45 +0000 (21:22 +0000)
[ Upstream commit 1f27dbd8265dbb379926c8f6a4453fe7fe26d7a3 ]

Allow the user to configure the fan to turn on / speed-up at lower
thresholds then before (20 degrees Celcius as minimum instead of 40) and
likewise also allow the user to delay the fan speeding-up till the
temperature hits 90 degrees Celcius (was 70).

Cc: Jason Anderson <jasona.594@gmail.com>
Reported-by: Jason Anderson <jasona.594@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/gpd-pocket-fan.c

index 73eb157..b471b86 100644 (file)
@@ -127,7 +127,7 @@ static int gpd_pocket_fan_probe(struct platform_device *pdev)
        int i;
 
        for (i = 0; i < ARRAY_SIZE(temp_limits); i++) {
-               if (temp_limits[i] < 40000 || temp_limits[i] > 70000) {
+               if (temp_limits[i] < 20000 || temp_limits[i] > 90000) {
                        dev_err(&pdev->dev, "Invalid temp-limit %d (must be between 40000 and 70000)\n",
                                temp_limits[i]);
                        temp_limits[0] = TEMP_LIMIT0_DEFAULT;