summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/s5l8700/ipodnano2g/power-nano2g.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/s5l8700/ipodnano2g/power-nano2g.c')
-rw-r--r--firmware/target/arm/s5l8700/ipodnano2g/power-nano2g.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/power-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/power-nano2g.c
index 5164f0fa1a..a75cb39729 100644
--- a/firmware/target/arm/s5l8700/ipodnano2g/power-nano2g.c
+++ b/firmware/target/arm/s5l8700/ipodnano2g/power-nano2g.c
@@ -54,15 +54,10 @@ void power_init(void)
#if CONFIG_CHARGING
#ifdef HAVE_USB_CHARGING_ENABLE
-bool usb_charging_enable(bool on)
+void usb_charging_maxcurrent_change(int maxcurrent)
{
+ bool on = (maxcurrent >= 500);
PDAT11 = (PDAT11 & ~1) | (on ? 1 : 0);
- return on;
-}
-
-bool usb_charging_enabled(void)
-{
- return PDAT11 & 1;
}
#endif