Commit 1b0e6e26 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge tag 'devfreq-fixes-for-5.9-rc7' of...

Merge tag 'devfreq-fixes-for-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux

Pull devfreq updates for 5.9-rc7 from Chanwoo Choi:

"1. Update devfreq core
  - Add missing timer type to devfreq_summary debugfs node.

 2. Fix devfreq device driver
  - Fix the exception handling about clock on tegra30-devfreq.c"

* tag 'devfreq-fixes-for-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux:
  PM / devfreq: tegra30: Disable clock on error in probe
  PM / devfreq: Add timer type to devfreq_summary debugfs
parents ba4f184e 6bf56076
...@@ -1766,20 +1766,23 @@ static int devfreq_summary_show(struct seq_file *s, void *data) ...@@ -1766,20 +1766,23 @@ static int devfreq_summary_show(struct seq_file *s, void *data)
struct devfreq *p_devfreq = NULL; struct devfreq *p_devfreq = NULL;
unsigned long cur_freq, min_freq, max_freq; unsigned long cur_freq, min_freq, max_freq;
unsigned int polling_ms; unsigned int polling_ms;
unsigned int timer;
seq_printf(s, "%-30s %-30s %-15s %10s %12s %12s %12s\n", seq_printf(s, "%-30s %-30s %-15s %-10s %10s %12s %12s %12s\n",
"dev", "dev",
"parent_dev", "parent_dev",
"governor", "governor",
"timer",
"polling_ms", "polling_ms",
"cur_freq_Hz", "cur_freq_Hz",
"min_freq_Hz", "min_freq_Hz",
"max_freq_Hz"); "max_freq_Hz");
seq_printf(s, "%30s %30s %15s %10s %12s %12s %12s\n", seq_printf(s, "%30s %30s %15s %10s %10s %12s %12s %12s\n",
"------------------------------", "------------------------------",
"------------------------------", "------------------------------",
"---------------", "---------------",
"----------", "----------",
"----------",
"------------", "------------",
"------------", "------------",
"------------"); "------------");
...@@ -1803,13 +1806,15 @@ static int devfreq_summary_show(struct seq_file *s, void *data) ...@@ -1803,13 +1806,15 @@ static int devfreq_summary_show(struct seq_file *s, void *data)
cur_freq = devfreq->previous_freq; cur_freq = devfreq->previous_freq;
get_freq_range(devfreq, &min_freq, &max_freq); get_freq_range(devfreq, &min_freq, &max_freq);
polling_ms = devfreq->profile->polling_ms; polling_ms = devfreq->profile->polling_ms;
timer = devfreq->profile->timer;
mutex_unlock(&devfreq->lock); mutex_unlock(&devfreq->lock);
seq_printf(s, seq_printf(s,
"%-30s %-30s %-15s %10d %12ld %12ld %12ld\n", "%-30s %-30s %-15s %-10s %10d %12ld %12ld %12ld\n",
dev_name(&devfreq->dev), dev_name(&devfreq->dev),
p_devfreq ? dev_name(&p_devfreq->dev) : "null", p_devfreq ? dev_name(&p_devfreq->dev) : "null",
devfreq->governor_name, devfreq->governor_name,
polling_ms ? timer_name[timer] : "null",
polling_ms, polling_ms,
cur_freq, cur_freq,
min_freq, min_freq,
......
...@@ -836,7 +836,8 @@ static int tegra_devfreq_probe(struct platform_device *pdev) ...@@ -836,7 +836,8 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
rate = clk_round_rate(tegra->emc_clock, ULONG_MAX); rate = clk_round_rate(tegra->emc_clock, ULONG_MAX);
if (rate < 0) { if (rate < 0) {
dev_err(&pdev->dev, "Failed to round clock rate: %ld\n", rate); dev_err(&pdev->dev, "Failed to round clock rate: %ld\n", rate);
return rate; err = rate;
goto disable_clk;
} }
tegra->max_freq = rate / KHZ; tegra->max_freq = rate / KHZ;
...@@ -897,6 +898,7 @@ static int tegra_devfreq_probe(struct platform_device *pdev) ...@@ -897,6 +898,7 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
dev_pm_opp_remove_all_dynamic(&pdev->dev); dev_pm_opp_remove_all_dynamic(&pdev->dev);
reset_control_reset(tegra->reset); reset_control_reset(tegra->reset);
disable_clk:
clk_disable_unprepare(tegra->clock); clk_disable_unprepare(tegra->clock);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment