Skip to content

Commit 6aced33

Browse files
Josh CartwrightLinus Walleij
authored andcommitted
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 <[email protected]> Acked-by: Bjorn Andersson <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 42bd007 commit 6aced33

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

drivers/pinctrl/pinctrl-msm.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
* @enabled_irqs: Bitmap of currently enabled irqs.
5151
* @dual_edge_irqs: Bitmap of irqs that need sw emulated dual edge
5252
* detection.
53-
* @wake_irqs: Bitmap of irqs with requested as wakeup source.
5453
* @soc; Reference to soc_data of platform specific data.
5554
* @regs: Base address for the TLMM register map.
5655
*/
@@ -65,7 +64,6 @@ struct msm_pinctrl {
6564

6665
DECLARE_BITMAP(dual_edge_irqs, MAX_NR_GPIO);
6766
DECLARE_BITMAP(enabled_irqs, MAX_NR_GPIO);
68-
DECLARE_BITMAP(wake_irqs, MAX_NR_GPIO);
6967

7068
const struct msm_pinctrl_soc_data *soc;
7169
void __iomem *regs;
@@ -810,22 +808,12 @@ static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
810808
{
811809
struct msm_pinctrl *pctrl;
812810
unsigned long flags;
813-
unsigned ngpio;
814811

815812
pctrl = irq_data_get_irq_chip_data(d);
816-
ngpio = pctrl->chip.ngpio;
817813

818814
spin_lock_irqsave(&pctrl->lock, flags);
819815

820-
if (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-
}
816+
irq_set_irq_wake(pctrl->irq, on);
829817

830818
spin_unlock_irqrestore(&pctrl->lock, flags);
831819

0 commit comments

Comments
 (0)