diff options
author | Alex Gonzalez <alex.gonzalez@digi.com> | 2012-02-21 12:54:42 +0100 |
---|---|---|
committer | Alex Gonzalez <alex.gonzalez@digi.com> | 2012-02-21 12:54:42 +0100 |
commit | b18c30dd60daee65abed837402e92a8e549e7af2 (patch) | |
tree | 6f6ee99fbdb9f2c79a2e66e9bd3dd6ff76684ffb /arch | |
parent | 813a95ac0757995ae76d873ce14e41fc60a61965 (diff) |
mc13892: Generalize the previous patch.
The masking/unmasking of events in suspend/resume is not specific to
any platform.
Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx5/mx51_ccwmx51js_pmic_mc13892.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/arch/arm/mach-mx5/mx51_ccwmx51js_pmic_mc13892.c b/arch/arm/mach-mx5/mx51_ccwmx51js_pmic_mc13892.c index fbf097528041..9050e3586cae 100644 --- a/arch/arm/mach-mx5/mx51_ccwmx51js_pmic_mc13892.c +++ b/arch/arm/mach-mx5/mx51_ccwmx51js_pmic_mc13892.c @@ -26,8 +26,6 @@ #include <mach/irqs.h> #include "mx51_pins.h" -static unsigned int irqmasks[2]; - /* * Convenience conversion. * Here atm, maybe there is somewhere better for this. @@ -337,47 +335,6 @@ static void power_on_evt_handler(void) } #endif -int ccxmx51_pm_mc13892_mask_irqs( void ) -{ - int ev; - - // Store current masks - pmic_get_enabled_events(irqmasks); - - // Mask all events except power button and RTC - for( ev=0 ; ev < EVENT_NB ; ev++ ){ - if( ev == EVENT_PWRONI || ev == EVENT_TODAI ) - continue; - if( !pmic_is_event_masked(irqmasks,ev) ) - pmic_event_mask(ev); - } - return 0; -} - -int ccxmx51_pm_mc13892_unmask_irqs( void ) -{ - int ev; - unsigned int current_irqmasks[2]; - - // Fetch current event mask - pmic_get_enabled_events(current_irqmasks); - - // For all events - for( ev=0 ; ev < EVENT_NB ; ev++ ){ - if( pmic_is_event_masked(irqmasks,ev) ){ - if( !pmic_is_event_masked(current_irqmasks,ev) ){ - pmic_event_mask(ev); - } - } - else{ - if( pmic_is_event_masked(current_irqmasks,ev) ){ - pmic_event_unmask(ev); - } - } - } - return 0; -} - static int mc13892_regulator_init(struct mc13892 *mc13892) { unsigned int value, register_mask; |