Aside:
Thanks to everyone who participated in our online campaign to get the kernel source for Desire, within 6 days, we got the HTC Desire Gingerbread kernel source.
Now to business,
This is a kernel source patch/fix for a problem that had been plaguing me for a long, long time. I use an extended battery for the Desire, and the issue was that for almost any kernel (except an old Neophyte 1000 MV bravo kernel), after every reboot/reboot to recovery, the battery charge status would become disabled (showing a grey rectangle, instead of the usual green/orange/red indicator. At the same time, the led would keep flashing alternate green and orange, and it would not get charged at all when connected to host PC/mains. See the attached pic.
Notice the battery icon the top right?
The next pic shows the charge status after the Kernel code is patched. It now shows normal charge status, no warning LEDs, and charges normally.
If you have a similiar issue while using your battery, and you are using a GB Sense ROM, you can flash the attached zip file.
If you're a kernel dev and wish to add this to your Rom, you can download the patch.
I dont think too many people have this issue/use extended batteries. But for those who do, this is very annoying, since you can never reboot your phone, and have to fix the charge status by shutting down, pulling the battery, reinserting it, and booting. And of course the issue would pop up again on the very next boot!
If you're using this in your kernel, try to use the tag [EBFix]
Dev Notes:
File: bravo_2.6.35_gb-mr/drivers/power/ds2784_battery.c
Simply put, it bypasses an IF block in the kernel source which checks whether it is an officially supported battery. If it isnt, then it toggles an indicator called htc_batt_info.rep.batt_id to UNKNOWN. Additional functions then disable charging, and flash warning lights.
The attached kernel has the following characteristics:
Thanks to everyone who participated in our online campaign to get the kernel source for Desire, within 6 days, we got the HTC Desire Gingerbread kernel source.
Now to business,
This is a kernel source patch/fix for a problem that had been plaguing me for a long, long time. I use an extended battery for the Desire, and the issue was that for almost any kernel (except an old Neophyte 1000 MV bravo kernel), after every reboot/reboot to recovery, the battery charge status would become disabled (showing a grey rectangle, instead of the usual green/orange/red indicator. At the same time, the led would keep flashing alternate green and orange, and it would not get charged at all when connected to host PC/mains. See the attached pic.
Notice the battery icon the top right?
The next pic shows the charge status after the Kernel code is patched. It now shows normal charge status, no warning LEDs, and charges normally.
If you have a similiar issue while using your battery, and you are using a GB Sense ROM, you can flash the attached zip file.
If you're a kernel dev and wish to add this to your Rom, you can download the patch.
I dont think too many people have this issue/use extended batteries. But for those who do, this is very annoying, since you can never reboot your phone, and have to fix the charge status by shutting down, pulling the battery, reinserting it, and booting. And of course the issue would pop up again on the very next boot!
If you're using this in your kernel, try to use the tag [EBFix]
Dev Notes:
File: bravo_2.6.35_gb-mr/drivers/power/ds2784_battery.c
Simply put, it bypasses an IF block in the kernel source which checks whether it is an officially supported battery. If it isnt, then it toggles an indicator called htc_batt_info.rep.batt_id to UNKNOWN. Additional functions then disable charging, and flash warning lights.
Code:
--- ds2784_battery.c.bak 2011-11-05 21:32:15.000000000 +0530
+++ ds2784_battery.c 2011-11-06 01:41:37.052661823 +0530
@@ -484,10 +484,14 @@ ONLY check when battery driver init.
/*
Get Rsns, get from offset 69H . Rsnsp=1/Rsns
Judge if this is supported battery
+Extended Battery Charge Status fix by Droidzone
*/
mutex_lock(&htc_batt_info.lock);
- if (di->raw[DS2784_REG_RSNSP] != BATT_RSNSP)
- htc_batt_info.rep.batt_id = BATT_UNKNOWN;
+ if (di->raw[DS2784_REG_RSNSP] != BATT_RSNSP) {
+ pr_info("batt: Extended unsupported battery detected\n");
+ pr_info("batt: Re-enabling charge and status indicator - Droidzone\n");
+ pr_info("batt: Battery check overridden\n");
+ }
else
htc_batt_info.rep.batt_id = BATT_FIRST_SOURCE;
mutex_unlock(&htc_batt_info.lock);
- Non UV, Non OC Based on Official source
- Sibere's Battfix
- TP Wake (snq-)
- Wifi threshold fix
- Two way call record
- Linux version upstream upgrade to 2.6.35.14
Attachments
Last edited: