diff options
author | Cástor Muñoz <cmvidal@gmail.com> | 2012-03-20 23:53:38 +0100 |
---|---|---|
committer | Cástor Muñoz <cmvidal@gmail.com> | 2012-03-31 01:18:15 +0200 |
commit | a75b5b83d4df1c9295e78d67af24c70c01837456 (patch) | |
tree | a05ae7d2f47955acab522628351c9ec6de99c7da | |
parent | 41b46231cb8c8f17d2fccec0c713f2686a0bdc50 (diff) | |
download | rockbox-a75b5b83d4df1c9295e78d67af24c70c01837456.tar.gz rockbox-a75b5b83d4df1c9295e78d67af24c70c01837456.zip |
Classic/6G: click wheel controller powersave
Mask click wheel controller clock gate when the hold switch is in
the locked position
Change-Id: I9de33db189afdb76cc5057e4c0e7efc587cf762b
-rw-r--r-- | firmware/target/arm/ipod/button-clickwheel.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/firmware/target/arm/ipod/button-clickwheel.c b/firmware/target/arm/ipod/button-clickwheel.c index 162ff9f246..13c765c6db 100644 --- a/firmware/target/arm/ipod/button-clickwheel.c +++ b/firmware/target/arm/ipod/button-clickwheel.c | |||
@@ -362,10 +362,17 @@ static void s5l_clickwheel_init(void) | |||
362 | WHEEL04 |= 1; | 362 | WHEEL04 |= 1; |
363 | PDAT10 &= ~2; | 363 | PDAT10 &= ~2; |
364 | #elif CONFIG_CPU==S5L8702 | 364 | #elif CONFIG_CPU==S5L8702 |
365 | /* enable and init internal (s5l8702) wheel controller */ | ||
366 | PWRCON(1) &= ~(1 << 1); | ||
367 | WHEELINT = 7; | ||
368 | WHEEL10 = 1; | ||
369 | WHEEL00 = 0x380000; | ||
370 | WHEEL08 = 0x20000; | ||
371 | WHEELTX = 0x8000023A; | ||
372 | WHEEL04 |= 1; | ||
373 | |||
365 | /* enable external (CY8C21x34) wheel controller */ | 374 | /* enable external (CY8C21x34) wheel controller */ |
366 | GPIOCMD = 0xe040f; | 375 | GPIOCMD = 0xe040f; |
367 | |||
368 | /* TODO: enable and init internal (s5l8702) wheel controller */ | ||
369 | #endif | 376 | #endif |
370 | } | 377 | } |
371 | 378 | ||
@@ -438,7 +445,10 @@ int button_read_device(void) | |||
438 | /* disable external (CY8C21x34) wheel controller */ | 445 | /* disable external (CY8C21x34) wheel controller */ |
439 | GPIOCMD = 0xe040e; | 446 | GPIOCMD = 0xe040e; |
440 | 447 | ||
441 | /* TODO: disable internal (s5l8702) wheel controller */ | 448 | /* disable internal (s5l8702) wheel controller */ |
449 | WHEEL00 = 0; | ||
450 | WHEEL10 = 0; | ||
451 | PWRCON(1) |= (1 << 1); | ||
442 | #endif | 452 | #endif |
443 | } | 453 | } |
444 | else | 454 | else |