tools/lib/thermal: Fix misplaced extern "C" closing braceThe public libthermal header opens the C++ 'extern "C" {' block insidethe __LIBTHERMAL_H include guard, but places the closing brace after
tools/lib/thermal: Fix misplaced extern "C" closing braceThe public libthermal header opens the C++ 'extern "C" {' block insidethe __LIBTHERMAL_H include guard, but places the closing brace afterthe guard has already ended: #endif /* __LIBTHERMAL_H */ #ifdef __cplusplus } #endifOn a single inclusion the braces still balance, so the problem isinvisible. On the second inclusion of the header in the same C++translation unit the include guard skips the opening 'extern "C" {',while the closing '}' lives outside the guard and is emitted anyway.This leaves a stray '}' and breaks compilation for any C++ consumerthat includes the header more than once.Move the closing block inside the include guard so both halves of the'extern "C"' declaration are guarded consistently.Signed-off-by: Andreas Haufler <andreas@haufler.info>Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>Link: https://patch.msgid.link/20260721083230.91246-1-andreas@haufler.info
show more ...
tools/lib/thermal: Add the threshold netlink ABIThe thermal framework supports the thresholds and allows the userspaceto create, delete, flush, get the list of the thresholds as well asgetting th
tools/lib/thermal: Add the threshold netlink ABIThe thermal framework supports the thresholds and allows the userspaceto create, delete, flush, get the list of the thresholds as well asgetting the list of the thresholds set for a specific thermal zone.Add the netlink abstraction in the thermal library to take fulladvantage of thresholds for the userspace program.Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>Link: https://patch.msgid.link/20241022155147.463475-5-daniel.lezcano@linaro.orgSigned-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
tools/lib/thermal: Add a thermal libraryThe thermal framework implements a netlink notification mechanism tobe used by the userspace to have a thermal configuration discovery,trip point changes o
tools/lib/thermal: Add a thermal libraryThe thermal framework implements a netlink notification mechanism tobe 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 netlinknotification allowing the userspace to connect to the notificationmechanism more easily. The library is callback oriented.Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>Tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>Link: https://lore.kernel.org/r/20220420160933.347088-2-daniel.lezcano@linaro.org