diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-12-18 10:41:43 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-12-18 10:41:43 +0000 |
commit | 292e7cab73c75260b7cfb7f90ad28938c8f1117a (patch) | |
tree | 4341681314958c3a9aa663e5ace52eb4b1e107ab /firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c | |
parent | 0efabb3d19e7690585641c4a19eca131d15b59d8 (diff) | |
download | rockbox-292e7cab73c75260b7cfb7f90ad28938c8f1117a.tar.gz rockbox-292e7cab73c75260b7cfb7f90ad28938c8f1117a.zip |
Gigabeat S: PMIC SPI improvement and bugfixes.
Nick some aspects from the as3525 ascodec driver to improve throughput in
the beast's SPI communications by switching tranfer descriptors to the
caller's stack and getting rid of thread synchronization.
Fix a bug that suddenly became obvious that could permanently stall the SPI
driver because all data could be shifted out before the interrupt could get
serviced. In that case, it needs a kick to restart it. Should probably put
the SPI interrupt priority above DVFS.
A tweak to the event registration interface to simplify it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31353 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c index e0745a5b8b..6d992388f2 100644 --- a/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c | |||
@@ -56,33 +56,28 @@ const struct mc13783_event mc13783_events[MC13783_NUM_EVENTS] = | |||
56 | { | 56 | { |
57 | [MC13783_ADCDONE_EVENT] = /* ADC conversion complete */ | 57 | [MC13783_ADCDONE_EVENT] = /* ADC conversion complete */ |
58 | { | 58 | { |
59 | .set = MC13783_EVENT_SET0, | 59 | .int_id = MC13783_INT_ID_ADCDONE, |
60 | .mask = MC13783_ADCDONEM, | ||
61 | .callback = adc_done, | 60 | .callback = adc_done, |
62 | }, | 61 | }, |
63 | [MC13783_ONOFD1_EVENT] = /* Power button */ | 62 | [MC13783_ONOFD1_EVENT] = /* Power button */ |
64 | { | 63 | { |
65 | .set = MC13783_EVENT_SET1, | 64 | .int_id = MC13783_INT_ID_ONOFD1, |
66 | .mask = MC13783_ONOFD1M, | ||
67 | .callback = button_power_event, | 65 | .callback = button_power_event, |
68 | }, | 66 | }, |
69 | [MC13783_SE1_EVENT] = /* Main charger detection */ | 67 | [MC13783_SE1_EVENT] = /* Main charger detection */ |
70 | { | 68 | { |
71 | .set = MC13783_EVENT_SET0, | 69 | .int_id = MC13783_INT_ID_SE1, |
72 | .mask = MC13783_SE1M, | ||
73 | .callback = charger_main_detect_event, | 70 | .callback = charger_main_detect_event, |
74 | }, | 71 | }, |
75 | [MC13783_USB_EVENT] = /* USB insertion/USB charger detection */ | 72 | [MC13783_USB_EVENT] = /* USB insertion/USB charger detection */ |
76 | { | 73 | { |
77 | .set = MC13783_EVENT_SET0, | 74 | .int_id = MC13783_INT_ID_USB, |
78 | .mask = MC13783_USBM, | ||
79 | .callback = usb_connect_event, | 75 | .callback = usb_connect_event, |
80 | }, | 76 | }, |
81 | #ifdef HAVE_HEADPHONE_DETECTION | 77 | #ifdef HAVE_HEADPHONE_DETECTION |
82 | [MC13783_ONOFD2_EVENT] = /* Headphone jack */ | 78 | [MC13783_ONOFD2_EVENT] = /* Headphone jack */ |
83 | { | 79 | { |
84 | .set = MC13783_EVENT_SET1, | 80 | .int_id = MC13783_INT_ID_ONOFD2, |
85 | .mask = MC13783_ONOFD2M, | ||
86 | .callback = headphone_detect_event, | 81 | .callback = headphone_detect_event, |
87 | }, | 82 | }, |
88 | #endif | 83 | #endif |