From: Eduardo Valentin <eduardo.valentin@ti.com> To: Zhang Rui <rui.zhang@intel.com> Cc: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Eduardo Valentin <eduardo.valentin@ti.com> Subject: [PATCH 2/2] staging: ti-soc-thermal: remove external heat while extrapolating hotspot Date: Fri, 22 Mar 2013 17:13:07 -0400 [thread overview] Message-ID: <1363986787-28147-3-git-send-email-eduardo.valentin@ti.com> (raw) In-Reply-To: <1363986787-28147-1-git-send-email-eduardo.valentin@ti.com> 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@ti.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
WARNING: multiple messages have this Message-ID (diff)
From: Eduardo Valentin <eduardo.valentin@ti.com> To: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Eduardo Valentin <eduardo.valentin@ti.com> Subject: [PATCH 2/2] staging: ti-soc-thermal: remove external heat while extrapolating hotspot Date: Fri, 22 Mar 2013 17:13:07 -0400 [thread overview] Message-ID: <1363986787-28147-3-git-send-email-eduardo.valentin@ti.com> (raw) In-Reply-To: <1363986787-28147-1-git-send-email-eduardo.valentin@ti.com> 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@ti.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
next prev parent reply other threads:[~2013-03-22 21:14 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-03-22 21:13 [PATCH 0/2] thermal: lookup temperature Eduardo Valentin 2013-03-22 21:13 ` Eduardo Valentin 2013-03-22 21:13 ` [PATCH 1/2] thermal: introduce thermal_zone_lookup_temperature helper function Eduardo Valentin 2013-03-22 21:13 ` Eduardo Valentin 2013-03-25 6:10 ` Zhang Rui 2013-03-25 6:20 ` R, Durgadoss 2013-03-25 6:20 ` R, Durgadoss 2013-03-25 6:26 ` Zhang Rui 2013-03-25 11:25 ` Eduardo Valentin 2013-03-22 21:13 ` Eduardo Valentin [this message] 2013-03-22 21:13 ` [PATCH 2/2] staging: ti-soc-thermal: remove external heat while extrapolating hotspot Eduardo Valentin 2013-03-25 6:23 ` Zhang Rui 2013-03-25 11:18 ` Eduardo Valentin 2013-03-25 11:18 ` Eduardo Valentin 2013-04-24 18:16 [PATCH 0/2] staging: ti-soc-thermal: couple of fixes Eduardo Valentin 2013-04-24 18:16 ` [PATCH 2/2] staging: ti-soc-thermal: remove external heat while extrapolating hotspot Eduardo Valentin 2013-04-24 18:16 ` Eduardo Valentin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1363986787-28147-3-git-send-email-eduardo.valentin@ti.com \ --to=eduardo.valentin@ti.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=rui.zhang@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.