From patchwork Tue Aug 11 10:34:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52298 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id 0147C22FEC for ; Tue, 11 Aug 2015 10:35:18 +0000 (UTC) Received: by wilj18 with SMTP id j18sf47521868wil.0 for ; Tue, 11 Aug 2015 03:35:17 -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=5tX9O/YEjiVjK9tsvAjd9bhDBEEaVWcj4mhwizL2wnM=; b=V/cQh2gigyDjr40VkEZ8miUPYytVxivNvZJwPFa7Jc3vi6eqzIhO6AfWKwvNo99Tpr e1wcYz1G7AIO7jebnt7LxcTnhQs7THXDYNt+FD6XIMKz6YvTazS147OukuNb6MVN028C Pe27NcMzVJO5Y8TNf3CWEhq6okZn0+wcGMXS8xa2z9FAyXpBYF5eeOTGjoOUjE0PhCqn vdwuqdGUM/jXWsrYHId1UfkfvpclXz/dEDVxHtDoBocCJxkbhHWxwDcSEjeQ1aj1t/10 zRhAdWSjvwG9+vXSghgpBCy3Kfe1we7cUaTs+FP0UJHL2mv23ij0TJrub4d3gKDDelb8 C2Ig== X-Gm-Message-State: ALoCoQmaMGmRIhxO8BJoXWQQdV/kF1JmLyWfsxsplkhdmPG3iLlHxZk4XL/a1oi26CmwzOQje+Yc X-Received: by 10.180.98.133 with SMTP id ei5mr1394911wib.2.1439289317335; Tue, 11 Aug 2015 03:35:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.100 with SMTP id a4ls844766lah.52.gmail; Tue, 11 Aug 2015 03:35:17 -0700 (PDT) X-Received: by 10.152.234.75 with SMTP id uc11mr25391288lac.20.1439289317140; Tue, 11 Aug 2015 03:35:17 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id b10si1049107laf.14.2015.08.11.03.35.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Aug 2015 03:35:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lahi9 with SMTP id i9so38014588lah.2 for ; Tue, 11 Aug 2015 03:35:17 -0700 (PDT) X-Received: by 10.112.160.42 with SMTP id xh10mr25564226lbb.88.1439289316981; Tue, 11 Aug 2015 03:35:16 -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 l6csp2434239lba; Tue, 11 Aug 2015 03:35:15 -0700 (PDT) X-Received: by 10.68.203.195 with SMTP id ks3mr54838579pbc.123.1439289315726; Tue, 11 Aug 2015 03:35:15 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bb3si2767653pbc.16.2015.08.11.03.35.14; Tue, 11 Aug 2015 03:35:15 -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 S964921AbbHKKfF (ORCPT + 28 others); Tue, 11 Aug 2015 06:35:05 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36300 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964877AbbHKKfB (ORCPT ); Tue, 11 Aug 2015 06:35:01 -0400 Received: by pacrr5 with SMTP id rr5so125142417pac.3 for ; Tue, 11 Aug 2015 03:35:01 -0700 (PDT) X-Received: by 10.68.166.97 with SMTP id zf1mr55024005pbb.72.1439289300897; Tue, 11 Aug 2015 03:35:00 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id ea4sm2104114pbc.48.2015.08.11.03.34.59 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 11 Aug 2015 03:35:00 -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 V2 3/6] PM / OPP: Prefix exported opp routines with dev_pm_opp_ Date: Tue, 11 Aug 2015 16:04:36 +0530 Message-Id: <1924406ffb2d582bf1f6a35eed6c994443033bad.1439288881.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.215.52 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 7527de217edb..ccc636ad8e0f 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; }