mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
Tag for the input subsystem to pick up
-----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmBcNE4THHRnbHhAbGlu dXRyb25peC5kZQAKCRCmGPVMDXSYoYSnD/0Sag2x37ksPdWlSJ8/j9r79+0u/r8W QRN7ln6DP/RwGHuFMYNhjczagfyHcjH+1fSFfIhnic0ZlodiJqzGpsHl153bgvci hi+Qe1ad+a1FlQSAd5A00lDfApc1q24RKq+Qyx7O/cnh2A6jb46a5pFRrKxuY0ys H7WprWVSkkO7TEzECbkiqDJfz2gAhn2n05iHndbgzuYEYyHepahV5vPfz9xBjNvN pvVUU0F/1GDDgpJcLWBCZkMx21O/J1lXl6cZx/l5awM5XhEOInnrjEMz0r6do/QE pQQTxdUZHaQAC+6mQg0yNPavWR4Y/RlNcD00Mg/LRkkxZiD4wjygk3taUZcgg50R ScqXaDAyIBSbSF/VyDAf+k1PAdw+tFKWUIS0C0KiMla7c6S9OfUXOLBoCF17P+3P l5GQWWLhAERklRm8tyIfwD3VarlQGzVYsonlauttaIaR5wd49kswr7kVUztQSUTu ncC/k2sz1bYQ6iltNcXq7Fsp8oMham4QH1TwHv5+HZeNV8zNJXtkqfdSxacY7qvn xq3wahM6TiWsh0u8tlFA567uwv9sKRwEYHhwh2SoRR7vxYeQhoggvsapjXbOEGx0 9kDPMbbSofrQoAjdPP610sHNuiDAjxGMV3AM+ybkLRwLX1mH/wucS6w+KC+5+Umh 5jWxpa5D6znQKw== =A79t -----END PGP SIGNATURE----- Merge tag 'irq-no-autoen-2021-03-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into exynos-drm-next Tag for the input subsystem to pick up
This commit is contained in:
commit
99e5730dd2
2 changed files with 13 additions and 2 deletions
|
@ -61,6 +61,9 @@
|
|||
* interrupt handler after suspending interrupts. For system
|
||||
* wakeup devices users need to implement wakeup detection in
|
||||
* their interrupt handlers.
|
||||
* IRQF_NO_AUTOEN - Don't enable IRQ or NMI automatically when users request it.
|
||||
* Users will enable it explicitly by enable_irq() or enable_nmi()
|
||||
* later.
|
||||
*/
|
||||
#define IRQF_SHARED 0x00000080
|
||||
#define IRQF_PROBE_SHARED 0x00000100
|
||||
|
@ -74,6 +77,7 @@
|
|||
#define IRQF_NO_THREAD 0x00010000
|
||||
#define IRQF_EARLY_RESUME 0x00020000
|
||||
#define IRQF_COND_SUSPEND 0x00040000
|
||||
#define IRQF_NO_AUTOEN 0x00080000
|
||||
|
||||
#define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD)
|
||||
|
||||
|
|
|
@ -1693,7 +1693,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
|
|||
irqd_set(&desc->irq_data, IRQD_NO_BALANCING);
|
||||
}
|
||||
|
||||
if (irq_settings_can_autoenable(desc)) {
|
||||
if (!(new->flags & IRQF_NO_AUTOEN) &&
|
||||
irq_settings_can_autoenable(desc)) {
|
||||
irq_startup(desc, IRQ_RESEND, IRQ_START_COND);
|
||||
} else {
|
||||
/*
|
||||
|
@ -2086,10 +2087,15 @@ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
|
|||
* which interrupt is which (messes up the interrupt freeing
|
||||
* logic etc).
|
||||
*
|
||||
* Also shared interrupts do not go well with disabling auto enable.
|
||||
* The sharing interrupt might request it while it's still disabled
|
||||
* and then wait for interrupts forever.
|
||||
*
|
||||
* Also IRQF_COND_SUSPEND only makes sense for shared interrupts and
|
||||
* it cannot be set along with IRQF_NO_SUSPEND.
|
||||
*/
|
||||
if (((irqflags & IRQF_SHARED) && !dev_id) ||
|
||||
((irqflags & IRQF_SHARED) && (irqflags & IRQF_NO_AUTOEN)) ||
|
||||
(!(irqflags & IRQF_SHARED) && (irqflags & IRQF_COND_SUSPEND)) ||
|
||||
((irqflags & IRQF_NO_SUSPEND) && (irqflags & IRQF_COND_SUSPEND)))
|
||||
return -EINVAL;
|
||||
|
@ -2245,7 +2251,8 @@ int request_nmi(unsigned int irq, irq_handler_t handler,
|
|||
|
||||
desc = irq_to_desc(irq);
|
||||
|
||||
if (!desc || irq_settings_can_autoenable(desc) ||
|
||||
if (!desc || (irq_settings_can_autoenable(desc) &&
|
||||
!(irqflags & IRQF_NO_AUTOEN)) ||
|
||||
!irq_settings_can_request(desc) ||
|
||||
WARN_ON(irq_settings_is_per_cpu_devid(desc)) ||
|
||||
!irq_supports_nmi(desc))
|
||||
|
|
Loading…
Reference in a new issue