diff options
author | Alexandre Belloni <[email protected]> | 2014-03-14 15:19:08 +0100 |
---|---|---|
committer | Thierry Reding <[email protected]> | 2014-03-18 20:47:31 +0100 |
commit | 8db9e29fe540c9640ea60f37ecf99d3a73bd12c5 (patch) | |
tree | d7458bb791e71432ad12fe47aa9380d78830733f /lib/mpi/mpi-internal.h | |
parent | 42586315b7b6e682bd4136a1a2bc2b1d50113487 (diff) |
pwm: atmel: Fix polarity handling
When atmel_pwm_config() calculates and then sets the prescaler, it is
overwriting the channel's CMR register so we are losing the CPOL
configuration.
As atmel_pwm_config() is always called before enabling a channel,
inverting the polarity doesn't work.
Fix that by reading CMR first and only overwriting the prescaler bits.
Signed-off-by: Alexandre Belloni <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions