[Letux-kernel] gab driver
H. Nikolaus Schaller
hns at goldelico.com
Mon Dec 4 14:41:16 CET 2017
> Am 04.12.2017 um 14:09 schrieb Belisko Marek <marek.belisko at gmail.com>:
>
> Hi Nikolaus,
>
> On Mon, Dec 4, 2017 at 1:22 PM, H. Nikolaus Schaller <hns at goldelico.com> wrote:
>> Hi Marek,
>> I have rebased the Letux kernel to 4.15-rc2 and did now test on Pyra.
>>
>> Looks quite good:
> +1
>>
>> 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?
> OK I'll try to look but can I please use you as remote tester as I
> don;t have pyra device.
Unfortunately I am not yet in a position to change that...
> Thanks.
Yes, sure for the Palmas things.
Some of the (new) features can also be tested on GTA04.
One more thing - maybe we can write a simple logging daemon that rund
in the background and collects bq27xxx charge in % vs. *battery charge in %
We can then simply run it while testing/using/charging devices and get an
impression about the precision of the State-of-Charge prediction.
I think of something like:
battmon:
# run as daemon
BQ27=$(echo /sys/class/power_supply/bq27*)
GAB=$(echo /sys/class/power_supply/*-battery)
2>/dev/null
function values {
echo $(cat $1/capacity)% $(cat $1/charge_now)uAh $(cat $1/voltage_now)mV $(cat $1/status)
}
while true
do
echo $(date) - $(values $BQ27) - $(values $GAB) >>battmon.log
sleep 10
done
BR,
Nikolaus
>>
>> 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
>
> BR,
>
> marek
>
> --
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
More information about the Letux-kernel
mailing list