forked from len0rd/rockbox
powermgmt: Remove CURRENT_USB
CURRENT_USB overrides CURRENT_NORMAL when USB is plugged. It defaults to 2 mA and wasn't defined on any target, but this doesn't make sense to me. After all, the current drawn by the CPU or other components won't change just because USB was plugged in. As far as I can tell, the only side effect of removing this is reducing the estimated USB charging current. This might mean CURRENT_MAX_CHG should be increased by CURRENT_NORMAL on some (all?) targets to compensate, but I'm not sure which targets would be affected. Change-Id: I5aa5c3893ae1e4ce6b8803ab4e8c897d534eb08f
This commit is contained in:
parent
d05f6aac2d
commit
a6eaffe40d
2 changed files with 0 additions and 19 deletions
|
@ -84,13 +84,6 @@ enum shutdown_type
|
||||||
/* Start up power management thread */
|
/* Start up power management thread */
|
||||||
void powermgmt_init(void) INIT_ATTR;
|
void powermgmt_init(void) INIT_ATTR;
|
||||||
|
|
||||||
/* Generic current values that are intentionally meaningless - config header
|
|
||||||
* should define proper numbers.*/
|
|
||||||
|
|
||||||
#ifndef CURRENT_USB
|
|
||||||
#define CURRENT_USB 2 /* usual current in mA in USB mode */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_CHARGING && !defined(CURRENT_MAX_CHG)
|
#if CONFIG_CHARGING && !defined(CURRENT_MAX_CHG)
|
||||||
#define CURRENT_MAX_CHG 350 /* maximum charging current */
|
#define CURRENT_MAX_CHG 350 /* maximum charging current */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -190,18 +190,6 @@ int battery_current(void)
|
||||||
int current = CURRENT_NORMAL;
|
int current = CURRENT_NORMAL;
|
||||||
|
|
||||||
#ifndef BOOTLOADER
|
#ifndef BOOTLOADER
|
||||||
if (usb_inserted()
|
|
||||||
#ifdef HAVE_USB_POWER
|
|
||||||
#if (CURRENT_USB < CURRENT_NORMAL)
|
|
||||||
|| usb_powered_only()
|
|
||||||
#else
|
|
||||||
&& !usb_powered_only()
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
current = CURRENT_USB;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(HAVE_BACKLIGHT) && defined(CURRENT_BACKLIGHT)
|
#if defined(HAVE_BACKLIGHT) && defined(CURRENT_BACKLIGHT)
|
||||||
if (backlight_get_current_timeout() == 0) /* LED always on */
|
if (backlight_get_current_timeout() == 0) /* LED always on */
|
||||||
current += CURRENT_BACKLIGHT;
|
current += CURRENT_BACKLIGHT;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue