From patchwork Tue May 31 06:18:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9143431 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 311D060761 for ; Tue, 31 May 2016 06:23:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25CB028187 for ; Tue, 31 May 2016 06:23:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AA4228213; Tue, 31 May 2016 06:23:59 +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=ham 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 B0D4F28187 for ; Tue, 31 May 2016 06:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932091AbcEaGX4 (ORCPT ); Tue, 31 May 2016 02:23:56 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35697 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbcEaGUa (ORCPT ); Tue, 31 May 2016 02:20:30 -0400 Received: by mail-pf0-f193.google.com with SMTP id f144so17825379pfa.2; Mon, 30 May 2016 23:20:30 -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=vDmXK4mku8dO+hkbo+v9RpXRgcujvyDNCRtbmC4GR9CN76yeqyQuz9nDd9/v0daRbo LSfI0oplAypMVskvEzKGmWVJdSTAdQCGJMaOtX1NHX4Qy7O73EYFzSA8ffg+3eHF7Zu9 5vH8N3ni5KD6/R2mzAcCbk6dHZmTnAJ8crx2O6RVzNB5mP/QKb/ahVSlUfog0sEaXylN 2w4mD9HrWla561YWsXJIl21Lo633mXwTCl2aJLE3/DRbnjzxZOGh1vYF+KD18UIdz0Yd rAkNdQz2rqmGhazngSL+ZzUPPPqCRf2Sx/tMpiPhCT8ekDQ2bFADIWOSNlynCQjy1SbL 32yg== 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=OO8bGtOPnfTyAK6e5FmY7XVCyHznavaYwlPIIAVT1npr9xC1qyQqlDX4HI6jN79eMi DT5Swxwwb5CnNmVkmesHHPH9iGAoXKATTfVs0Yni3yQgLVGdwseKMIwUmX6aAVM9tWF0 8IlNLl8uMFqNduBe9Mn9CNGx4M46qf67763EfrgFdP8MMWBgEckM8gY8LSLzASs7aoPB uACpCMytp+/hPcLv0HOoaCsaMhriozFpqAdZWDI6fd6eRVCzS7Q2zdkoL0aH4R2523DQ ek6D+yc+T1cidJyE2Riwn819SYenpRuBwR84bD/j6uAk0+qCJR3dVpHAFgWqNZetoKxM rFNA== X-Gm-Message-State: ALyK8tKJsJ2pHae3zCmhkSvg+sc6Mg+0wzOIQGo3gTEszxFbBXSIZuWWQYsNFmZC+yCPjA== X-Received: by 10.98.93.93 with SMTP id r90mr52250421pfb.65.1464675629595; Mon, 30 May 2016 23:20:29 -0700 (PDT) Received: from localhost ([2601:b00:c501:3660:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id 7sm1819028pfe.3.2016.05.30.23.20.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 23:20:28 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Keerthy , Eduardo Valentin Subject: [PATCHv4 36/48] thermal: core: move notify to the zone update section Date: Mon, 30 May 2016 23:18:43 -0700 Message-Id: <1464675535-2433-37-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1464675535-2433-1-git-send-email-edubezval@gmail.com> References: <1464675535-2433-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;