From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933721AbcI0BrJ (ORCPT ); Mon, 26 Sep 2016 21:47:09 -0400 Received: from mga02.intel.com ([134.134.136.20]:39942 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932504AbcI0BrA (ORCPT ); Mon, 26 Sep 2016 21:47:00 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,402,1470726000"; d="scan'208";a="766248351" Message-ID: <1474940817.4284.0.camel@intel.com> Subject: Re: [PATCH] of: thermal: Fixed governor at each thermal zone From: Zhang Rui To: Inhyuk Kang , Eduardo Valentin Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 27 Sep 2016 09:46:57 +0800 In-Reply-To: <1474247932-1026-1-git-send-email-hugh.kang@lge.com> References: <1474247932-1026-1-git-send-email-hugh.kang@lge.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 一, 2016-09-19 at 10:18 +0900, Inhyuk Kang wrote: > It is necessary to be added governor at each thermal_zone. > Because some governors should be operated in the during the kernel > booting > in order to avoid heating problem. > > Default governor cannot be covered all thermal zones policy because > some thermal zones want to apply different one. > For example, the power allocator governor operates differently with > step wise governor. > Hence, it is better to parse governor parameter from the device tree. > > Signed-off-by: Inhyuk Kang > The patch looks okay to me. Eduardo, what do you think of this patch? thanks, rui > diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of- > thermal.c > index b8e509c..382c440 100644 > --- a/drivers/thermal/of-thermal.c > +++ b/drivers/thermal/of-thermal.c > @@ -970,6 +970,7 @@ int __init of_parse_thermal_zones(void) >   struct thermal_zone_device *zone; >   struct thermal_zone_params *tzp; >   int i, mask = 0; > + const char *governor; >   u32 prop; >   >   tz = thermal_of_build_thermal_zone(child); > @@ -996,6 +997,9 @@ int __init of_parse_thermal_zones(void) >   if (!of_property_read_u32(child, "sustainable- > power", &prop)) >   tzp->sustainable_power = prop; >   > + if (!of_property_read_string(child, "governor-name", > &governor)) > + strcpy(tzp->governor_name, governor); > + >   for (i = 0; i < tz->ntrips; i++) >   mask |= 1 << i; >