From 8db9e29fe540c9640ea60f37ecf99d3a73bd12c5 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Fri, 14 Mar 2014 15:19:08 +0100 Subject: [PATCH] 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 Acked-by: Nicolas Ferre Signed-off-by: Thierry Reding --- Reading git-format-patch failed