From patchwork Mon May 30 22:16:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9142897 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CBE3360761 for ; Mon, 30 May 2016 22:21:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC68227DA9 for ; Mon, 30 May 2016 22:21:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD4772819C; Mon, 30 May 2016 22:21:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D8F027DA9 for ; Mon, 30 May 2016 22:21:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162068AbcE3WVL (ORCPT ); Mon, 30 May 2016 18:21:11 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36851 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423622AbcE3WRg (ORCPT ); Mon, 30 May 2016 18:17:36 -0400 Received: by mail-pf0-f196.google.com with SMTP id 62so10905658pfd.3; Mon, 30 May 2016 15:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BfavJIUCvMQ0qMP0bgr7562JeplHsBD4evnVt6Dud98=; b=d/kqHI2zb66nAdUnguKXX1UBIPcTqB86Kx15PjfKE+EdhNz714GWdvdoGQcxCZ1I+V 1mkJEZpis/Ud5SZJQDaFS79kV9vHYsE8IXJzSV9Ys0enhjysXU/r6Yv1SBvzq9Kk01wr Stn14dAAnuuPwN7q4UwmonGnIywHva6U6TT0GR6aR1Nz0DY3lNJg4Psau7OAwf0uEvBo F5wry6fPZ+Q/8zgloWikNWvWIDQyOVh1pzFa4Y4++NtB6PpJozvQpR1ybNrAdsh2zumj KUkhj+MouTkR+0jh8vZIipDU9/3slUvkXggDw5lmbMy3HuloLcVmdWBCSKVfKqS17ucF iZiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BfavJIUCvMQ0qMP0bgr7562JeplHsBD4evnVt6Dud98=; b=NBOCw4a9OWPFWrotJKxftxLoHhRVoKsnruMCgoy5+8+jhFQmUV+xrxO/QPIUA/uvuk khMOmzRJXsKpvm9J1cw76IShX6kuFkd+n3/2NLu/XqaqFNL8d80cTZzRpViR+Ag4lwNd imSvRnNq3FW8NYuRR2CBvtmjYrNuZuugpmsnZNy5WLfdGBNrWamutgFfee/3g2vIvobV UKtAdT8WoRN4nIcxFF8HyY/AG/1LfN3zvlKdoTL28W13M0j4X6WLyGqBm2AylNYZy8xU OUETKClrx1JniXO/ZlVjKmHpXIFHb6JczvrzlcUfvlm7tW0Gwb5uP9xrVKUuEaCVYSUA hzPQ== X-Gm-Message-State: ALyK8tLtaeLgdwj2fWVClx4PczPKZbEAIouejVB+j5s3LvhlPiZPTzEySNZ3fYjhDlm22w== X-Received: by 10.98.26.210 with SMTP id a201mr31598788pfa.46.1464646655368; Mon, 30 May 2016 15:17:35 -0700 (PDT) Received: from localhost ([2601:b00:c501:3660:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id t77sm35129213pfa.71.2016.05.30.15.17.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 15:17:34 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Eduardo Valentin Subject: [PATCHv3 36/48] thermal: core: move notify to the zone update section Date: Mon, 30 May 2016 15:16:12 -0700 Message-Id: <1464646584-14322-37-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1464646584-14322-1-git-send-email-edubezval@gmail.com> References: <1464646584-14322-1-git-send-email-edubezval@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP moving the helper function to closer to similar functions. Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index c1908c4..6dbb86f 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -419,6 +419,24 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) } EXPORT_SYMBOL_GPL(thermal_zone_device_update); +/** + * thermal_notify_framework - Sensor drivers use this API to notify framework + * @tz: thermal zone device + * @trip: indicates which trip point has been crossed + * + * This function handles the trip events from sensor drivers. It starts + * throttling the cooling devices according to the policy configured. + * For CRITICAL and HOT trip points, this notifies the respective drivers, + * and does actual throttling for other trip points i.e ACTIVE and PASSIVE. + * The throttling policy is based on the configured platform data; if no + * platform data is provided, this uses the step_wise throttling policy. + */ +void thermal_notify_framework(struct thermal_zone_device *tz, int trip) +{ + handle_thermal_trip(tz, trip); +} +EXPORT_SYMBOL_GPL(thermal_notify_framework); + static void thermal_zone_device_check(struct work_struct *work) { struct thermal_zone_device *tz = container_of(work, struct @@ -1029,24 +1047,6 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev) } EXPORT_SYMBOL_GPL(thermal_cooling_device_unregister); -/** - * thermal_notify_framework - Sensor drivers use this API to notify framework - * @tz: thermal zone device - * @trip: indicates which trip point has been crossed - * - * This function handles the trip events from sensor drivers. It starts - * throttling the cooling devices according to the policy configured. - * For CRITICAL and HOT trip points, this notifies the respective drivers, - * and does actual throttling for other trip points i.e ACTIVE and PASSIVE. - * The throttling policy is based on the configured platform data; if no - * platform data is provided, this uses the step_wise throttling policy. - */ -void thermal_notify_framework(struct thermal_zone_device *tz, int trip) -{ - handle_thermal_trip(tz, trip); -} -EXPORT_SYMBOL_GPL(thermal_notify_framework); - static void bind_tz(struct thermal_zone_device *tz) { int i, ret;