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
This commit is contained in:
Michael Sparmann 2011-02-10 00:14:21 +00:00
parent 40531597f3
commit 2db7f00255

View file

@ -394,6 +394,9 @@ bool button_hold(void)
holdswitch_last_read = USEC_TIMER; holdswitch_last_read = USEC_TIMER;
holdswitch_last_value = (pmu_read(0x87) & 2) == 0; 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; return holdswitch_last_value;
#endif #endif
} }