aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Genoud <richard.genoud@gmail.com>2017-06-01 08:18:25 -0400
committerLinus Walleij <linus.walleij@linaro.org>2017-06-09 03:36:59 -0400
commitc528eb27a3be2600e724c8a57cb69eab1fd9afa2 (patch)
tree2b9ed5e85fc2e95d4a29bdb72c850ed49de93f6b
parent0377f49fb4f83edf40a6ff355eb8df6697491ea1 (diff)
gpio: mvebu: fix blink counter register selection
The blink counter A was always selected because 0 was forced in the blink select counter register. The variable 'set' was obviously there to be used as the register value, selecting the B counter when id==1 and A counter when id==0. Tested on clearfog-pro (Marvell 88F6828) Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support") Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Reviewed-by: Ralph Sennhauser <ralph.sennhauser@gmail.com> Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpio-mvebu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 19a92efabbef..cdef2c78cb3b 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -747,7 +747,7 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
747 set = U32_MAX; 747 set = U32_MAX;
748 else 748 else
749 return -EINVAL; 749 return -EINVAL;
750 writel_relaxed(0, mvebu_gpioreg_blink_counter_select(mvchip)); 750 writel_relaxed(set, mvebu_gpioreg_blink_counter_select(mvchip));
751 751
752 mvpwm = devm_kzalloc(dev, sizeof(struct mvebu_pwm), GFP_KERNEL); 752 mvpwm = devm_kzalloc(dev, sizeof(struct mvebu_pwm), GFP_KERNEL);
753 if (!mvpwm) 753 if (!mvpwm)