Commit f1d07f33 authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Greg Kroah-Hartman

staging: omap-thermal: update clock prepare count

This patch changes the clock management code to also update
the clock prepare counter, this way we won't skip the enable/disable
operation due to prepare dependencies.
Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 687ad31c
...@@ -943,7 +943,7 @@ int omap_bandgap_probe(struct platform_device *pdev) ...@@ -943,7 +943,7 @@ int omap_bandgap_probe(struct platform_device *pdev)
bg_ptr->clk_rate = clk_rate; bg_ptr->clk_rate = clk_rate;
if (OMAP_BANDGAP_HAS(bg_ptr, CLK_CTRL)) if (OMAP_BANDGAP_HAS(bg_ptr, CLK_CTRL))
clk_enable(bg_ptr->fclock); clk_prepare_enable(bg_ptr->fclock);
mutex_init(&bg_ptr->bg_mutex); mutex_init(&bg_ptr->bg_mutex);
...@@ -1013,7 +1013,7 @@ int omap_bandgap_probe(struct platform_device *pdev) ...@@ -1013,7 +1013,7 @@ int omap_bandgap_probe(struct platform_device *pdev)
disable_clk: disable_clk:
if (OMAP_BANDGAP_HAS(bg_ptr, CLK_CTRL)) if (OMAP_BANDGAP_HAS(bg_ptr, CLK_CTRL))
clk_disable(bg_ptr->fclock); clk_disable_unprepare(bg_ptr->fclock);
put_clks: put_clks:
clk_put(bg_ptr->fclock); clk_put(bg_ptr->fclock);
clk_put(bg_ptr->div_clk); clk_put(bg_ptr->div_clk);
...@@ -1044,7 +1044,7 @@ int omap_bandgap_remove(struct platform_device *pdev) ...@@ -1044,7 +1044,7 @@ int omap_bandgap_remove(struct platform_device *pdev)
omap_bandgap_power(bg_ptr, false); omap_bandgap_power(bg_ptr, false);
if (OMAP_BANDGAP_HAS(bg_ptr, CLK_CTRL)) if (OMAP_BANDGAP_HAS(bg_ptr, CLK_CTRL))
clk_disable(bg_ptr->fclock); clk_disable_unprepare(bg_ptr->fclock);
clk_put(bg_ptr->fclock); clk_put(bg_ptr->fclock);
clk_put(bg_ptr->div_clk); clk_put(bg_ptr->div_clk);
...@@ -1143,7 +1143,7 @@ static int omap_bandgap_suspend(struct device *dev) ...@@ -1143,7 +1143,7 @@ static int omap_bandgap_suspend(struct device *dev)
omap_bandgap_power(bg_ptr, false); omap_bandgap_power(bg_ptr, false);
if (OMAP_BANDGAP_HAS(bg_ptr, CLK_CTRL)) if (OMAP_BANDGAP_HAS(bg_ptr, CLK_CTRL))
clk_disable(bg_ptr->fclock); clk_disable_unprepare(bg_ptr->fclock);
return err; return err;
} }
...@@ -1153,7 +1153,7 @@ static int omap_bandgap_resume(struct device *dev) ...@@ -1153,7 +1153,7 @@ static int omap_bandgap_resume(struct device *dev)
struct omap_bandgap *bg_ptr = dev_get_drvdata(dev); struct omap_bandgap *bg_ptr = dev_get_drvdata(dev);
if (OMAP_BANDGAP_HAS(bg_ptr, CLK_CTRL)) if (OMAP_BANDGAP_HAS(bg_ptr, CLK_CTRL))
clk_enable(bg_ptr->fclock); clk_prepare_enable(bg_ptr->fclock);
omap_bandgap_power(bg_ptr, true); omap_bandgap_power(bg_ptr, true);
......
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