diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2017-01-28 14:43:35 -0500 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2017-01-29 19:07:55 -0500 |
commit | 2220a4b695f2f5ac9fe212de4bcfa5365318136f (patch) | |
tree | ef0b31d798b12cbc5cd61e3f020f1856c1759db4 /firmware/target/arm/imx31/gigabeat-s/headphone-gigabeat-s.c | |
parent | d4303ac900bae6b0fd2320db33bdb4f10861a430 (diff) | |
download | rockbox-2220a4b695f2f5ac9fe212de4bcfa5365318136f.tar.gz rockbox-2220a4b695f2f5ac9fe212de4bcfa5365318136f.zip |
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
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/headphone-gigabeat-s.c')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/headphone-gigabeat-s.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/headphone-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/headphone-gigabeat-s.c index 6fdde32185..cf0a378fc7 100644 --- a/firmware/target/arm/imx31/gigabeat-s/headphone-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/headphone-gigabeat-s.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "kernel.h" | 25 | #include "kernel.h" |
26 | #include "thread.h" | 26 | #include "thread.h" |
27 | #include "mc13783.h" | 27 | #include "mc13783.h" |
28 | #include "mc13783-target.h" | ||
29 | #include "adc.h" | 28 | #include "adc.h" |
30 | #include "button.h" | 29 | #include "button.h" |
31 | 30 | ||
@@ -146,7 +145,7 @@ static void NORETURN_ATTR headphone_thread(void) | |||
146 | } | 145 | } |
147 | 146 | ||
148 | /* HP plugged/unplugged event - called from PMIC ISR */ | 147 | /* HP plugged/unplugged event - called from PMIC ISR */ |
149 | void headphone_detect_event(void) | 148 | void MC13783_EVENT_CB_ONOFD2(void) |
150 | { | 149 | { |
151 | /* Trigger the thread immediately. */ | 150 | /* Trigger the thread immediately. */ |
152 | semaphore_release(&headphone_wakeup); | 151 | semaphore_release(&headphone_wakeup); |
@@ -170,5 +169,5 @@ void INIT_ATTR headphone_init(void) | |||
170 | IF_COP(, CPU)); | 169 | IF_COP(, CPU)); |
171 | 170 | ||
172 | /* Enable PMIC event */ | 171 | /* Enable PMIC event */ |
173 | mc13783_enable_event(MC13783_ONOFD2_EVENT, true); | 172 | mc13783_enable_event(MC13783_INT_ID_ONOFD2, true); |
174 | } | 173 | } |