From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: Re: [PATCH 3/3] thermal: rcar: add .get_trip_type/temp and .notify support Date: Sun, 02 Dec 2012 18:20:51 -0800 (PST) Message-ID: <87ip8jri4f.wl%kuninori.morimoto.gx@renesas.com> 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> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mail-pa0-f46.google.com ([209.85.220.46]:43553 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754359Ab2LCCUw (ORCPT ); Sun, 2 Dec 2012 21:20:52 -0500 Received: by mail-pa0-f46.google.com with SMTP id bh2so1549932pad.19 for ; Sun, 02 Dec 2012 18:20:51 -0800 (PST) In-Reply-To: <1354496556.1936.7.camel@rzhang1-mobl4> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Zhang Rui Cc: Simon , Magnus , linux-pm@vger.kernel.org, Kuninori Morimoto 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 ? Best regards --- Kuninori Morimoto