kernel-based thermal control (based on @crpalmer's work)

Signed-off-by: flar2 <asegaert@gmail.com>