forked from len0rd/rockbox
Classic/6G: click wheel controller powersave
Mask click wheel controller clock gate when the hold switch is in the locked position Change-Id: I9de33db189afdb76cc5057e4c0e7efc587cf762b
This commit is contained in:
parent
41b46231cb
commit
a75b5b83d4
1 changed files with 13 additions and 3 deletions
|
@ -362,10 +362,17 @@ static void s5l_clickwheel_init(void)
|
||||||
WHEEL04 |= 1;
|
WHEEL04 |= 1;
|
||||||
PDAT10 &= ~2;
|
PDAT10 &= ~2;
|
||||||
#elif CONFIG_CPU==S5L8702
|
#elif CONFIG_CPU==S5L8702
|
||||||
|
/* enable and init internal (s5l8702) wheel controller */
|
||||||
|
PWRCON(1) &= ~(1 << 1);
|
||||||
|
WHEELINT = 7;
|
||||||
|
WHEEL10 = 1;
|
||||||
|
WHEEL00 = 0x380000;
|
||||||
|
WHEEL08 = 0x20000;
|
||||||
|
WHEELTX = 0x8000023A;
|
||||||
|
WHEEL04 |= 1;
|
||||||
|
|
||||||
/* enable external (CY8C21x34) wheel controller */
|
/* enable external (CY8C21x34) wheel controller */
|
||||||
GPIOCMD = 0xe040f;
|
GPIOCMD = 0xe040f;
|
||||||
|
|
||||||
/* TODO: enable and init internal (s5l8702) wheel controller */
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,7 +445,10 @@ int button_read_device(void)
|
||||||
/* disable external (CY8C21x34) wheel controller */
|
/* disable external (CY8C21x34) wheel controller */
|
||||||
GPIOCMD = 0xe040e;
|
GPIOCMD = 0xe040e;
|
||||||
|
|
||||||
/* TODO: disable internal (s5l8702) wheel controller */
|
/* disable internal (s5l8702) wheel controller */
|
||||||
|
WHEEL00 = 0;
|
||||||
|
WHEEL10 = 0;
|
||||||
|
PWRCON(1) |= (1 << 1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue