summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-01-03 06:13:59 +0000
committerMichael Sevakis <jethead71@rockbox.org>2012-01-03 06:13:59 +0000
commit30c4efcd16ad00f4ee108856f99967df80be1caf (patch)
treee93ed1eb661d14be87f06a51145e48e3d71745bd
parent4c917f76c6b6b04de8f0e7d7c49ab6accbd58362 (diff)
downloadrockbox-30c4efcd16ad00f4ee108856f99967df80be1caf.tar.gz
rockbox-30c4efcd16ad00f4ee108856f99967df80be1caf.zip
i.MX31: Fix a couple oopses from r31528
Enabled a PMIC event where it should be disabled. Used constant from wrong enum to get sense bits (??) which messed up main charger detection. Also remove an obsolete struct declaration. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31536 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/mc13783.h6
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c2
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.c3
3 files changed, 2 insertions, 9 deletions
diff --git a/firmware/export/mc13783.h b/firmware/export/mc13783.h
index 4324d06df5..6ad34346df 100644
--- a/firmware/export/mc13783.h
+++ b/firmware/export/mc13783.h
@@ -1338,12 +1338,6 @@ struct mc13783_event
1338 void (*callback)(void); 1338 void (*callback)(void);
1339}; 1339};
1340 1340
1341struct mc13783_event_list
1342{
1343 unsigned count;
1344 const struct mc13783_event *events;
1345};
1346
1347void mc13783_enable_event(enum mc13783_event_ids id, bool enable); 1341void mc13783_enable_event(enum mc13783_event_ids id, bool enable);
1348 1342
1349/* Read the sense bit if one exists - valid only within event handlers */ 1343/* Read the sense bit if one exists - valid only within event handlers */
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 11d1d5a0b4..3972e5722f 100644
--- a/firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c
+++ b/firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c
@@ -213,7 +213,7 @@ void button_close_device(void)
213 /* Assumes HP detection is not available */ 213 /* Assumes HP detection is not available */
214 initialized = false; 214 initialized = false;
215 215
216 mc13783_enable_event(MC13783_ONOFD1_EVENT, true); 216 mc13783_enable_event(MC13783_ONOFD1_EVENT, false);
217 ext_btn = BUTTON_NONE; 217 ext_btn = BUTTON_NONE;
218} 218}
219#endif /* BUTTON_DRIVER_CLOSE */ 219#endif /* BUTTON_DRIVER_CLOSE */
diff --git a/firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.c
index 5b255a0e27..d194a69ab1 100644
--- a/firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.c
+++ b/firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.c
@@ -68,8 +68,7 @@ static void update_main_charger(bool present)
68/* Detect changes in presence of the AC adaptor. Called from PMIC ISR. */ 68/* Detect changes in presence of the AC adaptor. Called from PMIC ISR. */
69void charger_main_detect_event(void) 69void charger_main_detect_event(void)
70{ 70{
71 update_main_charger(mc13783_event_sense(MC13783_INT_ID_SE1) 71 update_main_charger(mc13783_event_sense(MC13783_SE1_EVENT));
72 & MC13783_SE1S);
73} 72}
74 73
75/* Detect changes in USB bus power. Called from usb connect event ISR. */ 74/* Detect changes in USB bus power. Called from usb connect event ISR. */