diff options
author | Nishanth Menon <nm@ti.com> | 2013-09-19 17:03:50 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@rjwysocki.net> | 2013-10-25 16:33:23 -0400 |
commit | 5d4879cda67b09f086807821cf594ee079d6dfbe (patch) | |
tree | 58532256e9bff42902510175e7cb7c727a89280b /drivers/devfreq/exynos/exynos4_bus.c | |
parent | 31d141e3a666269a3b6fcccddb0351caf7454240 (diff) |
PM / OPP: rename functions to dev_pm_opp*
Since Operating Performance Points (OPP) functions are specific to
device specific power management, be specific and rename opp_*
accessors in OPP library with dev_pm_opp_* equivalent.
Affected functions are:
opp_get_voltage
opp_get_freq
opp_get_opp_count
opp_find_freq_exact
opp_find_freq_floor
opp_find_freq_ceil
opp_add
opp_enable
opp_disable
opp_get_notifier
opp_init_cpufreq_table
opp_free_cpufreq_table
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/devfreq/exynos/exynos4_bus.c')
-rw-r--r-- | drivers/devfreq/exynos/exynos4_bus.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/devfreq/exynos/exynos4_bus.c b/drivers/devfreq/exynos/exynos4_bus.c index c5f86d8caca3..33c0e05a5ff1 100644 --- a/drivers/devfreq/exynos/exynos4_bus.c +++ b/drivers/devfreq/exynos/exynos4_bus.c | |||
@@ -650,8 +650,8 @@ static int exynos4_bus_target(struct device *dev, unsigned long *_freq, | |||
650 | rcu_read_unlock(); | 650 | rcu_read_unlock(); |
651 | return PTR_ERR(opp); | 651 | return PTR_ERR(opp); |
652 | } | 652 | } |
653 | new_oppinfo.rate = opp_get_freq(opp); | 653 | new_oppinfo.rate = dev_pm_opp_get_freq(opp); |
654 | new_oppinfo.volt = opp_get_voltage(opp); | 654 | new_oppinfo.volt = dev_pm_opp_get_voltage(opp); |
655 | rcu_read_unlock(); | 655 | rcu_read_unlock(); |
656 | freq = new_oppinfo.rate; | 656 | freq = new_oppinfo.rate; |
657 | 657 | ||
@@ -873,7 +873,7 @@ static int exynos4210_init_tables(struct busfreq_data *data) | |||
873 | exynos4210_busclk_table[i].volt = exynos4210_asv_volt[mgrp][i]; | 873 | exynos4210_busclk_table[i].volt = exynos4210_asv_volt[mgrp][i]; |
874 | 874 | ||
875 | for (i = LV_0; i < EX4210_LV_NUM; i++) { | 875 | for (i = LV_0; i < EX4210_LV_NUM; i++) { |
876 | err = opp_add(data->dev, exynos4210_busclk_table[i].clk, | 876 | err = dev_pm_opp_add(data->dev, exynos4210_busclk_table[i].clk, |
877 | exynos4210_busclk_table[i].volt); | 877 | exynos4210_busclk_table[i].volt); |
878 | if (err) { | 878 | if (err) { |
879 | dev_err(data->dev, "Cannot add opp entries.\n"); | 879 | dev_err(data->dev, "Cannot add opp entries.\n"); |
@@ -940,7 +940,7 @@ static int exynos4x12_init_tables(struct busfreq_data *data) | |||
940 | } | 940 | } |
941 | 941 | ||
942 | for (i = 0; i < EX4x12_LV_NUM; i++) { | 942 | for (i = 0; i < EX4x12_LV_NUM; i++) { |
943 | ret = opp_add(data->dev, exynos4x12_mifclk_table[i].clk, | 943 | ret = dev_pm_opp_add(data->dev, exynos4x12_mifclk_table[i].clk, |
944 | exynos4x12_mifclk_table[i].volt); | 944 | exynos4x12_mifclk_table[i].volt); |
945 | if (ret) { | 945 | if (ret) { |
946 | dev_err(data->dev, "Fail to add opp entries.\n"); | 946 | dev_err(data->dev, "Fail to add opp entries.\n"); |
@@ -969,7 +969,7 @@ static int exynos4_busfreq_pm_notifier_event(struct notifier_block *this, | |||
969 | data->disabled = true; | 969 | data->disabled = true; |
970 | 970 | ||
971 | rcu_read_lock(); | 971 | rcu_read_lock(); |
972 | opp = opp_find_freq_floor(data->dev, &maxfreq); | 972 | opp = dev_pm_opp_find_freq_floor(data->dev, &maxfreq); |
973 | if (IS_ERR(opp)) { | 973 | if (IS_ERR(opp)) { |
974 | rcu_read_unlock(); | 974 | rcu_read_unlock(); |
975 | dev_err(data->dev, "%s: unable to find a min freq\n", | 975 | dev_err(data->dev, "%s: unable to find a min freq\n", |
@@ -977,8 +977,8 @@ static int exynos4_busfreq_pm_notifier_event(struct notifier_block *this, | |||
977 | mutex_unlock(&data->lock); | 977 | mutex_unlock(&data->lock); |
978 | return PTR_ERR(opp); | 978 | return PTR_ERR(opp); |
979 | } | 979 | } |
980 | new_oppinfo.rate = opp_get_freq(opp); | 980 | new_oppinfo.rate = dev_pm_opp_get_freq(opp); |
981 | new_oppinfo.volt = opp_get_voltage(opp); | 981 | new_oppinfo.volt = dev_pm_opp_get_voltage(opp); |
982 | rcu_read_unlock(); | 982 | rcu_read_unlock(); |
983 | 983 | ||
984 | err = exynos4_bus_setvolt(data, &new_oppinfo, | 984 | err = exynos4_bus_setvolt(data, &new_oppinfo, |
@@ -1065,15 +1065,16 @@ static int exynos4_busfreq_probe(struct platform_device *pdev) | |||
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | rcu_read_lock(); | 1067 | rcu_read_lock(); |
1068 | opp = opp_find_freq_floor(dev, &exynos4_devfreq_profile.initial_freq); | 1068 | opp = dev_pm_opp_find_freq_floor(dev, |
1069 | &exynos4_devfreq_profile.initial_freq); | ||
1069 | if (IS_ERR(opp)) { | 1070 | if (IS_ERR(opp)) { |
1070 | rcu_read_unlock(); | 1071 | rcu_read_unlock(); |
1071 | dev_err(dev, "Invalid initial frequency %lu kHz.\n", | 1072 | dev_err(dev, "Invalid initial frequency %lu kHz.\n", |
1072 | exynos4_devfreq_profile.initial_freq); | 1073 | exynos4_devfreq_profile.initial_freq); |
1073 | return PTR_ERR(opp); | 1074 | return PTR_ERR(opp); |
1074 | } | 1075 | } |
1075 | data->curr_oppinfo.rate = opp_get_freq(opp); | 1076 | data->curr_oppinfo.rate = dev_pm_opp_get_freq(opp); |
1076 | data->curr_oppinfo.volt = opp_get_voltage(opp); | 1077 | data->curr_oppinfo.volt = dev_pm_opp_get_voltage(opp); |
1077 | rcu_read_unlock(); | 1078 | rcu_read_unlock(); |
1078 | 1079 | ||
1079 | platform_set_drvdata(pdev, data); | 1080 | platform_set_drvdata(pdev, data); |