• Fabrice Gasnier's avatar
    pwm: stm32: Split breakinput apply routine to ease PM support · 0f9d2ecb
    Fabrice Gasnier authored
    Split breakinput routine that configures STM32 timers 'break' safety
    feature upon probe, into two routines:
    - stm32_pwm_apply_breakinputs() sets all the break inputs into registers.
    - stm32_pwm_probe_breakinputs() probes the device tree break input settings
      before calling stm32_pwm_apply_breakinputs()
    
    This is a precursor patch to ease PM support. Registers content may get
    lost during low power. So, break input settings applied upon probe need
    to be restored upon resume (e.g. by calling stm32_pwm_apply_breakinputs()).
    Signed-off-by: default avatarFabrice Gasnier <fabrice.gasnier@st.com>
    Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
    0f9d2ecb
pwm-stm32.c 18 KB