diff options
author | Michael Sparmann <theseven@rockbox.org> | 2011-02-10 10:10:27 +0000 |
---|---|---|
committer | Michael Sparmann <theseven@rockbox.org> | 2011-02-10 10:10:27 +0000 |
commit | cd8e8419f7a334a8ad89e21825b99745402a387e (patch) | |
tree | 5c850357e0db4e3fd85373e95e1b5fdb43e1bbce /firmware/target | |
parent | e93713ba3c33770ee74a98f714da079779adbb1b (diff) | |
download | rockbox-cd8e8419f7a334a8ad89e21825b99745402a387e.tar.gz 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')
-rw-r--r-- | firmware/target/arm/ipod/button-clickwheel.c | 6 |
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) { |