summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMihail Zenkov <Mihail_Zenkov@rockbox.org>2014-09-28 00:26:29 +0200
committerMichael Giacomelli <giac2000@hotmail.com>2014-09-28 21:07:58 +0200
commit23dc0b01794fe8001a76eb4371afdc9326648357 (patch)
tree9bc5aab488170e1a98bd8d0491c784b8b65a87f0
parent02414bf286e4ff6a08d19e951bff1e0905d330b4 (diff)
downloadrockbox-23dc0b01794fe8001a76eb4371afdc9326648357.tar.gz
rockbox-23dc0b01794fe8001a76eb4371afdc9326648357.tar.bz2
rockbox-23dc0b01794fe8001a76eb4371afdc9326648357.zip
Don't enable the current sink for the Clip Zip backlight until its actually needed.
Patch by Mihail Zenkov who measured a modest increase in power consumption with the current sink enabled. Change-Id: Ib1c1639318de35d449ca51a9bd480005cb6a2ee0 Reviewed-on: http://gerrit.rockbox.org/989 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com> Tested: Michael Giacomelli <giac2000@hotmail.com>
-rw-r--r--firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c b/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c
index fd44d76cac..a47941bbd7 100644
--- a/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c
+++ b/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c
@@ -29,16 +29,14 @@
bool _backlight_init()
{
- /* GPIO B1 controls backlight */
- GPIOB_DIR |= (1 << 1);
- ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x91);
- GPIOB_PIN(1) = (1 << 1);
-
return true;
}
void _backlight_on(void)
{
+ /* GPIO B1 controls backlight */
+ GPIOB_DIR |= (1 << 1);
+ ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x90);
GPIOB_PIN(1) = (1 << 1);
#ifdef HAVE_LCD_ENABLE
lcd_enable(true);
@@ -50,6 +48,7 @@ void _backlight_off(void)
#ifdef HAVE_LCD_ENABLE
lcd_enable(false);
#endif
+ ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0);
GPIOB_PIN(1) = 0;
}