Re: [PATCH v4 1/2] pwm: mtk_disp: fix pwm clocks not poweroff when disable pwm
From: Uwe Kleine-König
Date: Mon Jan 20 2020 - 09:31:39 EST
Hello,
I fully agree to what Thierry said about the commit log.
One more comment:
On Tue, Dec 17, 2019 at 12:02:36PM +0800, Jitao Shi wrote:
> @@ -194,14 +194,6 @@ static int mtk_disp_pwm_probe(struct platform_device *pdev)
> if (IS_ERR(mdp->clk_mm))
> return PTR_ERR(mdp->clk_mm);
>
> - ret = clk_prepare(mdp->clk_main);
> - if (ret < 0)
> - return ret;
> -
> - ret = clk_prepare(mdp->clk_mm);
> - if (ret < 0)
> - goto disable_clk_main;
> -
> mdp->chip.dev = &pdev->dev;
> mdp->chip.ops = &mtk_disp_pwm_ops;
> mdp->chip.base = -1;
After this there is:
if (!mdp->data->has_commit) {
mtk_disp_pwm_update_bits(mdp, mdp->data->bls_debug, ...);
...
}
So I wonder if dropping the clk_enables above is safe if there are some
register accesses later on.
Side note: The driver you're touching here is still using the legacy
API. Would be great to convert it to .apply() instead.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |