[Letux-kernel] gab driver

H. Nikolaus Schaller hns at goldelico.com
Mon Dec 4 13:22:53 CET 2017


Hi Marek,
I have rebased the Letux kernel to 4.15-rc2 and did now test on Pyra.

Looks quite good:

Battery /sys/class/power_supply/bq27421-0
==================
type: Battery
present: 1
technology: Li-ion
capacity: 1%
status: Charging
level: Low
volt: 3751000uV
current: 807000uA
temp: 23.9°C
charge: 110000uAh
full: 5362000uAh
design: 6000000uAh
energy: J?
power: W?
cycles:
health:
discharge: s to empty average
remaining: s to empty
charging: s to full

Battery /sys/class/power_supply/pyra-battery
==================
type: Battery
present:
technology: Li-ion
capacity: 3%
status: Discharging
level:
volt: 3710000uV
current: 0uA
temp: 7.6°C
charge: 180000uAh
full: uAh
design: 6000000uAh
energy: J?
power: W?
cycles:
health:
discharge: s to empty average
remaining: s to empty
charging: s to full

root at letux:~# 

Only minor things are observed:
* status says Discharging although it is being charged
* current is 0mA (seems the reason for the first issue - I don't know how the Palmas can report the current)
* temperature says 7.6°C... But this may be a calibration issue in the Palmas iio adc
* can we somehow report "Present:"? Maybe by checking if battery voltage > some minimum
* can we report "Level"? Maybe <10% => low <90% => good >= 90% => full?

BR,
Nikolaus

latest driver: http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=refs/heads/work/letux-base/marek/generic-adc-battery-v2


More information about the Letux-kernel mailing list