it should be "1940000" with the stock kernel and after flashing one of my modified kernels it should be higher.
It gives me 70032704 with 4275mAh version... is that correct?
OK. So I've flashed 3800mAh kernel version. Now terminal gives me a value of "-414967296". Yes, with "minus" in the front
Is that correct?
It seems like you're hitting an integer overflow here.
The maximum value for a 32 bit signed integer is 2,147,483,647.
Default value is 1,940,000,000 (uAh)
* 2 = 3,880,000,000 which is bigger than 2,147,483,647 and overflows to -414,967,296
* 3 = 5,820,000,000 overflows to 70,032,704
So this kernel patch might have unexpected behavior. You might try to convert the values to
unsigned int but even then the 3x patch won't fit (BTW there are no commercially available 3x batteries, they are advertised as 3x but real capacity is at most 2x, physical limits apply)