From 5d1c9ed552bcd17b3e444abcf4b94ea7856ea702 Mon Sep 17 00:00:00 2001 From: dreamlayers Date: Sun, 19 Apr 2009 18:17:35 +0000 Subject: [PATCH] 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 --- firmware/target/arm/ipod/power-ipod.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/target/arm/ipod/power-ipod.c b/firmware/target/arm/ipod/power-ipod.c index 66d703859..2de10c7f0 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 */ -- 2.11.4.GIT