lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 22 Mar 2013 17:13:07 -0400
From:	Eduardo Valentin <eduardo.valentin@...com>
To:	Zhang Rui <rui.zhang@...el.com>
CC:	<linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	Eduardo Valentin <eduardo.valentin@...com>
Subject: [PATCH 2/2] staging: ti-soc-thermal: remove external heat while extrapolating hotspot

For boards that provide a PCB sensor close to SoC junction
temperature, it is possible to remove the cumulative heat
reported by the SoC temperature sensor.

This patch changes the extrapolation computation to consider
an external sensor in the extrapolation equations.

Signed-off-by: Eduardo Valentin <eduardo.valentin@...com>
---
 drivers/staging/ti-soc-thermal/ti-thermal-common.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ti-soc-thermal/ti-thermal-common.c b/drivers/staging/ti-soc-thermal/ti-thermal-common.c
index 231c549..52d3c1b 100644
--- a/drivers/staging/ti-soc-thermal/ti-thermal-common.c
+++ b/drivers/staging/ti-soc-thermal/ti-thermal-common.c
@@ -92,10 +92,9 @@ static inline int ti_thermal_get_temp(struct thermal_zone_device *thermal,
 	if (ret)
 		return ret;
 
-	pcb_temp = 0;
-	/* TODO: Introduce pcb temperature lookup */
+	ret = thermal_zone_lookup_temperature("pcb", &pcb_temp);
 	/* In case pcb zone is available, use the extrapolation rule with it */
-	if (pcb_temp) {
+	if (!ret) {
 		tmp -= pcb_temp;
 		slope = s->slope_pcb;
 		constant = s->constant_pcb;
-- 
1.7.7.1.488.ge8e1c

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ