From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: Re: [RFC 1/1] thermal: rcar-thermal: add cpu cooling Date: Thu, 20 Mar 2014 00:57:42 -0700 (PDT) Message-ID: <87lhw5nvyq.wl%kuninori.morimoto.gx@gmail.com> References: <1393599758-17315-1-git-send-email-ptitiano@baylibre.com> <1393599758-17315-2-git-send-email-ptitiano@baylibre.com> <1395294944.3571.9.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-f54.google.com ([209.85.220.54]:41209 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751264AbaCTH5n (ORCPT ); Thu, 20 Mar 2014 03:57:43 -0400 In-Reply-To: <1395294944.3571.9.camel@rzhang1-mobl4> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Zhang Rui Cc: Patrick Titiano , magnus.damm@gmail.com, kuninori.morimoto.gx@renesas.com, eduardo.valentin@ti.com, bcousson@baylibre.com, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org Hi Zhang, Partez: > On Fri, 2014-02-28 at 16:02 +0100, Patrick Titiano wrote: > > Renesas RCar platforms only register a thermal zone, but do not implement > > any thermal management. > > Use CPU cooling (CPUFreq DVFS driver) to implement thermal management. > > Register cpufreq cooling device, add passive trip point and bind it > > to thermal zone 0. > > Passive trip point temperature is set to 70C, but is adjustable > > via sysfs to facilitate experimentation and platform tuning. > > > > Signed-off-by: Patrick Titiano > > Kuninori, > > what do you think of this patch? (snip) > > + priv->cpucooldev = cpufreq_cooling_register(&clip_cpus); > > + if (IS_ERR(priv->cpucooldev)) { > > + ret = PTR_ERR(priv->cpucooldev); > > + dev_err(dev, "failed to register cpufreq cooling device (%d)\n", > > + ret); > > + goto error_unpm; > > + } (snip) > Then why you make the rcar-thermal depends on the success of > cpufreq_cooling_register()? > IMO, you can just register two trip points first, and bind the cpu > cooling device to passive trip point only if cpufreq_cooling_register() > succeeds. I agree to Zhang's opinion. It is better not to break the existing environment. But, I guess this patch is still under "not-yet-ready-to-merge patch" ? (this patch has "Signed-off-by" thought... :)