diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-12-24 19:36:37 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-12-24 19:36:37 +0000 |
commit | 377b42b63bf49e72f49969ad96eeeef8cc3c4ce2 (patch) | |
tree | 3167e772e655c71c4dc58a2ceaa8a190d65ff287 /firmware/target/arm/iriver/h10 | |
parent | 9b8f56f35cfd67a1438ef7a6676319405b226d5d (diff) |
H10 can distinguish USB and MAIN charger input so return proper flags. H100s were misconfigured and should use CHARGING_SIMPLE. Comment more on what charging types mean in config.h.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19582 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/iriver/h10')
-rw-r--r-- | firmware/target/arm/iriver/h10/power-h10.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/firmware/target/arm/iriver/h10/power-h10.c b/firmware/target/arm/iriver/h10/power-h10.c index 1a1f6afbfb..2535c5839f 100644 --- a/firmware/target/arm/iriver/h10/power-h10.c +++ b/firmware/target/arm/iriver/h10/power-h10.c @@ -50,9 +50,15 @@ void power_init(void) unsigned int power_input_status(void) { - /* No separate source for USB and charges from USB on its own */ - return (GPIOF_INPUT_VAL & 0x08) ? - POWER_INPUT_MAIN_CHARGER : POWER_INPUT_NONE; + unsigned int status = POWER_INPUT_NONE; + + if (GPIOF_INPUT_VAL & 0x08) + status = POWER_INPUT_MAIN_CHARGER; + + if (GPIOL_INPUT_VAL & 0x04) + status |= POWER_INPUT_USB_CHARGER; + + return status; } void ide_power_enable(bool on) |