• Lokesh Vutla's avatar
    pwm: omap-dmtimer: Fix PWM enabling sequence · 867beb60
    Lokesh Vutla authored
    To configure DM timer in PWM mode the following needs to be set in
    OMAP_TIMER_CTRL_REG using set_pwm callback:
    - Set toggle mode on PORTIMERPWM output pin
    - Set trigger on overflow and match on PORTIMERPWM output pin.
    - Set auto reload
    
    This is a one time configuration and needs to be set before the start of
    the DM timer. But the current driver tries to set the same configuration
    for every period/duty cycle update, which is not needed. So move the PWM
    setup before enabling timer and do not update it in
    pwm_omap_dmtimer_config().
    Tested-by: default avatarTony Lindgren <tony@atomide.com>
    Signed-off-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
    Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
    867beb60
pwm-omap-dmtimer.c 11.2 KB