File tree 2 files changed +14
-0
lines changed 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -923,6 +923,15 @@ static int amd_gpio_suspend(struct device *dev)
923
923
924
924
raw_spin_lock_irqsave (& gpio_dev -> lock , flags );
925
925
gpio_dev -> saved_regs [i ] = readl (gpio_dev -> base + pin * 4 ) & ~PIN_IRQ_PENDING ;
926
+
927
+ /* mask any interrupts not intended to be a wake source */
928
+ if (!(gpio_dev -> saved_regs [i ] & WAKE_SOURCE )) {
929
+ writel (gpio_dev -> saved_regs [i ] & ~BIT (INTERRUPT_MASK_OFF ),
930
+ gpio_dev -> base + pin * 4 );
931
+ pm_pr_dbg ("Disabling GPIO #%d interrupt for suspend.\n" ,
932
+ pin );
933
+ }
934
+
926
935
raw_spin_unlock_irqrestore (& gpio_dev -> lock , flags );
927
936
}
928
937
Original file line number Diff line number Diff line change 80
80
#define FUNCTION_MASK GENMASK(1, 0)
81
81
#define FUNCTION_INVALID GENMASK(7, 0)
82
82
83
+ #define WAKE_SOURCE (BIT(WAKE_CNTRL_OFF_S0I3) | \
84
+ BIT(WAKE_CNTRL_OFF_S3) | \
85
+ BIT(WAKE_CNTRL_OFF_S4) | \
86
+ BIT(WAKECNTRL_Z_OFF))
87
+
83
88
struct amd_function {
84
89
const char * name ;
85
90
const char * const groups [NSELECTS ];
You can’t perform that action at this time.
0 commit comments