From 292e7cab73c75260b7cfb7f90ad28938c8f1117a Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sun, 18 Dec 2011 10:41:43 +0000 Subject: 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 --- firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c') 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] = { [MC13783_ADCDONE_EVENT] = /* ADC conversion complete */ { - .set = MC13783_EVENT_SET0, - .mask = MC13783_ADCDONEM, + .int_id = MC13783_INT_ID_ADCDONE, .callback = adc_done, }, [MC13783_ONOFD1_EVENT] = /* Power button */ { - .set = MC13783_EVENT_SET1, - .mask = MC13783_ONOFD1M, + .int_id = MC13783_INT_ID_ONOFD1, .callback = button_power_event, }, [MC13783_SE1_EVENT] = /* Main charger detection */ { - .set = MC13783_EVENT_SET0, - .mask = MC13783_SE1M, + .int_id = MC13783_INT_ID_SE1, .callback = charger_main_detect_event, }, [MC13783_USB_EVENT] = /* USB insertion/USB charger detection */ { - .set = MC13783_EVENT_SET0, - .mask = MC13783_USBM, + .int_id = MC13783_INT_ID_USB, .callback = usb_connect_event, }, #ifdef HAVE_HEADPHONE_DETECTION [MC13783_ONOFD2_EVENT] = /* Headphone jack */ { - .set = MC13783_EVENT_SET1, - .mask = MC13783_ONOFD2M, + .int_id = MC13783_INT_ID_ONOFD2, .callback = headphone_detect_event, }, #endif -- cgit v1.2.3