On 2021-04-30 17:10, Roman Beranek wrote:
> Hello Uwe,
> 
> On Fri Apr 30, 2021 at 11:51 AM CEST, Uwe Kleine-König wrote:
>> If you agree that dropping both delay and clk_disable completely is the
>> right thing, you address both problems and going forward with your patch
>> isn't sensible.
> 
> I had my doubts whether simply clearing the PWMx_EN bit would be enough
> to turn the PWM off but I stand corrected. It does work.
> 
> The added bonusu is that once without the invocations of {u,m}sleep and
> clk_{enable_,disable_un}prepare, the sun4i_pwm_apply function finally
> becomes safe for running in an atomic context.
> 
> I will therefore prepare a new patch and come back some time next week.
> 
> Have a great weekend,
> Roman

Hi Roman,

A while ago others and I have made an attempt at fixing this as well.
Before you continue, I'd like to draw your attention to these previous
attempts. Maybe in the mean time things have changed, maybe they
haven't, but I can definitely tell you that just clearing the enable bit
isn't enough. There is some precise timing involved, hence the delays
are there. Unfortunately to my knowledge, this hasn't been documented
anywhere so it's just trial and error.

Please take a look at this post: https://lkml.org/lkml/2020/3/17/1158

Good luck!

Regards,
Pascal

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/6f65c35761a96443532347586494471c%40pascalroeleven.nl.

Reply via email to