5,815,022 Members 38,601 Now Online
XDA Developers Android and Mobile Development Forum

[KERNEL PATCH] Force AC (fast) Charging

Tip us?
 
chad0989
Old
(Last edited by chad0989; 27th March 2012 at 06:24 PM.)
#1  
Senior Member - OP
Thanks Meter 9,453
Posts: 1,883
Join Date: Oct 2010

 
DONATE TO ME
Default [KERNEL PATCH] Force AC (fast) Charging

This is for kernel devs only. The patch itself 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 S forum who had saw my patch in the gnex forum. This allows one to force AC charging for any charger that is detected as USB (e.g. many car chargers) and pull the full current the charger can support. It also provides additional security when connecting to public charging stations because by forcing AC charging, USB/adb data transfers are disabled, protecting your data.

Fast charge can be toggled by issuing:

echo 1 > /sys/kernel/fast_charge/force_fast_charge

and off:

echo 0 > /sys/kernel/fast_charge/force_fast_charge

Some roms (AOKP) have also implemented toggles.

In addition I have created a toggle fast charge widget that may be used to toggle fast charge on and off right from your home screen:

https://play.google.com/store/apps/d...stchargewidget

For the widget (or any fast charge toggle) to work, you MUST be running a kernel that has this patch implemented.

As a good gesture to support a fellow dev, I ask that if you implement the patch into your kernel, please link to my widget as one means to toggle it. You are of course free to provide other ways to toggle it as well if you so desire.

Kernel devs, if you would like to test the widget yourself to confirm its working, and for convenience of testing, please contact me and I will provide you with a copy. You must show that you are a kernel dev though (i.e. link me to your kernel post so I can match your username).

Here you go. Good luck have fun:
http://www.incredikernel.com/wp-cont...t_charge.patch
Attached Thumbnails
Click image for larger version

Name:	off.jpg
Views:	2253
Size:	4.5 KB
ID:	965488   Click image for larger version

Name:	on.jpg
Views:	2139
Size:	9.4 KB
ID:	965489  
The Following 28 Users Say Thank You to chad0989 For This Useful Post: [ Click to Expand ]
 
simms22
Old
#2  
simms22's Avatar
Recognized Contributor
Thanks Meter 21,480
Posts: 25,857
Join Date: Jun 2009
Location: BROOKLYN!
very nice, thanks
Google+ Profile
Twitter Simms22
DerKernel For Trinity kernels and more!
 
brenix
Old
#3  
brenix's Avatar
Senior Member
Thanks Meter 111
Posts: 204
Join Date: Mar 2011
Location: San Diego
Nice job... Thanks!
Nexus 4
 
mixtapes08
Old
#4  
mixtapes08's Avatar
Senior Member
Thanks Meter 1,429
Posts: 3,398
Join Date: Sep 2011
Location: Quezon City
Nice......

Sent from my Nexus S
Nexus 4: Mahdi Rom 4.4.4 + Mahdi Kernel
 
Oodie
Old
#5  
Oodie's Avatar
Recognized Developer
Thanks Meter 1,966
Posts: 1,635
Join Date: May 2011
Location: Kuliyapitiya

 
DONATE TO ME
Many thanks . Hoping our devs implement this to their kernels.

Sent from my Nexus S

! You Can DONATE Me - If I've been any help to you !

Always Use Thanks Button If Anyone Helps You !

 
brenix
Old
#6  
brenix's Avatar
Senior Member
Thanks Meter 111
Posts: 204
Join Date: Mar 2011
Location: San Diego
Seems to be working great here.. didn't realize it could charge this much faster.

Sent from my Nexus S using XDA
Nexus 4
 
d1xt1r
Old
#7  
Member
Thanks Meter 28
Posts: 95
Join Date: Dec 2011
Location: Sofia
Great job! Thank you!
 
Oodie
Old
#8  
Oodie's Avatar
Recognized Developer
Thanks Meter 1,966
Posts: 1,635
Join Date: May 2011
Location: Kuliyapitiya

 
DONATE TO ME
Quote:
Originally Posted by brenix View Post
Seems to be working great here.. didn't realize it could charge this much faster.

Sent from my Nexus S using XDA
Nexus S ? How do you use it since there are no kernels supporting this feature yet ?

Sent from my Nexus S

! You Can DONATE Me - If I've been any help to you !

Always Use Thanks Button If Anyone Helps You !

 
debaj
Old
#9  
debaj's Avatar
Senior Member
Thanks Meter 165
Posts: 769
Join Date: Dec 2010
Location: Budapest
Quote:
Originally Posted by Oodie View Post
Nexus S ? How do you use it since there are no kernels supporting this feature yet ?
I reckon he compiled one for himself.
 
chad0989
Old
#10  
Senior Member - OP
Thanks Meter 9,453
Posts: 1,883
Join Date: Oct 2010

 
DONATE TO ME
Its been brought to my attention that the AOKP toggle interferes in some way with the widget. I'm going to contact them and see what's up. I think they may be setting the permissions of the fast charge toggle in an undesirable manner.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes