From 2220a4b695f2f5ac9fe212de4bcfa5365318136f Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 28 Jan 2017 14:43:35 -0500 Subject: Improve imx31 interrupt code for PMIC and GPIO Fix stuff that was bugging me about the way I did it at first. While messing around I found RDS code wasn't masking its GPIO ISR as it should, which might lead to two different interrupts messing with the static data. Change-Id: I54626809ea3039a842af0cc9e3e42853326c4193 --- firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c') diff --git a/firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c index 3972e5722f..cdd6da041b 100644 --- a/firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c @@ -157,9 +157,9 @@ static void power_button_update(bool pressed) } /* Power button event - called from PMIC ISR */ -void button_power_event(void) +void MC13783_EVENT_CB_ONOFD1(void) { - power_button_update(!mc13783_event_sense(MC13783_ONOFD1_EVENT)); + power_button_update(!mc13783_event_sense()); } void button_init_device(void) @@ -197,7 +197,7 @@ void button_init_device(void) power_button_update(!(mc13783_read(MC13783_INTERRUPT_SENSE1) & MC13783_ONOFD1S)); - mc13783_enable_event(MC13783_ONOFD1_EVENT, true); + mc13783_enable_event(MC13783_INT_ID_ONOFD1, true); #ifdef HAVE_HEADPHONE_DETECTION headphone_init(); @@ -213,7 +213,7 @@ void button_close_device(void) /* Assumes HP detection is not available */ initialized = false; - mc13783_enable_event(MC13783_ONOFD1_EVENT, false); + mc13783_enable_event(MC13783_INT_ID_ONOFD1, false); ext_btn = BUTTON_NONE; } #endif /* BUTTON_DRIVER_CLOSE */ -- cgit v1.2.3