summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/ipod
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2011-02-10 00:14:21 +0000
committerMichael Sparmann <theseven@rockbox.org>2011-02-10 00:14:21 +0000
commit2db7f00255581cec8f6e44048df221566374573e (patch)
tree3ab98d09b02758b88f26935a9a17dc11018674c1 /firmware/target/arm/ipod
parent40531597f3a766c120e00638e371c367ffbbee7d (diff)
downloadrockbox-2db7f00255581cec8f6e44048df221566374573e.tar.gz
rockbox-2db7f00255581cec8f6e44048df221566374573e.tar.bz2
rockbox-2db7f00255581cec8f6e44048df221566374573e.zip
iPod Classic: Fix current leak through clickwheel GPIOs when clickwheel is powered down
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29267 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod')
-rw-r--r--firmware/target/arm/ipod/button-clickwheel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/target/arm/ipod/button-clickwheel.c b/firmware/target/arm/ipod/button-clickwheel.c
index a43a059692..2cddbd5950 100644
--- a/firmware/target/arm/ipod/button-clickwheel.c
+++ b/firmware/target/arm/ipod/button-clickwheel.c
@@ -394,6 +394,9 @@ bool button_hold(void)
holdswitch_last_read = USEC_TIMER;
holdswitch_last_value = (pmu_read(0x87) & 2) == 0;
}
+ if (holdswitch_last_value)
+ PCON(14) = (PCON(14) & ~0xffffff00) | 0x11111100;
+ else PCON(14) = (PCON(14) & ~0xffffff00) | 0x22222200;
return holdswitch_last_value;
#endif
}