From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932638AbcECJ0H (ORCPT ); Tue, 3 May 2016 05:26:07 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:34602 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932223AbcECJ0E (ORCPT ); Tue, 3 May 2016 05:26:04 -0400 Subject: Re: [PATCH 1/4] thermal: Add support for hardware-tracked trip points To: Eduardo Valentin References: <1461553367-24744-1-git-send-email-wxt@rock-chips.com> <1461553367-24744-2-git-send-email-wxt@rock-chips.com> <20160427214843.GA6438@localhost.localdomain> Cc: Caesar Wang , huangtao@rock-chips.com, Heiko Stuebner , linux-pm@vger.kernel.org, Sascha Hauer , dmitry.torokhov@gmail.com, dianders@chromium.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, eddie.cai@rock-chips.com, smbarber@google.com, briannorris@google.com, Zhang Rui From: Caesar Wang Message-ID: <57286E9B.5060804@gmail.com> Date: Tue, 3 May 2016 17:25:47 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160427214843.GA6438@localhost.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2016年04月28日 05:48, Eduardo Valentin 写道: > This patch is based on an earlier version from Mikko Perttunen > > > Signed-off-by: Sascha Hauer > Signed-off-by: Caesar Wang > Cc: Zhang Rui > Cc: Eduardo Valentin > Cc: linux-pm@vger.kernel.org > --- > > drivers/thermal/thermal_core.c | 48 ++++++++++++++++++++++++++++++++++++++++++ > include/linux/thermal.h | 3 +++ >> > > static void update_temperature(struct thermal_zone_device *tz) > { > int temp, ret; > @@ -569,6 +610,8 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) > > update_temperature(tz); > > + thermal_zone_set_trips(tz); > + > for (count = 0; count < tz->trips; count++) > handle_thermal_trip(tz, count); > } > @@ -754,6 +797,9 @@ trip_point_hyst_store(struct device *dev, struct device_attribute *attr, > */ > ret = tz->ops->set_trip_hyst(tz, trip, temperature); > > + if (!ret) > + thermal_zone_set_trips(tz); > + > You would probably want to do the same on trip_point_temp_store(). > Sorry, that has been set in thermal_zone_device_update(). static ssize_t trip_point_temp_store() { .. thermal_zone_device_update(tz); .. } > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip -- Thanks, Caesar