summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/ipod
diff options
context:
space:
mode:
authorCástor Muñoz <cmvidal@gmail.com>2012-03-20 23:53:38 +0100
committerCástor Muñoz <cmvidal@gmail.com>2012-03-31 01:18:15 +0200
commita75b5b83d4df1c9295e78d67af24c70c01837456 (patch)
treea05ae7d2f47955acab522628351c9ec6de99c7da /firmware/target/arm/ipod
parent41b46231cb8c8f17d2fccec0c713f2686a0bdc50 (diff)
downloadrockbox-a75b5b83d4df1c9295e78d67af24c70c01837456.tar.gz
rockbox-a75b5b83d4df1c9295e78d67af24c70c01837456.tar.bz2
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
Diffstat (limited to 'firmware/target/arm/ipod')
-rw-r--r--firmware/target/arm/ipod/button-clickwheel.c16
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)
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