aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/thermal
AgeCommit message (Collapse)AuthorFilesLines
2024-11-04tools/lib/thermal: Remove the thermal.h soft link when doing make cleanzhang jiao1-1/+3
Run "make -C tools thermal" can create a soft link for thermal.h in tools/include/uapi/linux. Just rm it when make clean. Signed-off-by: zhang jiao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
2024-11-04tools/lib/thermal: Fix sampling handler context ptrEmil Dahl Juhl1-0/+2
The sampling handler, provided by the user alongside a void* context, was invoked with an internal structure instead of the user context. Correct the invocation of the sampling handler to pass the user context pointer instead. Note that the approach taken is similar to that in events.c, and will reduce the chances of this mistake happening if additional sampling callbacks are added. Fixes: 47c4b0de080a ("tools/lib/thermal: Add a thermal library") Signed-off-by: Emil Dahl Juhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
2023-02-15tools/lib/thermal: Fix include path for libnl3 in pkg-config file.Vibhav Pant1-1/+1
Fixes pkg-config returning malformed CFLAGS for libthermal. Signed-off-by: Vibhav Pant <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2023-02-15tools/lib/thermal: Fix thermal_sampling_exit()Vincent Guittot1-1/+1
thermal_sampling_init() suscribes to THERMAL_GENL_SAMPLING_GROUP_NAME group so thermal_sampling_exit() should unsubscribe from the same group. Fixes: 47c4b0de080a ("tools/lib/thermal: Add a thermal library") Signed-off-by: Vincent Guittot <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2022-05-19tools/lib/thermal: remove unneeded semicolonJiapeng Chong1-1/+1
Fix the following coccicheck warnings: ./tools/lib/thermal/commands.c:215:2-3: Unneeded semicolon. Reported-by: Abaci Robot <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
2022-05-19tools/lib/thermal: Add a thermal libraryDaniel Lezcano12-0/+1335
The thermal framework implements a netlink notification mechanism to be used by the userspace to have a thermal configuration discovery, trip point changes or violation, cooling device changes notifications, etc... This library provides a level of abstraction for the thermal netlink notification allowing the userspace to connect to the notification mechanism more easily. The library is callback oriented. Signed-off-by: Daniel Lezcano <[email protected]> Tested-by: Srinivas Pandruvada <[email protected]> Link: https://lore.kernel.org/r/[email protected]