Index: firmware/export/config-ipodcolor.h =================================================================== --- firmware/export/config-ipodcolor.h (revision 15975) +++ firmware/export/config-ipodcolor.h (working copy) @@ -89,8 +89,8 @@ #define BATTERY_CAPACITY_INC 10 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ -/* Hardware controlled charging? FIXME */ -//#define CONFIG_CHARGING CHARGING_SIMPLE +/* Hardware controlled charging? */ +#define CONFIG_CHARGING CHARGING_MONITOR /* define this if the unit can be powered or charged via USB */ #define HAVE_USB_POWER Index: firmware/export/config-ipodmini.h =================================================================== --- firmware/export/config-ipodmini.h (revision 15975) +++ firmware/export/config-ipodmini.h (working copy) @@ -92,8 +92,8 @@ #define BATTERY_CAPACITY_INC 10 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ -/* Hardware controlled charging? FIXME */ -//#define CONFIG_CHARGING CHARGING_SIMPLE +/* Hardware controlled charging? */ +#define CONFIG_CHARGING CHARGING_MONITOR /* define this if the unit can be powered or charged via USB */ #define HAVE_USB_POWER Index: firmware/export/config-ipodmini2g.h =================================================================== --- firmware/export/config-ipodmini2g.h (revision 15975) +++ firmware/export/config-ipodmini2g.h (working copy) @@ -99,8 +99,8 @@ #define BATTERY_CAPACITY_INC 50 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ -/* Hardware controlled charging? FIXME */ -//#define CONFIG_CHARGING CHARGING_SIMPLE +/* Hardware controlled charging? */ +#define CONFIG_CHARGING CHARGING_MONITOR /* define this if the unit can be powered or charged via USB */ #define HAVE_USB_POWER Index: firmware/export/config-ipod4g.h =================================================================== --- firmware/export/config-ipod4g.h (revision 15975) +++ firmware/export/config-ipod4g.h (working copy) @@ -102,8 +102,8 @@ #define BATTERY_CAPACITY_INC 10 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ -/* Hardware controlled charging? FIXME */ -//#define CONFIG_CHARGING CHARGING_SIMPLE +/* Hardware controlled charging? */ +#define CONFIG_CHARGING CHARGING_MONITOR /* define this if the unit can be powered or charged via USB */ #define HAVE_USB_POWER Index: firmware/target/arm/ipod/power-ipod.c =================================================================== --- firmware/target/arm/ipod/power-ipod.c (revision 15975) +++ firmware/target/arm/ipod/power-ipod.c (working copy) @@ -42,8 +42,12 @@ bool charger_inserted(void) { -#ifdef IPOD_VIDEO +#if defined(IPOD_VIDEO) return (GPIOL_INPUT_VAL & 0x08)?false:true; +#elif defined(IPOD_4G) || defined(IPOD_COLOR) \ + || defined(IPOD_MINI) || defined(IPOD_MINI2G) + /* C2 is firewire power */ + return (GPIOC_INPUT_VAL & 0x04)?false:true; #else /* This needs filling in for other ipods. */ return false;