Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp27137imm; Fri, 25 May 2018 13:32:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrCvuPu9kAwCZVz7TsoSEwDeh9k32+6ImKSaYnTHjLlRUk7eLdUHK5KKwq6rGoevRXM/zSu X-Received: by 2002:a17:902:7618:: with SMTP id k24-v6mr948237pll.74.1527280326723; Fri, 25 May 2018 13:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527280326; cv=none; d=google.com; s=arc-20160816; b=NfKeqCwnAF3eIQUEu14aBsEUuWLpY1/trHyEcqor1h5IW1wWpUQuWv8IDwTOSBHS8C /3988enbLMjBv7p9rcaRIAikzXeZqqkb8sQGrlsAh2QCFX77ETNxTW2gqFcsVmg1mTfz DV3SqH8ynSCCB2EqCiE5TeFqrExFeyQSHEBcrZhakfDPiqivs/DFTR233IYXRGDFn6pW Wpq3G97jRU1Wr2A1m2DA/WpehECwRHcGZmJYzZWjkgr5zo89AxkSDy3ZNFVRwt7Jst5/ PNRe8x1nRbErIEdo5jNtXJfzufqgiBSEapEnZ6xYXLj3OjsR6PV+N4y9hDjFBFBkuxTg 6LMg== 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=FC1l+ijrjsDcSjkUjQyPaQTtiFgNIkcY3Riv3V2yIbg=; b=aHji+etPtJNJZrLONYpKLjrHsxVYaDcbtWhz8ObhHZqV39t/iUUdreQIil60LoQ4yg LJ1QRIM/wUQpgUWqQc4QMGGLmO1Qe68ThuGYLnyVyIp6t6OgPwABn2u4U0b1zWTr/LZ3 JS4aIm35s3lNSR6HIZB8j4xP2KEh8bZTt7J6iUReAmYSnjDh68/8BpQ0cTpVGfM+k4pY ZYarSoE0CjOiWkiBwDn4XwOEmvuSg2T5vh/BVh3DDTozMDYC6DnOg5+LYGtzYSuXWvNy /4A99LLShavNbUSfX5omeWjhdB1h+E5J6jbbfXa/j2Da4/bm9oXqkwC1N/YxY5YKxArI OqLQ== 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 f35-v6si23765046plh.193.2018.05.25.13.31.52; Fri, 25 May 2018 13:32:06 -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 S1030322AbeEYUbc (ORCPT + 99 others); Fri, 25 May 2018 16:31:32 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:44210 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030263AbeEYUb1 (ORCPT ); Fri, 25 May 2018 16:31:27 -0400 Received: by mail-pl0-f67.google.com with SMTP id z9-v6so410770plk.11 for ; Fri, 25 May 2018 13:31:27 -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=FC1l+ijrjsDcSjkUjQyPaQTtiFgNIkcY3Riv3V2yIbg=; b=pjXJyjc0o7keqr/n3+N0biNYc+UV1HFtJSsxIX6U83kkzOmA5T1gFObElbQTRUgJNR N/j8Ser+FR01nziAxIfKNzPpagMPi8H/Vgt3I2DGrs9uHz6Sc9Jq2ZNLGXWTxOJc5cx1 oMDLUrZwIawU2CmrSItFd6/2sw2vkICQgGp9JL8QdZlGirrwoOLb4zSRLJkqXJaJHM7p AMY6OuRPve6rlL8mt8lY3L8pgsaMp8K2qiJs49m2JUZf1jpiXSR5D8mYi4Kj7Xa6bfT0 LMi5L/1a0/WkffLIS+iNNt+/tMsmvp1hOrLpbEpwCMlaZVNMNpdvoYj/TFPsfDVpgR0g dzhw== X-Gm-Message-State: ALKqPwcKrwOtw4sZo7wiZtvS/+zeMoS1BPlFQ8FJffBvd52GUGntYj/T 2n5/NEeCLFsYYCY8K2GvbvIxGA== X-Received: by 2002:a17:902:6e08:: with SMTP id u8-v6mr4026368plk.96.1527280286865; Fri, 25 May 2018 13:31:26 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id p1-v6sm42912360pfp.137.2018.05.25.13.31.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 May 2018 13:31:25 -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 , Matthias Kaehlcke Subject: [PATCH 08/11] PM / devfreq: Make update_devfreq() public Date: Fri, 25 May 2018 13:30:40 -0700 Message-Id: <20180525203043.249193-9-mka@chromium.org> X-Mailer: git-send-email 2.17.0.921.gf22659ad46-goog In-Reply-To: <20180525203043.249193-1-mka@chromium.org> References: <20180525203043.249193-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 --- 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 cfc50a61a90d..608e7549465b 100644 --- a/drivers/devfreq/governor.h +++ b/drivers/devfreq/governor.h @@ -54,9 +54,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 4a6ed61bbe49..561ab1d5e8d6 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.17.0.921.gf22659ad46-goog