diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-05-17 11:12:32 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-06-14 10:51:45 +0200 |
commit | cc51846ba81ca179a3be20f6313e3b72531888c1 (patch) | |
tree | c62812f5b0210cb325645b082d7c7f9558ddcf9e /drivers/pwm | |
parent | fe5aa34d6eb9c4d34071845f70f3714b41c8a77d (diff) | |
download | linux-cc51846ba81ca179a3be20f6313e3b72531888c1.tar.bz2 |
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>
Diffstat (limited to 'drivers/pwm')
-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) chip->chip.of_pwm_n_cells = 3; chip->chip.can_sleep = 1; - ret = pwmchip_add(&chip->chip); + ret = pwmchip_add_with_polarity(&chip->chip, PWM_POLARITY_INVERSED); if (ret) { clk_disable_unprepare(hlcdc->periph_clk); return ret; |