iPod Classic: Fix bidirectional clickwheel communication.
This restores functionality that was broken in g#194 and committed as
revision 7ec426e497
.
Bidirectional communication is required to ask the clickwheel controller
for the initial button state during boot. Otherwise our driver would only
know about pressed buttons when the first change event is received,
which is too late for e.g. prevention of USB connection during boot.
This fix is also required to support the selection of OF, Rockbox,
Disk Mode, etc. in the iPod Classic Rockbox bootloader.
Change-Id: I127d54cf9e630d8075dd6d66f95dacb2816bfbc8
Reviewed-on: http://gerrit.rockbox.org/938
Reviewed-by: Michael Sparmann <theseven@gmx.net>
Tested: Michael Sparmann <theseven@gmx.net>
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
This commit is contained in:
parent
7c20d8f686
commit
f5e2c25cb8
1 changed files with 1 additions and 4 deletions
|
@ -364,15 +364,13 @@ static void s5l_clickwheel_init(void)
|
|||
#elif CONFIG_CPU==S5L8702
|
||||
/* enable and init internal (s5l8702) wheel controller */
|
||||
PWRCON(1) &= ~(1 << 1);
|
||||
PCON(14) = (PCON(14) & ~0xffff0000) | 0x22220000;
|
||||
WHEELINT = 7;
|
||||
WHEEL10 = 1;
|
||||
WHEEL00 = 0x380000;
|
||||
WHEEL08 = 0x20000;
|
||||
WHEELTX = 0x8000023A;
|
||||
WHEEL04 |= 1;
|
||||
|
||||
/* enable external (CY8C21x34) wheel controller */
|
||||
GPIOCMD = 0xe040f;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -383,7 +381,6 @@ void button_init_device(void)
|
|||
INTMSK |= (1<<26);
|
||||
#elif CONFIG_CPU==S5L8702
|
||||
/* configure GPIO E2 as pull-up input */
|
||||
GPIOCMD = 0xe0200;
|
||||
PUNB(14) |= (1 << 2);
|
||||
#endif
|
||||
s5l_clickwheel_init();
|
||||
|
|
Loading…
Reference in a new issue