From patchwork Fri Dec 22 07:26:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 122633 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1909513qgn; Thu, 21 Dec 2017 23:31:17 -0800 (PST) X-Google-Smtp-Source: ACJfBouoax7AVCpVpVnsuyXVSMYyfle/zAAN0NIGaHmBdFWRpVU74Ph8EmdJa1QhyfZOgb0UWL8y X-Received: by 10.99.186.70 with SMTP id l6mr11989310pgu.443.1513927876878; Thu, 21 Dec 2017 23:31:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513927876; cv=none; d=google.com; s=arc-20160816; b=ohTrwu63UzhCCrgY3W4EI+RCMX+PHkLzFGNudDCBGsDUP1i9P/srOnhT0ZiWiIsZxc +O9hU8FkQqF23A8utJT2Ux25gErCY5VXjhVmY9Xe05tO14sC9jcGh0T40bSlbqUaxdZK wRQoFJFGR3XGjos0oJaLWQL5H+7tjFFtjn3Ky9Su3zWO1lKFN43b70d+Zbt2gp5AS4Oc 6D7PocUFzytUAjbigi/kpIG1DvzYkznuzc7fsP17C3LG8UzoFKSwzZLMgXjuPxS075pQ JfAiNTdLGT6++ka3APV2iXJYawpsymPHMpiHE6xwO/ia9uTHGft0Yn44ZViZeljy3YRP Jn1g== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Eeen5grZjp9buKGoXBTmE6S8FibVf2W0pHK9I2THLvE=; b=iIDps5GVuAJITXVlqcUXwpf1WkEwQgOjOkFjnkT8a5BUXP3rqto60T2JvmdmudJaaN q6UiSCneAIaYNc4s3n/5YReFWc0SsKMq0l0DhuumsRkEMNDe1gL0STdOMnoB1d4ZwiM6 prG8/ySRzCXjNCGzlI2lBIM4jzKHSLgkwLHZSADS5Seg40POp8UZ/uSWxEs3LqIgpwn8 PVd5f1M9nyJe7NWK3TUvXjw4MAaw7q9M5pHcJYLY+VRK8cCBPvJvjNibOfIBSa6+2ecg +hZtvFzPcaHSLSw/dXBafK7ovpPJAtj88l9HQDrG3prYBqqVegQnoSfbRcZtQAATg2Xm JFOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VeDyGRR1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si14888688pgs.496.2017.12.21.23.31.16; Thu, 21 Dec 2017 23:31:16 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=VeDyGRR1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755982AbdLVHbN (ORCPT + 28 others); Fri, 22 Dec 2017 02:31:13 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:41494 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755876AbdLVHaz (ORCPT ); Fri, 22 Dec 2017 02:30:55 -0500 Received: by mail-pl0-f65.google.com with SMTP id g2so12479655pli.8 for ; Thu, 21 Dec 2017 23:30:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=Eeen5grZjp9buKGoXBTmE6S8FibVf2W0pHK9I2THLvE=; b=VeDyGRR1gSrwhEdST29Fs3hYVLl/6HeuDUXig87zFZR2Z4vev3zgxjxElV8nDEGX9b EqTDlmJRLP1pBejwHQj2Qnb13RPdNuD1cMrizNeZItZHn3IjPgHzvtLggg0ClbmYYa8Q kbDT70VhHUld08Int+NJ/8qbM6l3JZCLIjCBg= 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:in-reply-to:references; bh=Eeen5grZjp9buKGoXBTmE6S8FibVf2W0pHK9I2THLvE=; b=HX8KvTkZWoYyQQ97kJICRLMYUiPADDuHwClXlm+SlvvmlDPjt1FpmewlvTdLlilfOb qNXLEiomUx8Nok0H2s+2dh6g4yTaeEvw2FGaSL+AtTuPZkhDTKa3FC4kjA7p+teluVkP DufsWcILXv8D9BE7hh10MPpXo1b64/5nToolXLC1BqLV+YZzjGnISDXwKRugdO/ILYII 7PD5NxIMcrDFyHwH+IG0e26LYbd3eEC7KSxHT1zTl1UU2AZxjEQPQRNhZ2tZT9jc7yZe Cv3So6w9rzI8GoUPYOEl0+z4YRQ4di6/nF4vnOwKQDn4xO6q9FS6oVxd3wvtRLbNXW5W 9otg== X-Gm-Message-State: AKGB3mK08hZshtaZn+gZa0UkckMKX5wsgOblqsc0v+M8g1j34OP1oBIE SiTuzLU5aguNm3dNO03SZARIVzwDKns= X-Received: by 10.84.231.1 with SMTP id f1mr13371527plk.352.1513927854680; Thu, 21 Dec 2017 23:30:54 -0800 (PST) Received: from localhost ([122.172.139.116]) by smtp.gmail.com with ESMTPSA id 69sm44016199pft.11.2017.12.21.23.30.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Dec 2017 23:30:54 -0800 (PST) From: Viresh Kumar To: ulf.hansson@linaro.org, Kevin Hilman , Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , robh+dt@kernel.org, rnayak@codeaurora.org, sudeep.holla@arm.com, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] PM / OPP: Remove dev_pm_opp_{un}register_get_pstate_helper() Date: Fri, 22 Dec 2017 12:56:31 +0530 Message-Id: <46a62463d9a0a04648672d5cd3a9803ad99bd36b.1513926033.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These helpers aren't used anymore, remove them. Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 75 -------------------------------------------------- drivers/opp/opp.h | 2 -- include/linux/pm_opp.h | 10 ------- 3 files changed, 87 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 6194219fb95f..9e3c40437991 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -1545,81 +1545,6 @@ void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table) } EXPORT_SYMBOL_GPL(dev_pm_opp_unregister_set_opp_helper); -/** - * dev_pm_opp_register_get_pstate_helper() - Register get_pstate() helper. - * @dev: Device for which the helper is getting registered. - * @get_pstate: Helper. - * - * TODO: Remove this callback after the same information is available via Device - * Tree. - * - * This allows a platform to initialize the performance states of individual - * OPPs for its devices, until we get similar information directly from DT. - * - * This must be called before the OPPs are initialized for the device. - */ -struct opp_table *dev_pm_opp_register_get_pstate_helper(struct device *dev, - int (*get_pstate)(struct device *dev, unsigned long rate)) -{ - struct opp_table *opp_table; - int ret; - - if (!get_pstate) - return ERR_PTR(-EINVAL); - - opp_table = dev_pm_opp_get_opp_table(dev); - if (!opp_table) - return ERR_PTR(-ENOMEM); - - /* This should be called before OPPs are initialized */ - if (WARN_ON(!list_empty(&opp_table->opp_list))) { - ret = -EBUSY; - goto err; - } - - /* Already have genpd_performance_state set */ - if (WARN_ON(opp_table->genpd_performance_state)) { - ret = -EBUSY; - goto err; - } - - opp_table->genpd_performance_state = true; - opp_table->get_pstate = get_pstate; - - return opp_table; - -err: - dev_pm_opp_put_opp_table(opp_table); - - return ERR_PTR(ret); -} -EXPORT_SYMBOL_GPL(dev_pm_opp_register_get_pstate_helper); - -/** - * dev_pm_opp_unregister_get_pstate_helper() - Releases resources blocked for - * get_pstate() helper - * @opp_table: OPP table returned from dev_pm_opp_register_get_pstate_helper(). - * - * Release resources blocked for platform specific get_pstate() helper. - */ -void dev_pm_opp_unregister_get_pstate_helper(struct opp_table *opp_table) -{ - if (!opp_table->genpd_performance_state) { - pr_err("%s: Doesn't have performance states set\n", - __func__); - return; - } - - /* Make sure there are no concurrent readers while updating opp_table */ - WARN_ON(!list_empty(&opp_table->opp_list)); - - opp_table->genpd_performance_state = false; - opp_table->get_pstate = NULL; - - dev_pm_opp_put_opp_table(opp_table); -} -EXPORT_SYMBOL_GPL(dev_pm_opp_unregister_get_pstate_helper); - /** * dev_pm_opp_add() - Add an OPP table from a table definitions * @dev: device for which we do this operation diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h index b181032e6938..ae99295b5382 100644 --- a/drivers/opp/opp.h +++ b/drivers/opp/opp.h @@ -140,7 +140,6 @@ enum opp_table_access { * @genpd_performance_state: Device's power domain support performance state. * @set_opp: Platform specific set_opp callback * @set_opp_data: Data to be passed to set_opp callback - * @get_pstate: Platform specific get_pstate callback * @dentry: debugfs dentry pointer of the real device directory (not links). * @dentry_name: Name of the real dentry. * @@ -178,7 +177,6 @@ struct opp_table { int (*set_opp)(struct dev_pm_set_opp_data *data); struct dev_pm_set_opp_data *set_opp_data; - int (*get_pstate)(struct device *dev, unsigned long rate); #ifdef CONFIG_DEBUG_FS struct dentry *dentry; diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index 70686f434c13..528a7d9cf2ef 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -125,8 +125,6 @@ struct opp_table *dev_pm_opp_set_clkname(struct device *dev, const char * name); void dev_pm_opp_put_clkname(struct opp_table *opp_table); struct opp_table *dev_pm_opp_register_set_opp_helper(struct device *dev, int (*set_opp)(struct dev_pm_set_opp_data *data)); void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table); -struct opp_table *dev_pm_opp_register_get_pstate_helper(struct device *dev, int (*get_pstate)(struct device *dev, unsigned long rate)); -void dev_pm_opp_unregister_get_pstate_helper(struct opp_table *opp_table); int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq); int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, const struct cpumask *cpumask); int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask); @@ -247,14 +245,6 @@ static inline struct opp_table *dev_pm_opp_register_set_opp_helper(struct device static inline void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table) {} -static inline struct opp_table *dev_pm_opp_register_get_pstate_helper(struct device *dev, - int (*get_pstate)(struct device *dev, unsigned long rate)) -{ - return ERR_PTR(-ENOTSUPP); -} - -static inline void dev_pm_opp_unregister_get_pstate_helper(struct opp_table *opp_table) {} - static inline struct opp_table *dev_pm_opp_set_prop_name(struct device *dev, const char *name) { return ERR_PTR(-ENOTSUPP);