diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-05-17 05:12:32 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-06-14 04:51:45 -0400 |
commit | cc51846ba81ca179a3be20f6313e3b72531888c1 (patch) | |
tree | c62812f5b0210cb325645b082d7c7f9558ddcf9e | |
parent | fe5aa34d6eb9c4d34071845f70f3714b41c8a77d (diff) |
pwm: atmel-hlcdc: Fix default PWM polarity
The PWM device exposed by the HLCDC IP is configured with an inverted
polarity by default. Registering the PWM chip with the normal polarity
was not a problem before commit 42e8992c58d4 ("pwm: Add core
infrastructure to allow atomic updates") because the ->set_polarity()
hook was called no matter the current polarity state, but this is no longer
the case.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-rw-r--r-- | drivers/pwm/pwm-atmel-hlcdc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-atmel-hlcdc.c b/drivers/pwm/pwm-atmel-hlcdc.c index f994c7eaf41c..14fc011faa32 100644 --- a/drivers/pwm/pwm-atmel-hlcdc.c +++ b/drivers/pwm/pwm-atmel-hlcdc.c | |||
@@ -272,7 +272,7 @@ static int atmel_hlcdc_pwm_probe(struct platform_device *pdev) | |||
272 | chip->chip.of_pwm_n_cells = 3; | 272 | chip->chip.of_pwm_n_cells = 3; |
273 | chip->chip.can_sleep = 1; | 273 | chip->chip.can_sleep = 1; |
274 | 274 | ||
275 | ret = pwmchip_add(&chip->chip); | 275 | ret = pwmchip_add_with_polarity(&chip->chip, PWM_POLARITY_INVERSED); |
276 | if (ret) { | 276 | if (ret) { |
277 | clk_disable_unprepare(hlcdc->periph_clk); | 277 | clk_disable_unprepare(hlcdc->periph_clk); |
278 | return ret; | 278 | return ret; |