FORUMS

HTC Delivering Ads Straight to Sense Home

HTC’s 2015 has been a year marked by a desperate search for revenue.The HTC One M9 … more

Galaxy S6 & Edge get €100 Price Cut—New Models Incoming

Samsung has dropped the price of both the Galaxy S6 and S6 Edge by … more

How To Port Fully Featured Sony Xperia Z4 Camera

Xperia Z4’s hardware may not impress, but its software is definitely … more

Experimental TWRP Available For Moto G 2015

XDA Senior Member squid2 has posted experimental builds of TWRP for the Moto G … more

[KERNEL PATCH] Force AC (fast) Charging

1,883 posts
Thanks Meter: 9,456
 
By chad0989, Senior Member on 26th March 2012, 03:54 AM
Post Reply Subscribe to Thread Email Thread
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:	2322
Size:	4.5 KB
ID:	965488   Click image for larger version

Name:	on.jpg
Views:	2210
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: 25,043
 
More
very nice, thanks
26th March 2012, 04:25 AM |#3  
brenix's Avatar
Senior Member
Flag San Diego
Thanks Meter: 111
 
More
Nice job... Thanks!
26th March 2012, 04:27 AM |#4  
mixtapes08's Avatar
Senior Member
Flag Quezon City
Thanks Meter: 1,742
 
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
 
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
 
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
 
More
Great job! Thank you!
26th March 2012, 10:02 AM |#8  
Oodie's Avatar
Recognized Developer
Flag Kuliyapitiya
Thanks Meter: 1,966
 
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: 168
 
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,456
 
Donate to Me
More
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.
26th March 2012, 01:54 PM |#11  
Oodie's Avatar
Recognized Developer
Flag Kuliyapitiya
Thanks Meter: 1,966
 
Donate to Me
More
Quote:
Originally Posted by chad0989

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.

Or you could just make an app for it till you resolve the issue.

Sent from my Nexus S

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes