From patchwork Mon Aug 10 06:31:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52136 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id A1BC022919 for ; Mon, 10 Aug 2015 06:33:06 +0000 (UTC) Received: by lbsm2 with SMTP id m2sf22033414lbs.1 for ; Sun, 09 Aug 2015 23:33:05 -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=leMryThD63poCLsUQJxzCOChl9XTMEEGmONs2QOVjOw=; b=b1Kx0cidQFWI/FsgLzSVmWr6X1c+WPsi2Qm/h065f9xEWYEr7DmpPxNw3MyzXoz1/f OXdztdcTAkJEvc+kLCbNU/97UN3o7MOTgHtPDTq5WG21lFWBRY6nE9C2rCDDRv7GzE+P C/YxD9y6RbrUbgzXkCjqIhBhUh1bkE1uAtcoPDTWKPLBCDl8O6cd+idB3kcIEMgZEbj1 gE+TgygqD3DJGiML7PIZaT8s2bi3zwUZHikra9bhpPvX4EmPln7F+um+aUDLEgCHIRo/ UfWe+Pj2cSGrePDfyIXA2zlC2FCfi2BXgd1ST69GW6kUS38qJ6CWDKyw9qnfFLg690s1 licA== X-Gm-Message-State: ALoCoQk327y0PG97dcboAILh4D0wIRL71MnoW6sJO5hTaVwWjO5TnAVRe+qZxjZ2L96ZwYla6q8Z X-Received: by 10.152.6.103 with SMTP id z7mr5811873laz.8.1439188385586; Sun, 09 Aug 2015 23:33:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.39 with SMTP id b7ls651385lae.85.gmail; Sun, 09 Aug 2015 23:33:05 -0700 (PDT) X-Received: by 10.152.121.37 with SMTP id lh5mr12113256lab.2.1439188385406; Sun, 09 Aug 2015 23:33:05 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id r10si13406622lar.147.2015.08.09.23.33.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Aug 2015 23:33:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lahi9 with SMTP id i9so17948431lah.2 for ; Sun, 09 Aug 2015 23:33:05 -0700 (PDT) X-Received: by 10.112.166.2 with SMTP id zc2mr18697321lbb.29.1439188385271; Sun, 09 Aug 2015 23:33:05 -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.7.198 with SMTP id l6csp1746611lba; Sun, 9 Aug 2015 23:33:03 -0700 (PDT) X-Received: by 10.70.102.236 with SMTP id fr12mr4196790pdb.64.1439188382312; Sun, 09 Aug 2015 23:33:02 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mn2si15006304pbc.95.2015.08.09.23.33.00; Sun, 09 Aug 2015 23:33:02 -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 S1753928AbbHJGc4 (ORCPT + 28 others); Mon, 10 Aug 2015 02:32:56 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:36469 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753770AbbHJGcw (ORCPT ); Mon, 10 Aug 2015 02:32:52 -0400 Received: by pdco4 with SMTP id o4so67945787pdc.3 for ; Sun, 09 Aug 2015 23:32:52 -0700 (PDT) X-Received: by 10.70.130.34 with SMTP id ob2mr40976022pdb.15.1439188371942; Sun, 09 Aug 2015 23:32:51 -0700 (PDT) Received: from localhost ([223.227.137.11]) by smtp.gmail.com with ESMTPSA id dr4sm18479128pbc.61.2015.08.09.23.32.48 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 09 Aug 2015 23:32:51 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , nm@ti.com, sboyd@codeaurora.org Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, khilman@linaro.org, Viresh Kumar , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman , Len Brown , linux-kernel@vger.kernel.org (open list), Pavel Machek Subject: [PATCH 3/6] PM / OPP: Prefix exported opp routines with dev_pm_opp_ Date: Mon, 10 Aug 2015 12:01:59 +0530 Message-Id: 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.215.44 as permitted sender) smtp.mail=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. 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 c9747fb192b1..677457409245 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c @@ -1230,7 +1230,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; @@ -1248,7 +1248,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) @@ -1397,7 +1397,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; @@ -1418,17 +1418,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; @@ -1466,7 +1466,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. @@ -1474,7 +1474,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; @@ -1524,5 +1524,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; }