From patchwork Wed May 4 06:02:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9010261 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 96A9DBF29F for ; Wed, 4 May 2016 06:04:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B2FDB202B8 for ; Wed, 4 May 2016 06:04:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB11C2027D for ; Wed, 4 May 2016 06:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751310AbcEDGDi (ORCPT ); Wed, 4 May 2016 02:03:38 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:36509 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757325AbcEDGDg (ORCPT ); Wed, 4 May 2016 02:03:36 -0400 Received: by mail-pf0-f174.google.com with SMTP id c189so21831517pfb.3; Tue, 03 May 2016 23:03:36 -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=ENZGbCKW7ccaP20jnhiqhuwj5nJ+bxLaA1+yHLcJtNI=; b=R4l4DCKAdCU7wS4/2urD7HV1fHXsexHfKwUq5TWdTwX1c7S5nIU2R4NrZgsmWIHM0k TY1Jnq3iYHNsGoIFf7q53M2qfSFyyWovI3zapSeFv8HwIuvKG5JPhT41fdCivdEkrDQs bKVWQ0gNoZzTt2Ozm0dt0zro3TN1GWyJB/yFMFylWHcN457cXJxgpaDn/rrDrKkE7C91 L5ll5rf3YsVr773nkc6bhLYiJcLHLcOpCsT/QDgrVPZKognwrmAdiMjaa/jrDNFNtZ9k tLssMU8WrpVpIeMfdv6riEDkoELuo6N6jr/ux9Ue8geIFlMF95qJObk5aNEXWYcFJKji ib3A== 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=ENZGbCKW7ccaP20jnhiqhuwj5nJ+bxLaA1+yHLcJtNI=; b=Ft1CvwmRPJ7INMdIX+4vpYyr3ArGyrFzsQ7n1XFl7QVtO07DEe9gtkoqRxn8nuo+pF dPJ4cA3dn7G1de75Ob8UsBKPEgi0HL9sUkth8lrOAbl37FQRayoOohTVgMxp4Qiz0SkF NDO0bzCMNtIEPeB5q/6MQkqiBQjq0pGmQEXTeAcGuYvXMn4bB/KRAXUIuoIr5jN0h5WS 7BIveaR1yY0MRQzvi4EuHsjcf5+PhM3SNGc0sGW6kwBpPq0wTCIAeqluo5GLGS62pvxJ p6mVXYNaGmeRRhfuzQEOCEJreNfTBNt6xMI2Qo2pQaOaVxv7nGafbX1E2Yn9xvZH7SK8 0SCQ== X-Gm-Message-State: AOPr4FVFSa7IwoP9t/XHuk7G72eN3TmJLUcTPqa32CAPBKIR8b2kbmF9LmZekfitIolFtg== X-Received: by 10.98.53.6 with SMTP id c6mr9698737pfa.89.1462341816096; Tue, 03 May 2016 23:03:36 -0700 (PDT) Received: from localhost ([2601:647:4203:c8e0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id ey12sm2632205pac.26.2016.05.03.23.03.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 May 2016 23:03:35 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Eduardo Valentin Subject: [PATCH 28/31] thermal: core: move notify to the zone update section Date: Tue, 3 May 2016 23:02:42 -0700 Message-Id: <1462341765-13268-29-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1462341765-13268-1-git-send-email-edubezval@gmail.com> References: <1462341765-13268-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-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.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 609c3be..0317aea 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 @@ -1027,24 +1045,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;