mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
genirq: Move wakeup state to irq_data
Some irq_chips need to know the state of wakeup mode for setting the trigger type etc. Reflect it in irq_data state. Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
d4d5e08960
commit
7f94226f03
4 changed files with 11 additions and 5 deletions
|
|
@ -46,7 +46,6 @@ enum {
|
|||
* IRQS_PENDING - irq is pending and replayed later
|
||||
* IRQS_MASKED - irq is masked
|
||||
* IRQS_SUSPENDED - irq is suspended
|
||||
* IRQS_WAKEUP - irq triggers system wakeup from suspend
|
||||
*/
|
||||
enum {
|
||||
IRQS_AUTODETECT = 0x00000001,
|
||||
|
|
@ -60,7 +59,6 @@ enum {
|
|||
IRQS_PENDING = 0x00000200,
|
||||
IRQS_MASKED = 0x00000400,
|
||||
IRQS_SUSPENDED = 0x00000800,
|
||||
IRQS_WAKEUP = 0x00001000,
|
||||
};
|
||||
|
||||
#include "compat.h"
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ int irq_set_irq_wake(unsigned int irq, unsigned int on)
|
|||
if (ret)
|
||||
desc->wake_depth = 0;
|
||||
else
|
||||
desc->istate |= IRQS_WAKEUP;
|
||||
irqd_set(&desc->irq_data, IRQD_WAKEUP_STATE);
|
||||
}
|
||||
} else {
|
||||
if (desc->wake_depth == 0) {
|
||||
|
|
@ -502,7 +502,7 @@ int irq_set_irq_wake(unsigned int irq, unsigned int on)
|
|||
if (ret)
|
||||
desc->wake_depth = 1;
|
||||
else
|
||||
desc->istate &= ~IRQS_WAKEUP;
|
||||
irqd_clear(&desc->irq_data, IRQD_WAKEUP_STATE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ int check_wakeup_irqs(void)
|
|||
int irq;
|
||||
|
||||
for_each_irq_desc(irq, desc)
|
||||
if ((desc->istate & IRQS_WAKEUP) &&
|
||||
if (irqd_is_wakeup_set(&desc->irq_data) &&
|
||||
(desc->istate & IRQS_PENDING))
|
||||
return -EBUSY;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue