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:
Cástor Muñoz 2012-03-20 23:53:38 +01:00
parent 41b46231cb
commit a75b5b83d4

View file

@ -362,10 +362,17 @@ static void s5l_clickwheel_init(void)
WHEEL04 |= 1;
PDAT10 &= ~2;
#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 */
GPIOCMD = 0xe040f;
/* TODO: enable and init internal (s5l8702) wheel controller */
#endif
}
@ -438,7 +445,10 @@ int button_read_device(void)
/* disable external (CY8C21x34) wheel controller */
GPIOCMD = 0xe040e;
/* TODO: disable internal (s5l8702) wheel controller */
/* disable internal (s5l8702) wheel controller */
WHEEL00 = 0;
WHEEL10 = 0;
PWRCON(1) |= (1 << 1);
#endif
}
else