Post Reply

[KERNEL PATCH] Force AC (fast) Charging

26th March 2012, 03:54 AM   |  #1  
OP Senior Member
Thanks Meter: 9,453
 
1,883 posts
Join Date:Joined: Oct 2010
Donate to Me
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:	2256
Size:	4.5 KB
ID:	965488   Click image for larger version

Name:	on.jpg
Views:	2142
Size:	9.4 KB
ID:	965489  
Last edited by chad0989; 27th March 2012 at 06:24 PM.
The Following 28 Users Say Thank You to chad0989 For This Useful Post: [ View ]
26th March 2012, 03:57 AM   |  #2  
simms22's Avatar
Recognized Contributor
BROOKLYN!
Thanks Meter: 21,594
 
25,989 posts
Join Date:Joined: Jun 2009
very nice, thanks
26th March 2012, 04:25 AM   |  #3  
brenix's Avatar
Senior Member
Flag San Diego
Thanks Meter: 111
 
204 posts
Join Date:Joined: Mar 2011
More
Nice job... Thanks!
26th March 2012, 04:27 AM   |  #4  
mixtapes08's Avatar
Senior Member
Flag Quezon City
Thanks Meter: 1,430
 
3,400 posts
Join Date:Joined: Sep 2011
More
Nice......

Sent from my Nexus S
26th March 2012, 05:27 AM   |  #5  
Oodie's Avatar
Recognized Developer
Flag Kuliyapitiya
Thanks Meter: 1,966
 
1,635 posts
Join Date:Joined: May 2011
Donate to Me
More
Many thanks . Hoping our devs implement this to their kernels.

Sent from my Nexus S
26th March 2012, 06:21 AM   |  #6  
brenix's Avatar
Senior Member
Flag San Diego
Thanks Meter: 111
 
204 posts
Join Date:Joined: Mar 2011
More
Seems to be working great here.. didn't realize it could charge this much faster.

Sent from my Nexus S using XDA
26th March 2012, 06:52 AM   |  #7  
Member
Flag Sofia
Thanks Meter: 28
 
95 posts
Join Date:Joined: Dec 2011
Great job! Thank you!
26th March 2012, 10:02 AM   |  #8  
Oodie's Avatar
Recognized Developer
Flag Kuliyapitiya
Thanks Meter: 1,966
 
1,635 posts
Join Date:Joined: May 2011
Donate to Me
More
Quote:
Originally Posted by brenix

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
26th March 2012, 12:06 PM   |  #9  
debaj's Avatar
Senior Member
Flag Budapest
Thanks Meter: 165
 
769 posts
Join Date:Joined: Dec 2010
More
Quote:
Originally Posted by Oodie

Nexus S ? How do you use it since there are no kernels supporting this feature yet ?

I reckon he compiled one for himself.
26th March 2012, 12:55 PM   |  #10  
OP Senior Member
Thanks Meter: 9,453
 
1,883 posts
Join Date:Joined: 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.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes


Top Threads in Nexus S Android Development by ThreadRank