summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/ipod
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2011-02-10 10:10:27 +0000
committerMichael Sparmann <theseven@rockbox.org>2011-02-10 10:10:27 +0000
commitcd8e8419f7a334a8ad89e21825b99745402a387e (patch)
tree5c850357e0db4e3fd85373e95e1b5fdb43e1bbce /firmware/target/arm/ipod
parente93713ba3c33770ee74a98f714da079779adbb1b (diff)
downloadrockbox-cd8e8419f7a334a8ad89e21825b99745402a387e.tar.gz
rockbox-cd8e8419f7a334a8ad89e21825b99745402a387e.tar.bz2
rockbox-cd8e8419f7a334a8ad89e21825b99745402a387e.zip
iPod Nano 2G: Fix current leak through clickwheel GPIOs when clickwheel is powered down
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29272 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod')
-rw-r--r--firmware/target/arm/ipod/button-clickwheel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/target/arm/ipod/button-clickwheel.c b/firmware/target/arm/ipod/button-clickwheel.c
index 2cddbd5950..5d16381434 100644
--- a/firmware/target/arm/ipod/button-clickwheel.c
+++ b/firmware/target/arm/ipod/button-clickwheel.c
@@ -387,7 +387,11 @@ void button_init_device(void)
bool button_hold(void)
{
#if CONFIG_CPU==S5L8701
- return ((PDAT14 & (1 << 6)) == 0);
+ bool value = (PDAT14 & (1 << 6)) == 0;
+ if (value)
+ PCONF = (PCONF & ~0xffff0000) | 0x11110000;
+ else PCONF = (PCONF & ~0xffff0000) | 0x22220000;
+ return value;
#elif CONFIG_CPU==S5L8702
if (USEC_TIMER - holdswitch_last_read > 100000)
{