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 | |
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')
-rw-r--r-- | drivers/devfreq/exynos/exynos4_bus.c | 21 | ||||
-rw-r--r-- | drivers/devfreq/exynos/exynos5_bus.c | 18 |
2 files changed, 20 insertions, 19 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); |
diff --git a/drivers/devfreq/exynos/exynos5_bus.c b/drivers/devfreq/exynos/exynos5_bus.c index 574b16b59be5..b0e45925505b 100644 --- a/drivers/devfreq/exynos/exynos5_bus.c +++ b/drivers/devfreq/exynos/exynos5_bus.c | |||
@@ -144,8 +144,8 @@ static int exynos5_busfreq_int_target(struct device *dev, unsigned long *_freq, | |||
144 | return PTR_ERR(opp); | 144 | return PTR_ERR(opp); |
145 | } | 145 | } |
146 | 146 | ||
147 | freq = opp_get_freq(opp); | 147 | freq = dev_pm_opp_get_freq(opp); |
148 | volt = opp_get_voltage(opp); | 148 | volt = dev_pm_opp_get_voltage(opp); |
149 | rcu_read_unlock(); | 149 | rcu_read_unlock(); |
150 | 150 | ||
151 | old_freq = data->curr_freq; | 151 | old_freq = data->curr_freq; |
@@ -246,7 +246,7 @@ static int exynos5250_init_int_tables(struct busfreq_data_int *data) | |||
246 | int i, err = 0; | 246 | int i, err = 0; |
247 | 247 | ||
248 | for (i = LV_0; i < _LV_END; i++) { | 248 | for (i = LV_0; i < _LV_END; i++) { |
249 | err = opp_add(data->dev, exynos5_int_opp_table[i].clk, | 249 | err = dev_pm_opp_add(data->dev, exynos5_int_opp_table[i].clk, |
250 | exynos5_int_opp_table[i].volt); | 250 | exynos5_int_opp_table[i].volt); |
251 | if (err) { | 251 | if (err) { |
252 | dev_err(data->dev, "Cannot add opp entries.\n"); | 252 | dev_err(data->dev, "Cannot add opp entries.\n"); |
@@ -276,14 +276,14 @@ static int exynos5_busfreq_int_pm_notifier_event(struct notifier_block *this, | |||
276 | data->disabled = true; | 276 | data->disabled = true; |
277 | 277 | ||
278 | rcu_read_lock(); | 278 | rcu_read_lock(); |
279 | opp = opp_find_freq_floor(data->dev, &maxfreq); | 279 | opp = dev_pm_opp_find_freq_floor(data->dev, &maxfreq); |
280 | if (IS_ERR(opp)) { | 280 | if (IS_ERR(opp)) { |
281 | rcu_read_unlock(); | 281 | rcu_read_unlock(); |
282 | err = PTR_ERR(opp); | 282 | err = PTR_ERR(opp); |
283 | goto unlock; | 283 | goto unlock; |
284 | } | 284 | } |
285 | freq = opp_get_freq(opp); | 285 | freq = dev_pm_opp_get_freq(opp); |
286 | volt = opp_get_voltage(opp); | 286 | volt = dev_pm_opp_get_voltage(opp); |
287 | rcu_read_unlock(); | 287 | rcu_read_unlock(); |
288 | 288 | ||
289 | err = exynos5_int_setvolt(data, volt); | 289 | err = exynos5_int_setvolt(data, volt); |
@@ -368,7 +368,7 @@ static int exynos5_busfreq_int_probe(struct platform_device *pdev) | |||
368 | } | 368 | } |
369 | 369 | ||
370 | rcu_read_lock(); | 370 | rcu_read_lock(); |
371 | opp = opp_find_freq_floor(dev, | 371 | opp = dev_pm_opp_find_freq_floor(dev, |
372 | &exynos5_devfreq_int_profile.initial_freq); | 372 | &exynos5_devfreq_int_profile.initial_freq); |
373 | if (IS_ERR(opp)) { | 373 | if (IS_ERR(opp)) { |
374 | rcu_read_unlock(); | 374 | rcu_read_unlock(); |
@@ -377,8 +377,8 @@ static int exynos5_busfreq_int_probe(struct platform_device *pdev) | |||
377 | err = PTR_ERR(opp); | 377 | err = PTR_ERR(opp); |
378 | goto err_opp_add; | 378 | goto err_opp_add; |
379 | } | 379 | } |
380 | initial_freq = opp_get_freq(opp); | 380 | initial_freq = dev_pm_opp_get_freq(opp); |
381 | initial_volt = opp_get_voltage(opp); | 381 | initial_volt = dev_pm_opp_get_voltage(opp); |
382 | rcu_read_unlock(); | 382 | rcu_read_unlock(); |
383 | data->curr_freq = initial_freq; | 383 | data->curr_freq = initial_freq; |
384 | 384 | ||