diff -uNr rockbox.orig/apps/lang/english.lang rockbox/apps/lang/english.lang
--- rockbox.orig/apps/lang/english.lang	2006-08-08 15:32:56.000000000 -0700
+++ rockbox/apps/lang/english.lang	2006-08-09 22:50:10.000000000 -0700
@@ -9534,3 +9534,17 @@
     *: "Split Filesize"
   </voice>
 </phrase>
+<phrase>
+  id: LANG_USB_CHARGEONLY
+  desc: Enable USB charging instead of disk mode
+  user:
+  <source>
+    *: "USB Charge Only"
+  </source>
+  <dest>
+    *: "USB Charge Only"
+  </dest>
+  <voice>
+    *: "USB Charge Only"
+  </voice>
+</phrase>
diff -uNr rockbox.orig/apps/settings.c rockbox/apps/settings.c
--- rockbox.orig/apps/settings.c	2006-08-08 15:03:54.000000000 -0700
+++ rockbox/apps/settings.c	2006-08-09 22:45:23.000000000 -0700
@@ -586,6 +586,9 @@
 #endif /* CONFIG_BACKLIGHT */
 
 
+#ifdef HAVE_USB_POWER
+    {1, S_O(usb_chargeonly), false, "usb charge only", off_on},
+#endif
     
     /* If values are just added to the end, no need to bump the version. */
     /* new stuff to be added at the end */
@@ -1073,6 +1076,10 @@
 
     set_poweroff_timeout(global_settings.poweroff);
 
+#ifdef HAVE_USB_POWER
+    set_usb_charge_only(global_settings.usb_chargeonly);
+#endif
+
     set_battery_capacity(global_settings.battery_capacity);
 #if BATTERY_TYPES_COUNT > 1
     set_battery_type(global_settings.battery_type);
diff -uNr rockbox.orig/apps/settings.h rockbox/apps/settings.h
--- rockbox.orig/apps/settings.h	2006-08-08 15:03:54.000000000 -0700
+++ rockbox/apps/settings.h	2006-08-09 22:32:27.000000000 -0700
@@ -542,6 +542,10 @@
 #ifdef HAVE_LCD_BITMAP
     unsigned char kbd_file[MAX_FILENAME+1]; /* last keyboard */
 #endif
+
+#ifdef HAVE_USB_POWER
+    bool usb_chargeonly;
+#endif
 };
 
 enum optiontype { INT, BOOL };
diff -uNr rockbox.orig/apps/settings_menu.c rockbox/apps/settings_menu.c
--- rockbox.orig/apps/settings_menu.c	2006-08-08 15:03:54.000000000 -0700
+++ rockbox/apps/settings_menu.c	2006-08-09 22:48:28.000000000 -0700
@@ -82,6 +82,10 @@
 #include "backdrop.h"
 #endif
 
+#ifdef HAVE_USB_POWER
+#include "usb.h"
+#endif
+
 #ifdef CONFIG_CHARGING
 static bool car_adapter_mode(void)
 {
@@ -877,6 +881,18 @@
         &sleep_timer_set, 5, 0, 300, sleep_timer_formatter);
 }
 
+#ifdef HAVE_USB_POWER
+static bool usb_charging(void)
+{
+     bool rc = set_bool_options(str(LANG_USB_CHARGEONLY),
+                                &global_settings.usb_chargeonly,
+                                STR(LANG_ON),
+                                STR(LANG_OFF),
+                                set_usb_charge_only);
+     return rc;
+}
+#endif
+
 static bool scroll_speed(void)
 {
     return set_int(str(LANG_SCROLL), "", UNIT_INT,
@@ -2063,6 +2079,9 @@
 #endif
         { ID2P(LANG_POWEROFF_IDLE),    poweroff_idle_timer    },
         { ID2P(LANG_SLEEP_TIMER),      sleep_timer            },
+#ifdef HAVE_USB_POWER
+        { ID2P(LANG_USB_CHARGEONLY),   usb_charging           },
+#endif
 #ifdef HAVE_ALARM_MOD
         { ID2P(LANG_ALARM_MOD_ALARM_MENU), alarm_screen       },
 #endif
diff -uNr rockbox.orig/firmware/export/usb.h rockbox/firmware/export/usb.h
--- rockbox.orig/firmware/export/usb.h	2005-12-06 04:12:29.000000000 -0800
+++ rockbox/firmware/export/usb.h	2006-08-09 22:18:07.000000000 -0700
@@ -30,6 +30,8 @@
 bool usb_inserted(void); /* return the official value, what's been reported to the threads */
 bool usb_detect(void); /* return the raw hardware value */
 #ifdef HAVE_USB_POWER
+void set_usb_charge_only(bool chargeonly);
+bool usb_want_powered(void);
 bool usb_powered(void);
 #endif
 
diff -uNr rockbox.orig/firmware/usb.c rockbox/firmware/usb.c
--- rockbox.orig/firmware/usb.c	2006-04-08 02:08:33.000000000 -0700
+++ rockbox/firmware/usb.c	2006-08-09 22:46:03.000000000 -0700
@@ -65,6 +65,8 @@
 #ifdef HAVE_USB_POWER
 #define USB_POWERED     4
 
+bool usb_only_charges = true;
+
 #if CONFIG_KEYPAD == RECORDER_PAD
 #define USBPOWER_BUTTON BUTTON_F1
 #define USBPOWER_BTN_IGNORE BUTTON_ON
@@ -275,7 +277,7 @@
                 else
 #endif
 #ifdef HAVE_USB_POWER
-                if((button_status() & ~USBPOWER_BTN_IGNORE) == USBPOWER_BUTTON)
+		if(usb_want_powered())
                 {
                     usb_state = USB_POWERED;
                 }
@@ -613,6 +615,18 @@
 }
 
 #ifdef HAVE_USB_POWER
+void set_usb_charge_only(bool chargeonly)
+{
+    usb_only_charges = chargeonly;
+}
+bool usb_want_powered(void)
+{
+    bool have_button = (button_status() & ~USBPOWER_BTN_IGNORE) == USBPOWER_BUTTON;
+    if (have_button)
+	return !usb_only_charges;
+    else
+	return usb_only_charges;
+}
 bool usb_powered(void)
 {
     return usb_state == USB_POWERED;
Binary files rockbox.orig/tools/bmp2rb and rockbox/tools/bmp2rb differ
Binary files rockbox.orig/tools/codepages and rockbox/tools/codepages differ
Binary files rockbox.orig/tools/convbdf and rockbox/tools/convbdf differ
Binary files rockbox.orig/tools/ipod_fw and rockbox/tools/ipod_fw differ
Binary files rockbox.orig/tools/iriver.o and rockbox/tools/iriver.o differ
Binary files rockbox.orig/tools/rdf2binary and rockbox/tools/rdf2binary differ
Binary files rockbox.orig/tools/scramble and rockbox/tools/scramble differ
Binary files rockbox.orig/tools/scramble.o and rockbox/tools/scramble.o differ
