Active Topics

 


Reply
Thread Tools
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#1
Hi
I'm doing a program on battery state but have a problem. I use lshal and on omap kernel the output is different than in kernel power 46. Could somebody post
Code:
lshal | grep battery
for kernel power47, kernel power42 and other if somebody has
thanks in advance
 
Posts: 317 | Thanked: 787 times | Joined on Oct 2009 @ Krakow, Poland
#2
I have kernel power 46 an the output is:
Code:
  battery.charge_level.capacity_state = 'ok'  (string)
  battery.charge_level.current = 6  (0x6)  (int)
  battery.charge_level.design = 8  (0x8)  (int)
  battery.charge_level.last_full = 0  (0x0)  (int)
  battery.charge_level.percentage = 61  (0x3d)  (int)
  battery.charge_level.unit = 'bars'  (string)
  battery.is_rechargeable = true  (bool)
  battery.present = true  (bool)
  battery.rechargeable.is_charging = false  (bool)
  battery.rechargeable.is_discharging = true  (bool)
  battery.remaining_time = 7200  (0x1c20)  (int)
  battery.remaining_time.calculate_per_time = false  (bool)
  battery.reporting.current = 758  (0x2f6)  (int)
  battery.reporting.design = 1242  (0x4da)  (int)
  battery.reporting.last_full = 0  (0x0)  (int)
  battery.reporting.unit = 'mAh'  (string)
  battery.type = 'pda'  (string)
  battery.voltage.current = 3607  (0xe17)  (int)
  battery.voltage.design = 4200  (0x1068)  (int)
  battery.voltage.unit = 'mV'  (string)
  info.capabilities = {'battery'} (string list)
  info.category = 'battery'  (string)
 

The Following User Says Thank You to dwaradzyn For This Useful Post:
Posts: 237 | Thanked: 193 times | Joined on Feb 2010 @ Brighton, UK
#3
kernel power 47
Code:
  battery.charge_level.capacity_state = 'ok'  (string)
  battery.charge_level.current = 6  (0x6)  (int)
  battery.charge_level.design = 8  (0x8)  (int)
  battery.charge_level.last_full = 8  (0x8)  (int)
  battery.charge_level.percentage = 60  (0x3c)  (int)
  battery.charge_level.unit = 'bars'  (string)
  battery.is_rechargeable = true  (bool)
  battery.present = true  (bool)
  battery.rechargeable.is_charging = false  (bool)
  battery.rechargeable.is_discharging = true  (bool)
  battery.remaining_time = 10800  (0x2a30)  (int)
  battery.remaining_time.calculate_per_time = false  (bool)
  battery.reporting.current = 748  (0x2ec)  (int)
  battery.reporting.design = 1231  (0x4cf)  (int)
  battery.reporting.last_full = 1223  (0x4c7)  (int)
  battery.reporting.unit = 'mAh'  (string)
  battery.type = 'pda'  (string)
  battery.voltage.current = 3880  (0xf28)  (int)
  battery.voltage.design = 4200  (0x1068)  (int)
  battery.voltage.unit = 'mV'  (string)
  info.capabilities = {'battery'} (string list)
  info.category = 'battery'  (string)
 

The Following User Says Thank You to mr id For This Useful Post:
Posts: 458 | Thanked: 783 times | Joined on Jan 2010 @ France
#4
Originally Posted by marmistrz View Post
Hi
I'm doing a program on battery state but have a problem. I use lshal and on omap kernel the output is different than in kernel power 46. Could somebody post
Code:
lshal | grep battery
for kernel power47, kernel power42 and other if somebody has
thanks in advance
Here is the FIX :

Code:
clear && ID=$(id -un) ; if [ ${ID} != "root" ] ; then echo "You are not 'root', please use this command line as 'root' ..." ; else echo "Ok, you are 'root' ..." ; if grep -q "bq27x00_battery" /etc/modprobe.d/blacklist 2>/dev/null ; then echo "Patch already applyed, nothing to be done ..." ; echo "" ; else echo "Applying patch now ..." ; echo "blacklist bq27x00_battery" >>/etc/modprobe.d/blacklist ; echo "" ; echo "DONE, PLEASE REBOOT YOUR DEVICE ..." ; echo "" ; fi ; fi
A++

PS : Obviously after the patch (blacklisting bad module) all kernel's report same values ...

Last edited by colin.stephane; 2011-06-09 at 18:39. Reason: Add information ...
 

The Following User Says Thank You to colin.stephane For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#5
thanks!
and is there any problem if I patch the omap kernel?
 
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#6
the problem still exist after patching
 
Reply


 
Forum Jump


All times are GMT. The time now is 21:17.