Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright 2010 Ben Dooks <ben-linux@fluff.org>
0004  *
0005  * Support for wakeup mask interrupts on newer SoCs
0006  */
0007 
0008 #ifndef __PLAT_WAKEUP_MASK_H
0009 #define __PLAT_WAKEUP_MASK_H __file__
0010 
0011 /* if no irq yet defined, but still want to mask */
0012 #define NO_WAKEUP_IRQ (0x90000000)
0013 
0014 /**
0015  * struct samsung_wakeup_mask - wakeup mask information
0016  * @irq: The interrupt associated with this wakeup.
0017  * @bit: The bit, as a (1 << bitno) controlling this source.
0018  */ 
0019 struct samsung_wakeup_mask {
0020     unsigned int    irq;
0021     u32     bit;
0022 };
0023 
0024 /**
0025  * samsung_sync_wakemask - sync wakeup mask information for pm
0026  * @reg: The register that is used.
0027  * @masks: The list of masks to use.
0028  * @nr_masks: The number of entries pointed to buy @masks.
0029  *
0030  * Synchronise the wakeup mask information at suspend time from the list
0031  * of interrupts and control bits in @masks. We do this at suspend time
0032  * as overriding the relevant irq chips is harder and the register is only
0033  * required to be correct before we enter sleep.
0034  */
0035 extern void samsung_sync_wakemask(void __iomem *reg,
0036                   const struct samsung_wakeup_mask *masks,
0037                   int nr_masks);
0038 
0039 #endif /* __PLAT_WAKEUP_MASK_H */