linux-stable/include/linux/intel_tcc.h
Zhang Rui 9df6a7a3c9 thermal/intel: Fix intel_tcc_get_temp() to support negative CPU temperature
[ Upstream commit 7251b9e8a0 ]

CPU temperature can be negative in some cases. Thus the negative CPU
temperature should not be considered as a failure.

Fix intel_tcc_get_temp() and its users to support negative CPU
temperature.

Fixes: a3c1f066e1 ("thermal/intel: Introduce Intel TCC library")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Cc: 6.3+ <stable@vger.kernel.org> # 6.3+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-03 15:28:18 +02:00

18 lines
429 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* header for Intel TCC (thermal control circuitry) library
*
* Copyright (C) 2022 Intel Corporation.
*/
#ifndef __INTEL_TCC_H__
#define __INTEL_TCC_H__
#include <linux/types.h>
int intel_tcc_get_tjmax(int cpu);
int intel_tcc_get_offset(int cpu);
int intel_tcc_set_offset(int cpu, int offset);
int intel_tcc_get_temp(int cpu, int *temp, bool pkg);
#endif /* __INTEL_TCC_H__ */