Skip to content

Commit 0275c9f

Browse files
committed
thermal/core: Make the userspace governor deprecated
The userspace governor is sending temperature when polling is active and trip point crossed events. Nothing else. AFAICT, this governor is used with custom kernels making the userspace governor co-existing with another governor on the same thermal zone because there was no notification mechanism, implying a hack in the framework to support this configuration. The new netlink thermal notification is able to provide more information than the userspace governor and give the opportunity to the users of this governor to replace it by a dedicated notification framework. The userspace governor will be removed as its usage is no longer needed. Add a warning message to tell the userspace governor is deprecated. Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Lukasz Luba <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c4fcf1a commit 0275c9f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/thermal/gov_user_space.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515

1616
#include "thermal_core.h"
1717

18+
static int user_space_bind(struct thermal_zone_device *tz)
19+
{
20+
pr_warn("Userspace governor deprecated: use thermal netlink " \
21+
"notification instead\n");
22+
23+
return 0;
24+
}
25+
1826
/**
1927
* notify_user_space - Notifies user space about thermal events
2028
* @tz: thermal_zone_device
@@ -43,5 +51,6 @@ static int notify_user_space(struct thermal_zone_device *tz, int trip)
4351
static struct thermal_governor thermal_gov_user_space = {
4452
.name = "user_space",
4553
.throttle = notify_user_space,
54+
.bind_to_tz = user_space_bind,
4655
};
4756
THERMAL_GOVERNOR_DECLARE(thermal_gov_user_space);

0 commit comments

Comments
 (0)