From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhang Rui Subject: Re: [PATCH 3/3] thermal: rcar: add .get_trip_type/temp and .notify support Date: Mon, 03 Dec 2012 10:22:37 +0800 Message-ID: <1354501357.1936.35.camel@rzhang1-mobl4> References: <87sj82uo7o.wl%kuninori.morimoto.gx@renesas.com> <87pq36uo5v.wl%kuninori.morimoto.gx@renesas.com> <1353652189.2111.7.camel@rzhang1-mobl4> <87k3t9w39m.wl%kuninori.morimoto.gx@renesas.com> <1353894734.2299.16.camel@rzhang1-mobl4> <87ip8tw0x1.wl%kuninori.morimoto.gx@renesas.com> <87ehjhw0ty.wl%kuninori.morimoto.gx@renesas.com> <1354496556.1936.7.camel@rzhang1-mobl4> <87ip8jri4f.wl%kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com ([134.134.136.20]:62558 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754372Ab2LCCWm (ORCPT ); Sun, 2 Dec 2012 21:22:42 -0500 In-Reply-To: <87ip8jri4f.wl%kuninori.morimoto.gx@renesas.com> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Kuninori Morimoto Cc: Simon , Magnus , linux-pm@vger.kernel.org, Kuninori Morimoto On Sun, 2012-12-02 at 18:20 -0800, Kuninori Morimoto wrote: > Hi Zhang > > > > +static int rcar_thermal_get_trip_temp(struct thermal_zone_device *zone, > > > + int trip, unsigned long *temp) > > > +{ > > > + struct rcar_thermal_priv *priv = rcar_zone_to_priv(zone); > > > + > > > + /* see rcar_thermal_get_temp() */ > > > + switch (trip) { > > > + case 0: /* +90 <= temp < +135 */ > > > + *temp = MCELSIUS(90 - 1); > > > > what does the comment above mean? > > the system is supposed to run from 90C to 135C? but you're setting the > > critical trip point to 89C. > > Oops, sorry my original patch used old kernel for test. > Then it needed this -1. > But now it was already solved by this patch. > > 29321357ac6db54eeb8574da1f6c3e0ce8cfbb60 > (thermal: fix off-by-1 error in trip point trigger condition) > > I can fix this, but which is best for you ? > v2 patch ? or additional patch ? > please send V2. thanks, rui