• Yoshihiro Shimoda's avatar
    pwm: rcar: Add support "atomic" API · 7f68ce82
    Yoshihiro Shimoda authored
    This patch adds support for "atomic" API. This behavior differs with
    legacy APIs a little.
    
     Legacy APIs:
      The PWMCNT register will be updated in rcar_pwm_config() even if
      the PWM state is disabled.
    
     Atomic API:
      The PWMCNT register will be updated in rcar_pwm_apply() only if
      the PWM state is enabled. Otherwize, if a PWM runs with 30% duty
      cycles and the pwm_apply_state() is called with state->enabled = 0,
      ->duty_cycle = 60 and ->period = 100, this is possible to output
      a 60% duty cycle.
    Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
    7f68ce82
pwm-rcar.c 8.24 KB