sh_cmt: use remove_irq() and remove clockevent workaround
Subsystems (2)
PATCH 1/1 sh_cmt: use remove_irq() and remove clockevent workaround
From: Magnus Damm <[email protected]>
Update the sh_cmt driver to make use of recent irq and clockevent changes:
- use remove_irq() together with setup_irq()
- remove mult workaround since WARN_ON() now has been moved
---
drivers/clocksource/sh_cmt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/clocksource/sh_cmt.c +1 -2
@@ -465,7 +465,6 @@ static void sh_cmt_register_clockevent(s ced->set_mode = sh_cmt_clock_event_mode;pr_info ("sh_cmt: %s used for clock events\n" , ced->name); - ced->mult =1 ;/* work around misplaced WARN_ON() in clockevents.c */ clockevents_register_device (ced); }
@@ -557,7 +556,7 @@ static int sh_cmt_setup(struct sh_cmt_pr cfg->clockevent_rating, cfg->clocksource_rating); err2: -free_irq (irq, p); +remove_irq (irq, &p->irqaction); err1:iounmap (p->mapbase); err0:
Quoted 3 lines · Magnus Damm
Update the
sh_cmtdriver to make use of recent irq and clockevent changes:
- useremove_irq()together withsetup_irq()
- remove mult workaround sinceWARN_ON()now has been moved
Quoted 6 lines · Magnus Damm
Modify the intc code to install a disable callback. The current solution without a disable callback results in use of the generic
default_disable()function. This function is a no-op sosuspend_device_irqs()will not disable any intc interrupts at suspend time without this patch. Also, install enable and shutdown callbacks while at it.
Quoted 8 lines · Magnus Damm
Add
set_irq_wake()support to intc using sysdev and suspend.The intc controllers are put on a list at registration time and registered as sysdev devices later on during the boot.
The sysdev class suspend callback is used to find irqs with wakeup enabled belonging to our intc controller. Such irqs are simply enabled so wakeup interrupts may reach the cpu.
Quoted 4 lines · Magnus Damm
Modify the
sh_keyscdriver to use enable/disable_irq_wake() during suspend and resume. These functions are used to enable thesh_keyscinterrupt in the interrupt controller so the keypad can be used to wakeup the system from suspend.
Quoted 4 lines · Magnus Damm
Modify the
sh_rtcdriver to useset_irq_wake()during suspend and resume. These functions are used to enable the rtc interrupts in the interrupt controller so the rtc can be used to wakeup the system from suspend.
Quoted 3 lines · Magnus Damm
Add wakeup support to the
migor_tsdriver. If user space has enabled wakeup, useset_irq_wake()during suspend and resume. With this patch themigor_tsdriver can be used to wake the system from suspend.
All applied, thanks.