Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp188344imm; Tue, 3 Jul 2018 16:51:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIqqSpjNxVckdrJch09L1LTD8B/1bn5c/M/AYBsG/g+u9DCiI/rSGC/IdCKQdsrE/2V3pZ+ X-Received: by 2002:a17:902:8604:: with SMTP id f4-v6mr31584841plo.4.1530661863902; Tue, 03 Jul 2018 16:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530661863; cv=none; d=google.com; s=arc-20160816; b=ZPVTDlwvtMDdj/rV0SBNh/5f4kA3dELZe3VpGbzIRGGfLDp+SN2niV5tQ2aAp7R28L Db5yYClVHx9Eg4Gv6reDdd0MNuklNwiQu4+XOG1JHbpxBD5d4OZxN2PrCXlQkNxUrFU3 7c0YamDlLMqXQRr/J0e/utfdctn27VgEaWjvZcRi8v9qKRdZdmXjbDmdR/JhH1HYpLFI QQ8mHFQ8sRJB16E+o7W4IgObRUpDctIvbQesvPt+P34pSxn3xvgXas4HFTViJ33TeymC g9uZu5AFHJc5nsDKP55r3uuklD2Yuuzw9M7sinMgAVMkDeuipbPaHpDEx1zysUvDAuv5 FHqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=BB5bFgMvczqwvFxpGImGlCQGaZfQstFGTxKw+wkkwn8=; b=yJ2A/lTDi3stSC0vFrwU8aL2XpeWLcRMz0OQcrTOMze0GOef0V12GA6US6g/Lz1D6M dTFr6D1ShBKp76zJXzVQWpSJ5DgBEi21LaYyvQyWEvkKCJmHdlMYJZfBXYwwLAOgrtYB oDkv8t6N7yu7CoV4NIiznYh5sOExYpoF/8GNfA66cQ/olSGgxCRCH5PBkqY95RmGbAgF eos63H03fv7X5SEp2RSl9ghRtw3+pwF4J/fJFUU0JseL2/ooYD0gFCTL9XBtyWGaGCHi B3Fw6+eBnG6PkWH+YcB28qEom1hCfi1p+u9rfhKXiKzs+53oJkAfaGevo7+GCO/7q4eR IYTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21-v6si1900878pgu.163.2018.07.03.16.50.49; Tue, 03 Jul 2018 16:51:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932765AbeGCXtR (ORCPT + 99 others); Tue, 3 Jul 2018 19:49:17 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:41566 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753537AbeGCXrc (ORCPT ); Tue, 3 Jul 2018 19:47:32 -0400 Received: by mail-pl0-f67.google.com with SMTP id w8-v6so1744196ply.8 for ; Tue, 03 Jul 2018 16:47:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BB5bFgMvczqwvFxpGImGlCQGaZfQstFGTxKw+wkkwn8=; b=ZUnXCGBDRneS53DzHqGINhJC+J4B8M+19V29R9gz6hXpANltWBSJWTlFLhb4gau57i KpUy+bKLlS/YpSjuFHp0mFzhzBvLA7uNetdRJMvZIgeb5HqcEe2a5fFFPIdxiwESEies Wi/Ua0mvOuexBKvogZ8w9kokjtKFM2o+vtgaNoRdzos8oRqt36ON12KgV/xU3nkWbqwU Awh5MoQ4bfA9SaOecTy5ahXGUqwn75VHq72gKMqn29Tpqg4Nq76JUumH/WeweK2DVFJ6 W8jgiDnRcreJ7h91eit/GXmS0GjX1XXltwRruAqaMb2Tezi0PNC3t0g8rg8yR2oRcR8G jRbA== X-Gm-Message-State: APt69E1jVsan2t2QdNtL+TthQV4wKAuJ/7mX8Bzqehqx9H+x+omBNCVx NYYhzQcLTjwnnRSJgsW3a4MBKw== X-Received: by 2002:a17:902:7446:: with SMTP id e6-v6mr32494159plt.161.1530661651454; Tue, 03 Jul 2018 16:47:31 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id l85-v6sm6608562pfk.79.2018.07.03.16.47.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jul 2018 16:47:30 -0700 (PDT) From: Matthias Kaehlcke To: MyungJoo Ham Cc: Kyungmin Park , Chanwoo Choi , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Norris , Douglas Anderson , Enric Balletbo i Serra , "Rafael J . Wysocki" , Viresh Kumar , Lee Jones , Benson Leung , Olof Johansson , Matthias Kaehlcke Subject: [PATCH v5 06/12] PM / devfreq: Make update_devfreq() public Date: Tue, 3 Jul 2018 16:46:59 -0700 Message-Id: <20180703234705.227473-7-mka@chromium.org> X-Mailer: git-send-email 2.18.0.203.gfac676dfb9-goog In-Reply-To: <20180703234705.227473-1-mka@chromium.org> References: <20180703234705.227473-1-mka@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently update_devfreq() is only visible to devfreq governors outside of devfreq.c. Make it public to allow drivers that adjust devfreq policies to cause a re-evaluation of the frequency after a policy change. Signed-off-by: Matthias Kaehlcke Acked-by: MyungJoo Ham Reviewed-by: Brian Norris -- Changes in v5: - none Changed in v4: - added 'Reviewed-by: Brian Norris ' tag Changes in v3: - none Changes in v2: - added 'Acked-by: MyungJoo Ham ' tag --- drivers/devfreq/governor.h | 3 --- include/linux/devfreq.h | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/devfreq/governor.h b/drivers/devfreq/governor.h index b81700244ce3..f53339ca610f 100644 --- a/drivers/devfreq/governor.h +++ b/drivers/devfreq/governor.h @@ -57,9 +57,6 @@ struct devfreq_governor { unsigned int event, void *data); }; -/* Caution: devfreq->lock must be locked before calling update_devfreq */ -extern int update_devfreq(struct devfreq *devfreq); - extern void devfreq_monitor_start(struct devfreq *devfreq); extern void devfreq_monitor_stop(struct devfreq *devfreq); extern void devfreq_monitor_suspend(struct devfreq *devfreq); diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index 7c8dce96db73..c4f84a769cb5 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -222,6 +222,14 @@ extern void devm_devfreq_remove_device(struct device *dev, extern int devfreq_suspend_device(struct devfreq *devfreq); extern int devfreq_resume_device(struct devfreq *devfreq); +/** + * update_devfreq() - Reevaluate the device and configure frequency + * @devfreq: the devfreq device + * + * Note: devfreq->lock must be held + */ +extern int update_devfreq(struct devfreq *devfreq); + /* Helper functions for devfreq user device driver with OPP. */ extern struct dev_pm_opp *devfreq_recommended_opp(struct device *dev, unsigned long *freq, u32 flags); -- 2.18.0.203.gfac676dfb9-goog