[KERNEL] [PATCH] 'Extended Battery' Charge/Charging indicator fix [EBFix]

Search This thread

Droidzone

Inactive Recognized Developer
Sep 24, 2010
5,531
2,283
Kochi
www.droidzone.in
OnePlus 9 Pro
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. :D

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.

before.jpeg


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.

after.jpeg


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);
The attached kernel has the following characteristics:

  • 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

  • ds2784_battery_c_patch.txt
    733 bytes · Views: 391
  • Kernel_ExtendedBattery_fix.zip
    2.1 MB · Views: 939
Last edited:

Droidzone

Inactive Recognized Developer
Sep 24, 2010
5,531
2,283
Kochi
www.droidzone.in
OnePlus 9 Pro
Full Battery Charge for Extended Battery - Cameron Sino 2400 mAh

With this kernel code, I have enabled full charge characteristics for the Cameron Sino Extended battery 2400 mAh

The stock battery is 1400/1500 Mah, the full battery level polled is a max of 1500 only due to HTC Code limitation. The attached kernel (to upload later at request) makes it test whether the battery is an extended Cameron Sino or not. If it is, then the max MAh level is upped to 2400 mAh.. I have added additional debug lines to output some useful battery stats.

Code:

Code:
--- /home/droidzone/android/kernel/power_ds2784_patches/ds2784_battery.c.bak	2011-11-05 21:32:15.000000000 +0530
+++ /home/droidzone/android/kernel/bravo_2.6.35_gb-mr/drivers/power/ds2784_battery.c	2011-11-06 09:14:01.255605163 +0530
@@ -118,8 +118,11 @@ PS. 0 or other battery ID use the same p
 /* Battery ID = 1: HT-E/Formosa 1400mAh */
 #define BATT_ID_A				1
 #define BATT_FULL_MAH_A			1400
-
 #define BATT_FULL_MAH_DEFAULT	1500
+#define BATT_FULL_MAH_CAMERONSINO	2400
+#define BATT_ID_CAMERONSINO
+#define BATT_TYPE 0
+
 
 /* Battery OVP and Charging stage define */
 #define BATT_GOOD_STATE			0
@@ -145,6 +148,7 @@ PS. 0 or other battery ID use the same p
 //#endif
 static struct ds2784_device_info htc_batt_info;
 static int htc_battery_initial;
+static int Batt_extended;
 static int Full_40;
 static int Full_30;
 static int Full_20;
@@ -213,7 +217,7 @@ static int ds2784_blocking_notify(unsign
 			htc_batt_info.rep.charging_enabled = DISABLE;
 			chg_ctl = DISABLE;
 			v = DISABLE;
-			pr_info("[HTC_BATT] Unknow battery\n");
+			pr_info("[HTC_BATT] Unknown battery\n");
 		}
 
 		if (machine_is_passionc() || machine_is_bravoc()) {
@@ -285,8 +289,10 @@ ssize_t htc_battery_show_attr(struct dev
 		htc_batt_info.rep.full_level,
 		fake_temp
 		);
+	pr_info("[HTC_BATT] Battery ID is %d\n", htc_batt_info.rep.batt_id);
 	}
 	return len;
+	
 }
 
 static int cable_status_handler_func(struct notifier_block *nfb,
@@ -388,8 +394,25 @@ static int Calculate_Full_mAh(struct ds2
 	int Upper_Full = 0;
 	int Lower_Full = 0;
 	int Delta_temp = 0;
-
-	Full_mAh = BATT_FULL_MAH_DEFAULT;
+	
+	if (Batt_extended == 1) {
+	      Full_mAh = BATT_FULL_MAH_CAMERONSINO;
+	      pr_info("[HTC_BATT] Extended Battery detected and Charge Characteristics set\n");
+	      pr_info("[HTC_BATT] Max Battery mAh is now set as %d\n", Full_mAh);
+	} else {	      
+	      Full_mAh = BATT_FULL_MAH_DEFAULT;
+	      pr_info("[HTC_BATT] Standard HTC Battery detected and Charge Characteristics set\n");
+	      pr_info("[HTC_BATT] Max Battery mAh is now set as %d\n", Full_mAh);
+	}
+	
+	
+	
+	/*  BATT_FULL_MAH_CAMERONSINO 
+	 Droidzone's Hack
+	 Full_mAh = BATT_FULL_MAH_CAMERONSINO;
+	 Batt_extended
+	 
+	 */
 
 /* Only calculate at initial */
 	if (htc_battery_initial == 0) {
@@ -484,12 +507,20 @@ 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;
-	else
-		htc_batt_info.rep.batt_id = BATT_FIRST_SOURCE;
+	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");
+	      pr_info("batt: Dirty hack : Battery set as Cameron Sino\n");
+	      Batt_extended = 1;     	      
+	} else {
+	      Batt_extended = 0;
+	}
+	
+	htc_batt_info.rep.batt_id = BATT_FIRST_SOURCE;
 	mutex_unlock(&htc_batt_info.lock);
 
 /*
@@ -548,6 +579,7 @@ Get ACR and Active Empty
 /*
 Set to local for reply to framework
 */
+	pr_info("[HTC_BATT] Battery Debug 1 - Calculating Battery Stats\n");
 	htc_batt_info.rep.batt_current = di->current_mA;
 	htc_batt_info.rep.batt_current_avg = di->current_avg_mA;
 	htc_batt_info.rep.batt_temp = di->temp_C;
@@ -558,6 +590,8 @@ Set to local for reply to framework
 	htc_batt_info.rep.acr = di->acr;
 	htc_batt_info.rep.active_empty = di->active_empty;
 	htc_batt_info.rep.full_bat = Calculate_Full_mAh(di);
+	pr_info("[HTC_BATT] Battery Debug 2 - Full mAh value is %d\n", htc_batt_info.rep.full_bat);
+	/*pr_info("Battery Debug 1 - Calculating Battery Stats\n"*/
 
 
 	/* After battery driver gets initialized, send rpc request to inquiry
@@ -575,6 +609,7 @@ pr_info("[HTC_BATT]RSNSP=%d,RARC=%d,Vol=
 		,di->voltage_mV
 		,di->current_mA
 		,di->temp_C);
+pr_info("[HTC_BATT] Battery reported Full Value is %d mAh\n", htc_batt_info.rep.full_bat);
 	mutex_unlock(&htc_batt_info.lock);
 	return 0;
 }
@@ -871,6 +906,9 @@ if (machine_is_bravoc()) {
 	* user while we're maintaining a full charge
 	* (slowly draining to 95 and charging back
 	* to 100)
+	* 
+	* Modified by Sibere Battfix
+	* 
 	 */
 	if (htc_batt_info.rep.charging_source != 0) {
 		if (htc_batt_info.rep.level <= 99)
 

Dude_Virus

Senior Member
Mar 8, 2007
1,058
199
With this kernel code, I have enabled full charge characteristics for the Cameron Sino Extended battery 2400 mAh

The stock battery is 1400/1500 Mah, the full battery level polled is a max of 1500 only due to HTC Code limitation. The attached kernel (to upload later at request) makes it test whether the battery is an extended Cameron Sino or not. If it is, then the max MAh level is upped to 2400 mAh.. I have added additional debug lines to output some useful battery stats.

Code:

Code:
--- /home/droidzone/android/kernel/power_ds2784_patches/ds2784_battery.c.bak	2011-11-05 21:32:15.000000000 +0530
+++ /home/droidzone/android/kernel/bravo_2.6.35_gb-mr/drivers/power/ds2784_battery.c	2011-11-06 09:14:01.255605163 +0530
@@ -118,8 +118,11 @@ PS. 0 or other battery ID use the same p
 /* Battery ID = 1: HT-E/Formosa 1400mAh */
 #define BATT_ID_A				1
 #define BATT_FULL_MAH_A			1400
-
 #define BATT_FULL_MAH_DEFAULT	1500
+#define BATT_FULL_MAH_CAMERONSINO	2400
+#define BATT_ID_CAMERONSINO
+#define BATT_TYPE 0
+
 
 /* Battery OVP and Charging stage define */
 #define BATT_GOOD_STATE			0
@@ -145,6 +148,7 @@ PS. 0 or other battery ID use the same p
 //#endif
 static struct ds2784_device_info htc_batt_info;
 static int htc_battery_initial;
+static int Batt_extended;
 static int Full_40;
 static int Full_30;
 static int Full_20;
@@ -213,7 +217,7 @@ static int ds2784_blocking_notify(unsign
 			htc_batt_info.rep.charging_enabled = DISABLE;
 			chg_ctl = DISABLE;
 			v = DISABLE;
-			pr_info("[HTC_BATT] Unknow battery\n");
+			pr_info("[HTC_BATT] Unknown battery\n");
 		}
 
 		if (machine_is_passionc() || machine_is_bravoc()) {
@@ -285,8 +289,10 @@ ssize_t htc_battery_show_attr(struct dev
 		htc_batt_info.rep.full_level,
 		fake_temp
 		);
+	pr_info("[HTC_BATT] Battery ID is %d\n", htc_batt_info.rep.batt_id);
 	}
 	return len;
+	
 }
 
 static int cable_status_handler_func(struct notifier_block *nfb,
@@ -388,8 +394,25 @@ static int Calculate_Full_mAh(struct ds2
 	int Upper_Full = 0;
 	int Lower_Full = 0;
 	int Delta_temp = 0;
-
-	Full_mAh = BATT_FULL_MAH_DEFAULT;
+	
+	if (Batt_extended == 1) {
+	      Full_mAh = BATT_FULL_MAH_CAMERONSINO;
+	      pr_info("[HTC_BATT] Extended Battery detected and Charge Characteristics set\n");
+	      pr_info("[HTC_BATT] Max Battery mAh is now set as %d\n", Full_mAh);
+	} else {	      
+	      Full_mAh = BATT_FULL_MAH_DEFAULT;
+	      pr_info("[HTC_BATT] Standard HTC Battery detected and Charge Characteristics set\n");
+	      pr_info("[HTC_BATT] Max Battery mAh is now set as %d\n", Full_mAh);
+	}
+	
+	
+	
+	/*  BATT_FULL_MAH_CAMERONSINO 
+	 Droidzone's Hack
+	 Full_mAh = BATT_FULL_MAH_CAMERONSINO;
+	 Batt_extended
+	 
+	 */
 
 /* Only calculate at initial */
 	if (htc_battery_initial == 0) {
@@ -484,12 +507,20 @@ 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;
-	else
-		htc_batt_info.rep.batt_id = BATT_FIRST_SOURCE;
+	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");
+	      pr_info("batt: Dirty hack : Battery set as Cameron Sino\n");
+	      Batt_extended = 1;     	      
+	} else {
+	      Batt_extended = 0;
+	}
+	
+	htc_batt_info.rep.batt_id = BATT_FIRST_SOURCE;
 	mutex_unlock(&htc_batt_info.lock);
 
 /*
@@ -548,6 +579,7 @@ Get ACR and Active Empty
 /*
 Set to local for reply to framework
 */
+	pr_info("[HTC_BATT] Battery Debug 1 - Calculating Battery Stats\n");
 	htc_batt_info.rep.batt_current = di->current_mA;
 	htc_batt_info.rep.batt_current_avg = di->current_avg_mA;
 	htc_batt_info.rep.batt_temp = di->temp_C;
@@ -558,6 +590,8 @@ Set to local for reply to framework
 	htc_batt_info.rep.acr = di->acr;
 	htc_batt_info.rep.active_empty = di->active_empty;
 	htc_batt_info.rep.full_bat = Calculate_Full_mAh(di);
+	pr_info("[HTC_BATT] Battery Debug 2 - Full mAh value is %d\n", htc_batt_info.rep.full_bat);
+	/*pr_info("Battery Debug 1 - Calculating Battery Stats\n"*/
 
 
 	/* After battery driver gets initialized, send rpc request to inquiry
@@ -575,6 +609,7 @@ pr_info("[HTC_BATT]RSNSP=%d,RARC=%d,Vol=
 		,di->voltage_mV
 		,di->current_mA
 		,di->temp_C);
+pr_info("[HTC_BATT] Battery reported Full Value is %d mAh\n", htc_batt_info.rep.full_bat);
 	mutex_unlock(&htc_batt_info.lock);
 	return 0;
 }
@@ -871,6 +906,9 @@ if (machine_is_bravoc()) {
 	* user while we're maintaining a full charge
 	* (slowly draining to 95 and charging back
 	* to 100)
+	* 
+	* Modified by Sibere Battfix
+	* 
 	 */
 	if (htc_batt_info.rep.charging_source != 0) {
 		if (htc_batt_info.rep.level <= 99)


Hi i was wondering if this same coding could work on a dell streak.....i have a mugen 4800 mah battery and it never shows proper charge...it shows the charge for the stock 1500 mah battery and then runs down and stays at 1% till the battery finally dies...so out of the 48 hrs tht i get out of it for the initial 12 to 15 hrs show the proper charge level but after tht it stays on 1% Unless i pull the battery out.
 

Droidzone

Inactive Recognized Developer
Sep 24, 2010
5,531
2,283
Kochi
www.droidzone.in
OnePlus 9 Pro
Hi i was wondering if this same coding could work on a dell streak.....i have a mugen 4800 mah battery and it never shows proper charge...it shows the charge for the stock 1500 mah battery and then runs down and stays at 1% till the battery finally dies...so out of the 48 hrs tht i get out of it for the initial 12 to 15 hrs show the proper charge level but after tht it stays on 1% Unless i pull the battery out.

You could certainly code something similiar. I dont know what kind of battery source code Dell uses, but you'll have to look into the specific code of the battery driver. Your problem is similiar to mine. The patch cannoy be directly applied on your device though.
 

Dude_Virus

Senior Member
Mar 8, 2007
1,058
199
You could certainly code something similiar. I dont know what kind of battery source code Dell uses, but you'll have to look into the specific code of the battery driver. Your problem is similiar to mine. The patch cannoy be directly applied on your device though.

Thanks .. have one question though if we enable all the drivers in the kernel will this issue get solved or we need to modify the codes in one particular driver which is being used for the battery.
 

theGanymedes

Senior Member
Oct 3, 2010
474
253
Droidzone, I noticed something with your patch:

Due to DS2784 chip uses extensively the Rsnsp number (sense resistor prime: the value of "1/sense resistor" in mOhms), and since everywhere in the code it's hardcoded as "67"; maybe you should add something for that as well, huh? You can find the value of this sensor chip in "DS2784_REG_RSNSP" location (di->raw[DS2784_REG_RSNSP] can obtain this value).

After retrieval of this value (and keep it in some int like Rsnsp), you can change the "67"s where you can see in calculation of mAh, Raac, etc. and others with Rsnsp. This would make the driver estimate the battery's capacity better - rather than trying to emulate its usage as a HTC Stock battery.

EDIT: Posted that idea in my BATT-Fix thread. Thanks for the idea, buddy!
 
Last edited:

phsetaknev

Senior Member
Feb 26, 2012
618
49
Sydney
Batt Fix for 1400mAh bettery

Hey Droidzone,

Does that code can be flashed to the Desire's which have a 1400mAh battery, that basically comes while you buy the phone.

Coz I've installed Runnymede AIO V6.0.4.1 ROM onto my desire and I seriously need more battery [not that i can't get another bulk battery] but can it be possible to use the flashable zip to increase battery capacity. If yes then how can I do it??

I do have this 12% shutdown issue...........though :(

Thanks in advance :D
 

Droidzone

Inactive Recognized Developer
Sep 24, 2010
5,531
2,283
Kochi
www.droidzone.in
OnePlus 9 Pro
No that's not the purpose of this patch. It can be flashed, but will not change anything on a stock battery. You can use one of my kernels which has theganymedes's calibration driver for latter issue.

Coz I've installed Runnymede AIO V6.0.4.1 ROM onto my desire and I seriously need more battery [not that i can't get another bulk battery] but can it be possible to use the flashable zip to increase battery capacity.

The powersaver v2 kernel may help a bit.
 

swemoza

Senior Member
Nov 19, 2010
554
104
Jakarta
Dz,
I'm using 2600 mah extended battery and already use your kernel with extended battery fix.
But when I charge the phone, never got the green led when full, and also never got 100% charge sign on the battery indicator.
Any advice?

Thank you...

Sent from my HTC Desire using xda premium
 

phsetaknev

Senior Member
Feb 26, 2012
618
49
Sydney
No that's not the purpose of this patch. It can be flashed, but will not change anything on a stock battery. You can use one of my kernels which has theganymedes's calibration driver for latter issue.



The powersaver v2 kernel may help a bit.
Can you tell me which kernel is that? How to find it? and How to install it?


================================
AlphaRev CM7 r2
BRAVO PVT4 SHIP S-OFF
HBOOT - 6.93.1002
MICROP-051d
TOUCH PANEL-SYNT0101
RADIO-5.17.05.23
ROM: Runnymede AIO V6.0.4.1 S.E [AD2SDX Aramullz][4EXT Recovery][RCTeam Tweaks]
Kernel: droidzone@supernova
 

phsetaknev

Senior Member
Feb 26, 2012
618
49
Sydney
No that's not the purpose of this patch. It can be flashed, but will not change anything on a stock battery. You can use one of my kernels which has theganymedes's calibration driver for latter issue.



The powersaver v2 kernel may help a bit.
I couldn't find Powersaver V2.......... but V3, V4 etc......... can you send me the direct link for that......... and procedure to how to install??
 

Droidzone

Inactive Recognized Developer
Sep 24, 2010
5,531
2,283
Kochi
www.droidzone.in
OnePlus 9 Pro
It should be on the site. If it isnt, then it's probably been removed and I cant do anything about it. This thread is strictly meant for development related discussion about this particular Extended battery fix. Kindly do not resort to making support queries related to my kernels here. There is no support for the kernels, express or implied.

All questions non development related should be posted in Q/A
 

legend-ris

Senior Member
Nov 17, 2010
94
19
Banja Luka
Dz,
I'm using 2600 mah extended battery and already use your kernel with extended battery fix.
But when I charge the phone, never got the green led when full, and also never got 100% charge sign on the battery indicator.
Any advice?

Thank you...

Sent from my HTC Desire using xda premium

I have same isue with Nexus battery in Desire ..is there any solution??

Funny thing is that when I am in 4ext recovery, it said battery full ...but after reboot it drop down to 99%. Battery calibration can`t fix it
I use Runny ROM v7.0.2 w/INT2SD

TIA
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    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. :D

    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.

    before.jpeg


    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.

    after.jpeg


    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);
    The attached kernel has the following characteristics:

    • 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
    4
    Droidzone, I noticed something with your patch:

    Due to DS2784 chip uses extensively the Rsnsp number (sense resistor prime: the value of "1/sense resistor" in mOhms), and since everywhere in the code it's hardcoded as "67"; maybe you should add something for that as well, huh? You can find the value of this sensor chip in "DS2784_REG_RSNSP" location (di->raw[DS2784_REG_RSNSP] can obtain this value).

    After retrieval of this value (and keep it in some int like Rsnsp), you can change the "67"s where you can see in calculation of mAh, Raac, etc. and others with Rsnsp. This would make the driver estimate the battery's capacity better - rather than trying to emulate its usage as a HTC Stock battery.

    EDIT: Posted that idea in my BATT-Fix thread. Thanks for the idea, buddy!
    1
    some pics not loading
    1
    Yes, it's a known issue with extended batteries. Will update you if I manage to fix it.