summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-06-30 20:57:37 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2014-06-30 20:57:37 +0200
commit6e575b6c7011827c042cba7b27537c1ceec9ef24 (patch)
treefcde3d75a8b71afc4800011c79097321a38013b3 /firmware
parentae9b78ee2e89e425aadf4aac6a52119ef938a784 (diff)
sonynwz: fix backlight
Apparently the backlight driver is leaking current even when the PWM set to 0. This patch should greatly improve the battery life of the device. Change-Id: I76bbc8a87cae452e599b37de17e91f373cee58bc
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/imx233/sony-nwz/backlight-nwz.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/sony-nwz/backlight-nwz.c b/firmware/target/arm/imx233/sony-nwz/backlight-nwz.c
index ad3ef484db..d99d21386b 100644
--- a/firmware/target/arm/imx233/sony-nwz/backlight-nwz.c
+++ b/firmware/target/arm/imx233/sony-nwz/backlight-nwz.c
@@ -29,8 +29,10 @@
void _backlight_set_brightness(int brightness)
{
+ bool en = brightness > 0;
imx233_pwm_setup_simple(2, 24000, 100 - brightness);
- imx233_pwm_enable(2, true);
+ imx233_pwm_enable(2, en);
+ imx233_pinctrl_set_gpio(0, 10, en);
}
bool _backlight_init(void)