From patchwork Tue May 31 06:18:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9143427 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 3B0FE60761 for ; Tue, 31 May 2016 06:23:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FCB828187 for ; Tue, 31 May 2016 06:23:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24EC828213; Tue, 31 May 2016 06:23:45 +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 2908228187 for ; Tue, 31 May 2016 06:23:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755897AbcEaGUf (ORCPT ); Tue, 31 May 2016 02:20:35 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:36694 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755864AbcEaGUb (ORCPT ); Tue, 31 May 2016 02:20:31 -0400 Received: by mail-pa0-f65.google.com with SMTP id fg1so23774558pad.3; Mon, 30 May 2016 23:20:31 -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=LRYk5UmKjR+9l/p5ZGRLQV7+89fvuFPzJ9+6VQbE/xk=; b=08cbrLaWaPlLK0HlYSbg2tvkdlnGP4f0l8D6ViXZEo3vk+b+GnnjYIVWnwit8X8qi6 /pbP2P5waKffxxLy7PJdzWnnfASHJMJeDSy6duFphRTj+xdJ8mFrupVL1MofAZS06Xds OBSn/gKsT9YAhm/2JdzrZ3H1t78vFxtJRGs9fbBvSGTzT9X1K3JGRi6Yb0iRRz9HqfRL Gx3PVJjAKRQ6ek5JhXGMRwyjCIBwqeE9KzTO9jgExH3RC5510U1C46D7064jHTy2MItp jttZQosPWJeW9EYXcvETFefmO6sgL/q4tHEsxjkwk8uunvst9/+c8jc5k/3bGufsruAr ZDKA== 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=LRYk5UmKjR+9l/p5ZGRLQV7+89fvuFPzJ9+6VQbE/xk=; b=J2r7AGaIO/tu68fsGz8I4GNNxUO5DbWWtf2nLFNDVytAguNWtaxpG2wkQdLTbk6Z5n jZHpnIVhyJgVhKlUtIW5KsuOpQSCAml7kiXtYBHvyaykzopyYuZ8W3aepLC6aijrD1tH Xb0sfkmWhQe2FM6NgojPZZc1fFBKyqRS+qsmI7q1LwgaIvBghnq66q2eCqnHZOO6bTny LcMqUFJ/+tzxJSSeNZDd53+hp9vhUN9uB/B239xAkt4M4Hbztei4swbsRubeq8E7Cz+8 /16SL9Qht1ZEd7wkOU1T0o8CMoG43RBPw9NIpoU0W+N3ZLk2D+Aeg4yvtqLoOtkHQ9K9 PlIg== X-Gm-Message-State: ALyK8tLrPTEQSF2vodM4LZ8tG6Dx1XgPWZxURbgaeKNBXI6EO+1NZiS1x1Lv8QyC2J7S8w== X-Received: by 10.66.150.232 with SMTP id ul8mr52385523pab.85.1464675630979; Mon, 30 May 2016 23:20:30 -0700 (PDT) Received: from localhost ([2601:b00:c501:3660:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id v184sm10166737pfb.24.2016.05.30.23.20.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 23:20:30 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Keerthy , Eduardo Valentin Subject: [PATCHv4 37/48] thermal: core: add a comment describing the main update loop Date: Mon, 30 May 2016 23:18:44 -0700 Message-Id: <1464675535-2433-38-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 Simply marking the main update loop section and adding a comment describing it. 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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 6dbb86f..063fb15 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -286,6 +286,17 @@ static void thermal_unregister_governors(void) thermal_gov_power_allocator_unregister(); } +/* + * Zone update section: main control loop applied to each zone while monitoring + * + * in polling mode. The monitoring is done using a workqueue. + * Same update may be done on a zone by calling thermal_zone_device_update(). + * + * An update means: + * - Non-critical trips will invoke the governor responsible for that zone; + * - Hot trips will produce a notification to userspace; + * - Critical trip point will cause a system shutdown. + */ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz, int delay) {