aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2013-12-10 18:19:03 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 15:24:24 -0500
commitdb74f02285dc0a6f649d7f44e97e1219af22ed76 (patch)
treea5aee8adfc8cb24db4680f2b821546edc0f37179
parentd459f7e344ccdbdcba68192710642f90297de5b4 (diff)
gpio: msm: Fix irq mask/unmask by writing bits instead of numbers
commit 4cc629b7a20945ce35628179180329b6bc9e552b upstream. We should be writing bits here but instead we're writing the numbers that correspond to the bits we want to write. Fix it by wrapping the numbers in the BIT() macro. This fixes gpios acting as interrupts. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpio/gpio-msm-v2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c
index dd2eddeb1e0c..500c4d19322b 100644
--- a/drivers/gpio/gpio-msm-v2.c
+++ b/drivers/gpio/gpio-msm-v2.c
@@ -248,7 +248,7 @@ static void msm_gpio_irq_mask(struct irq_data *d)
248 248
249 spin_lock_irqsave(&tlmm_lock, irq_flags); 249 spin_lock_irqsave(&tlmm_lock, irq_flags);
250 writel(TARGET_PROC_NONE, GPIO_INTR_CFG_SU(gpio)); 250 writel(TARGET_PROC_NONE, GPIO_INTR_CFG_SU(gpio));
251 clear_gpio_bits(INTR_RAW_STATUS_EN | INTR_ENABLE, GPIO_INTR_CFG(gpio)); 251 clear_gpio_bits(BIT(INTR_RAW_STATUS_EN) | BIT(INTR_ENABLE), GPIO_INTR_CFG(gpio));
252 __clear_bit(gpio, msm_gpio.enabled_irqs); 252 __clear_bit(gpio, msm_gpio.enabled_irqs);
253 spin_unlock_irqrestore(&tlmm_lock, irq_flags); 253 spin_unlock_irqrestore(&tlmm_lock, irq_flags);
254} 254}
@@ -260,7 +260,7 @@ static void msm_gpio_irq_unmask(struct irq_data *d)
260 260
261 spin_lock_irqsave(&tlmm_lock, irq_flags); 261 spin_lock_irqsave(&tlmm_lock, irq_flags);
262 __set_bit(gpio, msm_gpio.enabled_irqs); 262 __set_bit(gpio, msm_gpio.enabled_irqs);
263 set_gpio_bits(INTR_RAW_STATUS_EN | INTR_ENABLE, GPIO_INTR_CFG(gpio)); 263 set_gpio_bits(BIT(INTR_RAW_STATUS_EN) | BIT(INTR_ENABLE), GPIO_INTR_CFG(gpio));
264 writel(TARGET_PROC_SCORPION, GPIO_INTR_CFG_SU(gpio)); 264 writel(TARGET_PROC_SCORPION, GPIO_INTR_CFG_SU(gpio));
265 spin_unlock_irqrestore(&tlmm_lock, irq_flags); 265 spin_unlock_irqrestore(&tlmm_lock, irq_flags);
266} 266}