summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/ipod/button-clickwheel.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-09-25 21:41:10 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-09-25 21:41:10 +0000
commit274c84fae9e6c4f4ee7cd957f290454dbbdf53b8 (patch)
treea74fd3ee5df3dbf87a5ece65b8953f01c717d484 /firmware/target/arm/ipod/button-clickwheel.c
parent3c11c56dc479b51ff659a4275541fca32875985d (diff)
downloadrockbox-274c84fae9e6c4f4ee7cd957f290454dbbdf53b8.tar.gz
rockbox-274c84fae9e6c4f4ee7cd957f290454dbbdf53b8.tar.bz2
rockbox-274c84fae9e6c4f4ee7cd957f290454dbbdf53b8.zip
Disable clickwheel power supply when hold button is active for iPod nano 2G.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28161 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod/button-clickwheel.c')
-rw-r--r--firmware/target/arm/ipod/button-clickwheel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/target/arm/ipod/button-clickwheel.c b/firmware/target/arm/ipod/button-clickwheel.c
index 4c0bdbc813..512e133402 100644
--- a/firmware/target/arm/ipod/button-clickwheel.c
+++ b/firmware/target/arm/ipod/button-clickwheel.c
@@ -39,6 +39,9 @@
#include "serial.h"
#include "power.h"
#include "powermgmt.h"
+#if defined(IPOD_NANO2G)
+#include "pmu-target.h"
+#endif
#define WHEEL_FAST_OFF_TIMEOUT 250000 /* timeout for acceleration = 250ms */
#define WHEEL_REPEAT_TIMEOUT 250000 /* timeout for button repeat = 250ms */
@@ -368,6 +371,7 @@ int button_read_device(void)
/* lock -> disable wheel sensor */
DEV_EN &= ~DEV_OPTO;
#elif CONFIG_CPU==S5L8701
+ pmu_ldo_power_off(1); /* disable clickwheel power supply */
CLICKWHEEL00 = 0;
CLICKWHEEL10 = 0;
#endif
@@ -379,6 +383,7 @@ int button_read_device(void)
DEV_EN |= DEV_OPTO;
opto_i2c_init();
#elif CONFIG_CPU==S5L8701
+ pmu_ldo_power_on(1); /* enable clickwheel power supply */
CLICKWHEEL00 = 0x280000;
CLICKWHEEL10 = 3;
#endif