From patchwork Tue Aug 18 04:52:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: MyungJoo Ham X-Patchwork-Id: 7028141 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 4CFB0C05AC for ; Tue, 18 Aug 2015 04:53:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D107F20489 for ; Tue, 18 Aug 2015 04:52:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE55920458 for ; Tue, 18 Aug 2015 04:52:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751036AbbHREw5 (ORCPT ); Tue, 18 Aug 2015 00:52:57 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:48386 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750936AbbHREw4 (ORCPT ); Tue, 18 Aug 2015 00:52:56 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NT901TFAHJXJK90@mailout3.samsung.com> for linux-pm@vger.kernel.org; Tue, 18 Aug 2015 13:52:45 +0900 (KST) Received: from epcpsbgx3.samsung.com ( [172.20.52.114]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 46.5A.29324.D1AB2D55; Tue, 18 Aug 2015 13:52:45 +0900 (KST) X-AuditID: cbfee68d-f79106d00000728c-cc-55d2ba1d6a98 Received: from epmailer01 ( [203.254.219.141]) by epcpsbgx3.samsung.com (EPCPMTA) with SMTP id FB.4B.18557.D1AB2D55; Tue, 18 Aug 2015 13:52:45 +0900 (KST) Date: Tue, 18 Aug 2015 04:52:45 +0000 (GMT) From: MyungJoo Ham Subject: [PATCH] PM / devfreq: comments for get_dev_status usage updated To: "linux-pm@vger.kernel.org" Cc: javi.merino@arm.com Reply-to: myungjoo.ham@samsung.com MIME-version: 1.0 X-MTR: 20150818044854238@myungjoo.ham Msgkey: 20150818044854238@myungjoo.ham X-EPLocale: ko_KR.utf-8 X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-MLAttribute: X-RootMTR: 20150818044854238@myungjoo.ham X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N X-ConfirmMail: N,general Content-transfer-encoding: base64 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 Message-id: <134989511.192481439873565434.JavaMail.weblogic@ep2mlwas01a> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrEIsWRmVeSWpSXmKPExsWyRsSkSFd216VQg48TVCw+9x5hdGD0+LxJ LoAxissmJTUnsyy1SN8ugSvj69E5zAUtghUv5i9gbWA8IdDFyMkhJKAusWjJSTYQW0LAROLN m7uMELaYxIV764HiXEA1Sxkl/vy5yQ5T9PnEFEaIxBxGiatbz4ElWARUJeZvW8PSxcjBwSag JzHzczJIWFjAQ+LajddgQ0UELCVu7LkCtoxZQEbiw4LLLBBHKEms2fcKzOYVEJQ4OfMJC8Qu VYmZ01czQ8TVJI4u74a6QVziwtxLUDavxIz2p1D1chLTvq5hhrClJc7P2gD3zOLvj6Hi/BLH bu9ggrAFJKaeOQhVoyXRsrANag6fxJqFb1lg6nedWs4Ms+v+lrlQvRISW1uesEL8oigxpfsh O8jrzAKaEut36aN7hRcYDOdew4Kwl0Ni8YvYCYxKs5CUzUIyaRbCJGQlCxhZVjGKphYkFxQn pRcZ6hUn5haX5qXrJefnbmIEJoXT/5717mC8fcD6EKMAB6MSD++FgkuhQqyJZcWVuYcYTYFx NJ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Ik6u3iGjWjcUa5n0Uwe zwKCK7yF7ojvupm0wTFz9XnWbZN/VOzujjIr4H1zfcr0d4LN17guh/e/XaXx8fWl7fYCSbmv j18quPi9beWD8GglKbfoHFbL36s81uYaZdhkN/sd6RV6yiT58PWk/pnbW7k5o1c0d+3/rJC5 +x+vxJr6n7cMlFiKMxINtZiLihMBX3uvJVcDAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, MIME_BASE64_BLANKS, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 With the introduction of devfreq_update_stats(), governors are not recommended to use get_dev_status() directly. Signed-off-by: MyungJoo Ham --- include/linux/devfreq.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 1.9.1 Reviewed-by: Javi Merino diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index 70a1c60..68030e2 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -65,7 +65,10 @@ struct devfreq_dev_status { * The "flags" parameter's possible values are * explained above with "DEVFREQ_FLAG_*" macros. * @get_dev_status: The device should provide the current performance - * status to devfreq, which is used by governors. + * status to devfreq. Governors are recommended not to + * use this directly. Instead, governors are recommended + * to use devfreq_update_stats() along with + * devfreq.last_status. * @get_cur_freq: The device should provide the current frequency * at which it is operating. * @exit: An optional callback that is called when devfreq @@ -208,6 +211,10 @@ extern void devm_devfreq_unregister_opp_notifier(struct device *dev, /** * devfreq_update_stats() - update the last_status pointer in struct devfreq * @df: the devfreq instance whose status needs updating + * + * Governors are recommended to use this function along with last_status, + * which allows other entities to reuse the last_status without affecting + * the values fetched later by governors. */ static inline int devfreq_update_stats(struct devfreq *df) {