summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Gjenero <dreamlayers@rockbox.org>2009-04-19 18:17:35 +0000
committerBoris Gjenero <dreamlayers@rockbox.org>2009-04-19 18:17:35 +0000
commit75a0a434d1f7b6f69c79862639ee057207b315dd (patch)
treee86bb9279b7ca7fe96984c9b38efe2892b56500f
parentaef5731d719fe334039dda1c2f5c589da9401253 (diff)
Add USB power detection for 4G, Photo, Color, 1G Mini and 2G Mini iPods. (See FS#5826 and FS#7727)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20745 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/ipod/power-ipod.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/target/arm/ipod/power-ipod.c b/firmware/target/arm/ipod/power-ipod.c
index 66d703859c..2de10c7f0b 100644
--- a/firmware/target/arm/ipod/power-ipod.c
+++ b/firmware/target/arm/ipod/power-ipod.c
@@ -59,6 +59,9 @@ unsigned int power_input_status(void)
/* C2 is firewire power */
if ((GPIOC_INPUT_VAL & 0x04) == 0)
status = POWER_INPUT_MAIN_CHARGER;
+
+ if ((GPIOD_INPUT_VAL & 0x08) != 0)
+ status |= POWER_INPUT_USB_CHARGER;
/* */
#elif defined(IPOD_3G)
/* firewire power */