5,605,311 Members 38,492 Now Online
XDA Developers Android and Mobile Development Forum

[KERNEL PATCH - Devs only] Force AC (fast) charging

Tip us?
 
chad0989
Old
(Last edited by chad0989; 14th March 2012 at 10:49 PM.)
#1  
Senior Member - OP
Thanks Meter 9448
Posts: 1,883
Join Date: Oct 2010

 
DONATE TO ME
Default [KERNEL PATCH - Devs only] Force AC (fast) charging

This is for kernel devs only. The patch is useless to those who do not/can not compile their own kernel.

I put together this patch for you guys at the request of a few different members here in the nexus forum. This allows one to force AC charging for any charger that is detected as USB (i.e. car chargers, inductive chargers through the pogo pins). This also works for MHL, HOWEVER you will most likely still be limited by the MHL adapter itself. With modification to the MHL adapter (splice in an additional charger) plus this mod, bunklung was able to charge at ~600-700 mA while mirroring and streaming.

To toggle the fast charge you must download IncrediControl v1.5 beta3 (http://www.incredikernel.com under Latest Downloads). Under the general tab, click on force fast charge, then apply. After you have done that, place your phone on the charger. You will see it is now detected as AC and if and only if the charger can put out more current than it was previously being limited to (more than 500mA) you will be able to use the additional current.

Good luck have fun.

http://www.incredikernel.com/wp-cont...t_charge.patch

NOTE: You may get a freeze/FC in IncrediControl once in while when toggling the charge. This is being worked on. I figured everyone could deal with a FC here or there to get this out earlier.

Fast charge toggle widget. No more need to open the app to toggle!

https://play.google.com/store/apps/d...stchargewidget
Attached Thumbnails
Click image for larger version

Name:	2012-03-14_17-19-25.jpg
Views:	981
Size:	46.7 KB
ID:	947443   Click image for larger version

Name:	2012-03-14_17-19-29.jpg
Views:	909
Size:	55.9 KB
ID:	947444  
The Following 22 Users Say Thank You to chad0989 For This Useful Post: [ Click to Expand ]
 
nosit1
Old
#2  
Senior Member
Thanks Meter 108
Posts: 876
Join Date: May 2010
Location: Arizona
Great work. Now I just need to figure out how to patch the kernel! Haha. Hopefully someone will rebuild one with it in so I can test with my MHL adaptor.

Sent from my Galaxy Nexus using Tapatalk
Current Device: Verizon Samsung Galaxy Note II (Rooted!) + Amazong Kindle Fire (CM10)
Devices currently crying in a corner: Samsung Galaxy Nexus - Motorola Droid Bionic - HP Touchpad - Nook Color
 
Natolx
Old
#3  
Senior Member
Thanks Meter 19
Posts: 179
Join Date: Sep 2010
Thanks for this!
 
refthemc
Old
#4  
refthemc's Avatar
Senior Member
Thanks Meter 50
Posts: 889
Join Date: Jun 2008
Location: Southern California
Thanks Chad!
 
TRusselo
Old
(Last edited by TRusselo; 5th March 2012 at 06:21 PM.)
#5  
TRusselo's Avatar
Retired Forum Moderator / Recognized Developer
Thanks Meter 2720
Posts: 4,670
Join Date: Jan 2011
Location: Edmonton

 
DONATE TO ME
thats nice, i offered a similar kernel mod to the devs of a captivate kernel they tried telling me making the phone charge on usb the same speed as AC could dammage the battery, phone or pc. oh and they basically called me an idiot for suggesting it.

here is the captivate/i9000 kernel tweak for rapid AC charging

more info in original thread, bottom of 1st page to 2nd page. http://forum.xda-developers.com/show....php?t=1384253


Quote:
Originally Posted by Lukiqq View Post
Voltage regulator and the charging current part: max8998-private.h, a file that contains charging values in mA:


Code:
#define MAX8998_ICHG_90        0
#define MAX8998_ICHG_380    1
#define MAX8998_ICHG_475    2
#define MAX8998_ICHG_550    3
#define MAX8998_ICHG_570    4
#define MAX8998_ICHG_600    5
#define MAX8998_ICHG_700    6
#define MAX8998_ICHG_800    7
Battery driver part: s5pc110_battery.c and defined AC and USB charging rates (modified by me to 800mA when on AC and 550mA on USB):


Code:
                      if (chg->cable_status == CABLE_TYPE_AC)
                max8998_write_reg(i2c, MAX8998_REG_CHGR1,
                    (MAX8998_TOPOFF_10    << MAX8998_SHIFT_TOPOFF) |
                    (MAX8998_RSTR_DISABLE    << MAX8998_SHIFT_RSTR) |
                    (MAX8998_ICHG_800    << MAX8998_SHIFT_ICHG));
            else if (chg->cable_status == CABLE_TYPE_USB)
                max8998_write_reg(i2c, MAX8998_REG_CHGR1,
                    (MAX8998_TOPOFF_25    << MAX8998_SHIFT_TOPOFF) |
                    (MAX8998_RSTR_DISABLE    << MAX8998_SHIFT_RSTR) |
                    (MAX8998_ICHG_550    << MAX8998_SHIFT_ICHG));
One more thing in i9000 kernel sources: drivers/usb/gadget/android.c


Code:
#ifdef CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE
/* soonyong.cho : This value of max power is referred from S1 */
    .bMaxPower    = 0x30, /* 96ma */
#else /* original */
    .bMaxPower    = 0xFA, /* 500ma */
#endif /* CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE
from where I removed the condition to make it look like that:
Code:
.bMaxPower    = 0xFA, /* 500ma */
BEFORE:



AFTER:
 
gamefreakgcb
Old
(Last edited by gamefreakgcb; 5th March 2012 at 08:49 PM.)
#6  
Senior Member
Thanks Meter 34
Posts: 351
Join Date: Jan 2007
Will this work for GSM version also?


Quote:
Originally Posted by TRusselo View Post
thats nice, i offered a similar kernel mod to the devs of a captivate kernel they tried telling me making the phone charge on usb the same speed as AC could dammage the battery, phone or pc. oh and they basically called me an idiot for suggesting it.

....
What do you use to monitor the mA on the PC side?
 
Notn4
Old
#7  
Notn4's Avatar
Member
Thanks Meter 1
Posts: 88
Join Date: Jul 2010
Location: Pietarsaari
is it supposed to show somewhere that i'm on ac? I have this patch enabled but when going into battery settings it shows "charging (USB)"

also TRusselo, where in windows can I find how much mA a USB device is drawing from the port?
 
Natolx
Old
#8  
Senior Member
Thanks Meter 19
Posts: 179
Join Date: Sep 2010
Quote:
Originally Posted by Notn4 View Post
is it supposed to show somewhere that i'm on ac? I have this patch enabled but when going into battery settings it shows "charging (USB)"

also TRusselo, where in windows can I find how much mA a USB device is drawing from the port?
It needs to be activated. Ask the guy who makes the kernel you use

Sent from my Galaxy Nexus using Tapatalk
 
chad0989
Old
#9  
Senior Member - OP
Thanks Meter 9448
Posts: 1,883
Join Date: Oct 2010

 
DONATE TO ME
Quote:
Originally Posted by Notn4 View Post
is it supposed to show somewhere that i'm on ac? I have this patch enabled but when going into battery settings it shows "charging (USB)"

also TRusselo, where in windows can I find how much mA a USB device is drawing from the port?

To toggle the fast charge you must download IncrediControl v1.5 beta3 (http://www.incredikernel.com under Latest Downloads). Under the general tab, click on force fast charge, then apply. After you have done that, place your phone on the charger. You will see it is now detected as AC and if and only if the charger can put out more current than it was previously being limited to (more than 500mA) you will be able to use the additional current.
 
mbush78
Old
#10  
mbush78's Avatar
Senior Member
Thanks Meter 43
Posts: 195
Join Date: Dec 2009
Location: Northville, MI

 
DONATE TO ME
Thumbs up Where is it :)

OK.... I give, what properties windows is that?


Quote:
Originally Posted by TRusselo View Post
here is the captivate/i9000 kernel tweak for rapid AC charging


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes