summaryrefslogtreecommitdiff
path: root/firmware/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usb.c')
-rw-r--r--firmware/usb.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index 00e0bb3607..9d4bb00180 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -42,9 +42,6 @@
42#ifdef HAVE_USBSTACK 42#ifdef HAVE_USBSTACK
43#include "usb_core.h" 43#include "usb_core.h"
44#endif 44#endif
45#ifdef IRIVER_H300_SERIES
46#include "pcf50606.h" /* for pcf50606_usb_charging_... */
47#endif
48#include "logf.h" 45#include "logf.h"
49 46
50/* Conditions under which we want the entire driver */ 47/* Conditions under which we want the entire driver */
@@ -588,40 +585,6 @@ bool usb_powered(void)
588{ 585{
589 return usb_state == USB_POWERED; 586 return usb_state == USB_POWERED;
590} 587}
591
592#if CONFIG_CHARGING
593bool usb_charging_enable(bool on)
594{
595 bool rc = false;
596#ifdef IRIVER_H300_SERIES
597 int irqlevel;
598 logf("usb_charging_enable(%s)\n", on ? "on" : "off" );
599 irqlevel = disable_irq_save();
600 pcf50606_set_usb_charging(on);
601 rc = on;
602 restore_irq(irqlevel);
603#else
604 /* TODO: implement it for other targets... */
605 (void)on;
606#endif
607 return rc;
608}
609
610bool usb_charging_enabled(void)
611{
612 bool rc = false;
613#ifdef IRIVER_H300_SERIES
614 /* TODO: read the state of the GPOOD2 register...
615 * (this also means to set the irq level here) */
616 rc = pcf50606_usb_charging_enabled();
617#else
618 /* TODO: implement it for other targets... */
619#endif
620
621 logf("usb charging %s", rc ? "enabled" : "disabled" );
622 return rc;
623}
624#endif
625#endif 588#endif
626 589
627#else 590#else