From 2db7f00255581cec8f6e44048df221566374573e Mon Sep 17 00:00:00 2001 From: Michael Sparmann Date: Thu, 10 Feb 2011 00:14:21 +0000 Subject: 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 --- firmware/target/arm/ipod/button-clickwheel.c | 3 +++ 1 file changed, 3 insertions(+) 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 } -- cgit v1.2.3