From patchwork Tue Sep 1 04:58:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52910 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id 330942127E for ; Tue, 1 Sep 2015 04:59:11 +0000 (UTC) Received: by wibq14 with SMTP id q14sf6488171wib.1 for ; Mon, 31 Aug 2015 21:59:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=SRFoZrDpT8EzViyvDO2/PiQhb6oFw1twKqQ0fjoxWko=; b=AcuU/sJ0oByFoDEn8BhkwFLM2cN1gQPHpumiFDvslN5E/aRYBLxDVBS6JorFEaj0HY u+2hofswFdyuGXwgSGZpGdZSwxKV8d7nY6XdJwy/suUr+j9YcoNpi+gf6tyYRmhTiNjI ZXDTkaptpZ5ktFALMzJxmCx8DLW7TDDOO9Xiy8tsFQqJqrW5zXjEhn4cqqYRXmfQVZPd FCkKzC1m6fop58Wm+hLwuU/+MBl9G2soaSTukW5s/c4ra/20YL/td0h3m1P/pjA0pzKa h08scVBSy0jSSYYF1UNjL/C2LjeEPMKiGmZtOCz2EAJjXPa9cHfQqYGKJUJ05vDcAw7k fXEQ== X-Gm-Message-State: ALoCoQmk1+s5A+b/KpAWIjj/3CK68BXd4YOECwoChO7cUMWxN+IQqkdqo/D4iaaFrGgqAsHeOSya X-Received: by 10.152.26.101 with SMTP id k5mr7036872lag.9.1441083550432; Mon, 31 Aug 2015 21:59:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.74 with SMTP id k10ls551127laf.30.gmail; Mon, 31 Aug 2015 21:59:10 -0700 (PDT) X-Received: by 10.152.20.170 with SMTP id o10mr11692312lae.109.1441083550266; Mon, 31 Aug 2015 21:59:10 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id g7si15353984lam.36.2015.08.31.21.59.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Aug 2015 21:59:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbbtg9 with SMTP id tg9so72158197lbb.1 for ; Mon, 31 Aug 2015 21:59:10 -0700 (PDT) X-Received: by 10.112.166.2 with SMTP id zc2mr11755603lbb.29.1441083550132; Mon, 31 Aug 2015 21:59:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.164.42 with SMTP id yn10csp273372lbb; Mon, 31 Aug 2015 21:59:08 -0700 (PDT) X-Received: by 10.69.26.196 with SMTP id ja4mr42352911pbd.121.1441083548755; Mon, 31 Aug 2015 21:59:08 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hs7si27780735pdb.97.2015.08.31.21.59.07; Mon, 31 Aug 2015 21:59:08 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753432AbbIAE7B (ORCPT + 28 others); Tue, 1 Sep 2015 00:59:01 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:33711 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753030AbbIAE66 (ORCPT ); Tue, 1 Sep 2015 00:58:58 -0400 Received: by paczk9 with SMTP id zk9so15072378pac.0 for ; Mon, 31 Aug 2015 21:58:57 -0700 (PDT) X-Received: by 10.68.247.226 with SMTP id yh2mr44701263pbc.12.1441083537842; Mon, 31 Aug 2015 21:58:57 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id i2sm16421874pdk.78.2015.08.31.21.58.56 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 31 Aug 2015 21:58:57 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , sboyd@codeaurora.org Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, nm@ti.com, khilman@linaro.org, Viresh Kumar , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman , Len Brown , linux-kernel@vger.kernel.org (open list), Pavel Machek Subject: [PATCH V2 Resend 2/5] PM / OPP: Prefix exported opp routines with dev_pm_opp_ Date: Tue, 1 Sep 2015 10:28:33 +0530 Message-Id: <7c5fd48b6e94fb84f44eb1e79d4518cbf3de6909.1441083292.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , That's the naming convention followed in most of opp core, but few recent additions didn't follow this, fix them. Reviewed-by: Stephen Boyd Signed-off-by: Viresh Kumar --- drivers/base/power/opp.c | 18 +++++++++--------- drivers/cpufreq/cpufreq-dt.c | 10 +++++----- include/linux/pm_opp.h | 16 ++++++++-------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index d1fe99e08988..1b40056cd156 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c @@ -1233,7 +1233,7 @@ void of_free_opp_table(struct device *dev) } EXPORT_SYMBOL_GPL(of_free_opp_table); -void of_cpumask_free_opp_table(cpumask_var_t cpumask) +void dev_pm_opp_cpumask_free_table(cpumask_var_t cpumask) { struct device *cpu_dev; int cpu; @@ -1251,7 +1251,7 @@ void of_cpumask_free_opp_table(cpumask_var_t cpumask) of_free_opp_table(cpu_dev); } } -EXPORT_SYMBOL_GPL(of_cpumask_free_opp_table); +EXPORT_SYMBOL_GPL(dev_pm_opp_cpumask_free_table); /* Returns opp descriptor node for a device, caller must do of_node_put() */ static struct device_node *_of_get_opp_desc_node(struct device *dev) @@ -1400,7 +1400,7 @@ int of_init_opp_table(struct device *dev) } EXPORT_SYMBOL_GPL(of_init_opp_table); -int of_cpumask_init_opp_table(cpumask_var_t cpumask) +int dev_pm_opp_cpumask_init_opp(cpumask_var_t cpumask) { struct device *cpu_dev; int cpu, ret = 0; @@ -1421,17 +1421,17 @@ int of_cpumask_init_opp_table(cpumask_var_t cpumask) __func__, cpu, ret); /* Free all other OPPs */ - of_cpumask_free_opp_table(cpumask); + dev_pm_opp_cpumask_free_table(cpumask); break; } } return ret; } -EXPORT_SYMBOL_GPL(of_cpumask_init_opp_table); +EXPORT_SYMBOL_GPL(dev_pm_opp_cpumask_init_opp); /* Required only for V1 bindings, as v2 can manage it from DT itself */ -int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) +int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) { struct device_list_opp *list_dev; struct device_opp *dev_opp; @@ -1469,7 +1469,7 @@ int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) return 0; } -EXPORT_SYMBOL_GPL(set_cpus_sharing_opps); +EXPORT_SYMBOL_GPL(dev_pm_opp_set_sharing_cpus); /* * Works only for OPP v2 bindings. @@ -1477,7 +1477,7 @@ EXPORT_SYMBOL_GPL(set_cpus_sharing_opps); * cpumask should be already set to mask of cpu_dev->id. * Returns -ENOENT if operating-points-v2 bindings aren't supported. */ -int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) +int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) { struct device_node *np, *tmp_np; struct device *tcpu_dev; @@ -1527,5 +1527,5 @@ int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) of_node_put(np); return ret; } -EXPORT_SYMBOL_GPL(of_get_cpus_sharing_opps); +EXPORT_SYMBOL_GPL(dev_pm_opp_get_sharing_cpus); #endif diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index c3583cdfadbd..025e76efdec3 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -215,7 +215,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) } /* Get OPP-sharing information from "operating-points-v2" bindings */ - ret = of_get_cpus_sharing_opps(cpu_dev, policy->cpus); + ret = dev_pm_opp_get_sharing_cpus(cpu_dev, policy->cpus); if (ret) { /* * operating-points-v2 not supported, fallback to old method of @@ -237,7 +237,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) * * OPPs might be populated at runtime, don't check for error here */ - of_cpumask_init_opp_table(policy->cpus); + dev_pm_opp_cpumask_init_opp(policy->cpus); if (need_update) { struct cpufreq_dt_platform_data *pd = cpufreq_get_driver_data(); @@ -249,7 +249,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) * OPP tables are initialized only for policy->cpu, do it for * others as well. */ - set_cpus_sharing_opps(cpu_dev, policy->cpus); + dev_pm_opp_set_sharing_cpus(cpu_dev, policy->cpus); of_property_read_u32(np, "clock-latency", &transition_latency); } else { @@ -356,7 +356,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) out_free_priv: kfree(priv); out_free_opp: - of_cpumask_free_opp_table(policy->cpus); + dev_pm_opp_cpumask_free_table(policy->cpus); out_node_put: of_node_put(np); out_put_reg_clk: @@ -373,7 +373,7 @@ static int cpufreq_exit(struct cpufreq_policy *policy) cpufreq_cooling_unregister(priv->cdev); dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &policy->freq_table); - of_cpumask_free_opp_table(policy->related_cpus); + dev_pm_opp_cpumask_free_table(policy->related_cpus); clk_put(policy->clk); if (!IS_ERR(priv->cpu_reg)) regulator_put(priv->cpu_reg); diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index cab7ba55bedb..076e0309f206 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -128,10 +128,10 @@ static inline struct srcu_notifier_head *dev_pm_opp_get_notifier( #if defined(CONFIG_PM_OPP) && defined(CONFIG_OF) int of_init_opp_table(struct device *dev); void of_free_opp_table(struct device *dev); -int of_cpumask_init_opp_table(cpumask_var_t cpumask); -void of_cpumask_free_opp_table(cpumask_var_t cpumask); -int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask); -int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask); +int dev_pm_opp_cpumask_init_opp(cpumask_var_t cpumask); +void dev_pm_opp_cpumask_free_table(cpumask_var_t cpumask); +int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask); +int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask); #else static inline int of_init_opp_table(struct device *dev) { @@ -142,21 +142,21 @@ static inline void of_free_opp_table(struct device *dev) { } -static inline int of_cpumask_init_opp_table(cpumask_var_t cpumask) +static inline int dev_pm_opp_cpumask_init_opp(cpumask_var_t cpumask) { return -ENOSYS; } -static inline void of_cpumask_free_opp_table(cpumask_var_t cpumask) +static inline void dev_pm_opp_cpumask_free_table(cpumask_var_t cpumask) { } -static inline int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) +static inline int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) { return -ENOSYS; } -static inline int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) +static inline int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) { return -ENOSYS; }