summaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorMantravadi Karthik <mkarthik@nvidia.com>2020-11-20 02:43:40 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2020-12-25 12:38:32 -0500
commitc3cd2b4417ea8767d35b4e04ba9731fb58a2a477 (patch)
treefb57feeb7c54f9b45918535e7a39f885c3acc0fc /include/linux/platform_data
parent9425bab1bf4671b4b970410b798aa9ec76c213a4 (diff)
pwm: fan: Add support for always on fan
Why? In case of continuous governor, the fan-poweron pwm value is assumed to be at index 1 of pwm values. In case of tmargin the pwm table would be reversed (high to low) and hence the assumption is invalid. How? While calculating the pwm value in the case of continuous governor, add a check if the cooling device is always on fan. If true, for all values of temp, pwm should be calculated instead of assigning 0. Bug 200646929 Change-Id: Ibed572fa2af9f8bd36a4a4cbb472029e21aeb442 Signed-off-by: Mantravadi Karthik <mkarthik@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2448826 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/pwm_fan.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/platform_data/pwm_fan.h b/include/linux/platform_data/pwm_fan.h
index cf35089ce..a5a874837 100644
--- a/include/linux/platform_data/pwm_fan.h
+++ b/include/linux/platform_data/pwm_fan.h
@@ -36,4 +36,8 @@ struct pwm_fan_platform_data {
36 int tach_gpio; 36 int tach_gpio;
37 int pwm_gpio; 37 int pwm_gpio;
38}; 38};
39
40#if IS_BUILTIN(CONFIG_PWM_FAN)
41bool is_fan_always_on(struct thermal_cooling_device *cdev);
42#endif
39#endif 43#endif