aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorJosh Cartwright <joshc@codeaurora.org>2014-03-05 14:33:08 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-03-12 09:54:28 -0400
commit6aced33f4974ab240971fdb5e42d7bebacd8ee45 (patch)
treeaccc658912cb2376be713779ff800f77ce017b67 /drivers/pinctrl
parent42bd00706ce95d74ad6ebcb8528ee1fbbb992f6a (diff)
pinctrl: msm: drop wake_irqs bitmap
Currently, the wake_irqs bitmap is used to track whether there are any gpio's which are configured as wake irqs, and uses this to determine whether or not to call enable_irq_wake()/disable_irq_wake() on the summary interrupt. However, the genirq core already handles this case, by maintaining a 'wake_count' per irq_desc, and only calling into the controlling irq_chip when wake_count transitions 0 <-> 1. Drop this bitmap, and unconditionally call irq_set_irq_wake() on the summary interrupt. Signed-off-by: Josh Cartwright <joshc@codeaurora.org> Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-msm.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/pinctrl/pinctrl-msm.c b/drivers/pinctrl/pinctrl-msm.c
index 2cfb1d4e4395..9b6b3a79a809 100644
--- a/drivers/pinctrl/pinctrl-msm.c
+++ b/drivers/pinctrl/pinctrl-msm.c
@@ -50,7 +50,6 @@
50 * @enabled_irqs: Bitmap of currently enabled irqs. 50 * @enabled_irqs: Bitmap of currently enabled irqs.
51 * @dual_edge_irqs: Bitmap of irqs that need sw emulated dual edge 51 * @dual_edge_irqs: Bitmap of irqs that need sw emulated dual edge
52 * detection. 52 * detection.
53 * @wake_irqs: Bitmap of irqs with requested as wakeup source.
54 * @soc; Reference to soc_data of platform specific data. 53 * @soc; Reference to soc_data of platform specific data.
55 * @regs: Base address for the TLMM register map. 54 * @regs: Base address for the TLMM register map.
56 */ 55 */
@@ -65,7 +64,6 @@ struct msm_pinctrl {
65 64
66 DECLARE_BITMAP(dual_edge_irqs, MAX_NR_GPIO); 65 DECLARE_BITMAP(dual_edge_irqs, MAX_NR_GPIO);
67 DECLARE_BITMAP(enabled_irqs, MAX_NR_GPIO); 66 DECLARE_BITMAP(enabled_irqs, MAX_NR_GPIO);
68 DECLARE_BITMAP(wake_irqs, MAX_NR_GPIO);
69 67
70 const struct msm_pinctrl_soc_data *soc; 68 const struct msm_pinctrl_soc_data *soc;
71 void __iomem *regs; 69 void __iomem *regs;
@@ -810,22 +808,12 @@ static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
810{ 808{
811 struct msm_pinctrl *pctrl; 809 struct msm_pinctrl *pctrl;
812 unsigned long flags; 810 unsigned long flags;
813 unsigned ngpio;
814 811
815 pctrl = irq_data_get_irq_chip_data(d); 812 pctrl = irq_data_get_irq_chip_data(d);
816 ngpio = pctrl->chip.ngpio;
817 813
818 spin_lock_irqsave(&pctrl->lock, flags); 814 spin_lock_irqsave(&pctrl->lock, flags);
819 815
820 if (on) { 816 irq_set_irq_wake(pctrl->irq, on);
821 if (bitmap_empty(pctrl->wake_irqs, ngpio))
822 enable_irq_wake(pctrl->irq);
823 set_bit(d->hwirq, pctrl->wake_irqs);
824 } else {
825 clear_bit(d->hwirq, pctrl->wake_irqs);
826 if (bitmap_empty(pctrl->wake_irqs, ngpio))
827 disable_irq_wake(pctrl->irq);
828 }
829 817
830 spin_unlock_irqrestore(&pctrl->lock, flags); 818 spin_unlock_irqrestore(&pctrl->lock, flags);
831 819