Index: firmware/target/arm/s5l8700/ipodnano2g/power-nano2g.c
===================================================================
--- firmware/target/arm/s5l8700/ipodnano2g/power-nano2g.c (revision 28604)
+++ firmware/target/arm/s5l8700/ipodnano2g/power-nano2g.c (working copy)
@@ -45,7 +45,7 @@

void power_init(void)
{
- pmu_write(0x1e, 0xf); /* Vcore = 1.000V */
+ pmu_write(0x1e, 0xe); /* Vcore = 0.975V */
pmu_ldo_set_voltage(2, 0x11); /* LCD = 2.600V */
}

Index: firmware/target/arm/s5l8700/ipodnano2g/button-target.h
===================================================================
--- firmware/target/arm/s5l8700/ipodnano2g/button-target.h (revision 28604)
+++ firmware/target/arm/s5l8700/ipodnano2g/button-target.h (working copy)
@@ -43,8 +43,9 @@
#define BUTTON_RIGHT 0x00000008
#define BUTTON_SCROLL_FWD 0x00000010
#define BUTTON_SCROLL_BACK 0x00000020
+#define BUTTON_SCROLL 0x00000040

-#define BUTTON_PLAY 0x00000040
+#define BUTTON_PLAY 0x00000080

#define BUTTON_MAIN (BUTTON_SELECT|BUTTON_MENU\
|BUTTON_LEFT|BUTTON_RIGHT|BUTTON_SCROLL_FWD\
Index: firmware/target/arm/ipod/button-target.h
===================================================================
--- firmware/target/arm/ipod/button-target.h (revision 28604)
+++ firmware/target/arm/ipod/button-target.h (working copy)
@@ -43,12 +43,13 @@
#define BUTTON_RIGHT 0x00000008
#define BUTTON_SCROLL_FWD 0x00000010
#define BUTTON_SCROLL_BACK 0x00000020
+#define BUTTON_SCROLL 0x00000040

-#define BUTTON_PLAY 0x00000040
+#define BUTTON_PLAY 0x00000080

#define BUTTON_MAIN (BUTTON_SELECT|BUTTON_MENU\
|BUTTON_LEFT|BUTTON_RIGHT|BUTTON_SCROLL_FWD\
- |BUTTON_SCROLL_BACK|BUTTON_PLAY)
+ |BUTTON_SCROLL_BACK|BUTTON_SCROLL|BUTTON_PLAY)

/* Remote control's buttons */
#ifdef IPOD_ACCESSORY_PROTOCOL
Index: firmware/target/arm/ipod/button-clickwheel.c
===================================================================
--- firmware/target/arm/ipod/button-clickwheel.c (revision 28604)
+++ firmware/target/arm/ipod/button-clickwheel.c (working copy)
@@ -39,6 +39,7 @@
#include "serial.h"
#include "power.h"
#include "powermgmt.h"
+#include "button-target.h"
#if defined(IPOD_NANO2G)
#include "pmu-target.h"
#endif
@@ -249,6 +250,9 @@
}
last_wheel_usec = usec;
old_wheel_value = new_wheel_value;
+
+ /* be able to read wheel action via button_read_device() */
+ btn |= BUTTON_SCROLL;
}
}
else
Index: firmware/drivers/button.c
===================================================================
--- firmware/drivers/button.c (revision 28604)
+++ firmware/drivers/button.c (working copy)
@@ -109,6 +109,24 @@
}
#endif

+#ifdef HAVE_ADJUSTABLE_CPU_FREQ
+static void gui_boost(bool state)
+{
+ static bool boosted = false;
+
+ if (state && !boosted)
+ {
+ cpu_boost(true);
+ boosted = true;
+ }
+ else if (!state && boosted)
+ {
+ cpu_boost(false);
+ boosted = false;
+ }
+}
+#endif /* HAVE_ADJUSTABLE_CPU_FREQ */
+
static bool button_try_post(int button, int data)
{
#ifdef HAVE_TOUCHSCREEN
@@ -151,6 +169,9 @@
static bool skip_remote_release = false;
#endif
#endif
+#ifdef HAVE_ADJUSTABLE_CPU_FREQ
+ static long last_button_tick;
+#endif
int diff;
int btn;
#ifdef HAVE_BUTTON_DATA
@@ -181,6 +202,19 @@
}
#endif

+#ifdef HAVE_ADJUSTABLE_CPU_FREQ
+ /* Boost gui on button activity, unboost gui after timeout (1 sec). */
+ if (BUTTON_NONE != btn)
+ {
+ last_button_tick = current_tick;
+ gui_boost(true);
+ }
+ else if (TIME_AFTER(current_tick, last_button_tick + HZ))
+ {
+ gui_boost(false);
+ }
+#endif
+
/* Find out if a key has been released */
diff = btn ^ lastbtn;
if(diff && (btn & diff) == 0)