libera/#maemo-leste/ Tuesday, 2024-10-08

Wizzupuvos: from 0.10 to 1.0?01:16
Wizzupmade it 0.1101:17
Wizzuprunning for chimaera-devel now01:17
freemangordonsicelo: I don;t think this is the proper way to fix the issue. Also, you still have to cancel timer_work, otherwise schedule_delayed_work(&bq->timer_work, 0); does not work.08:24
freemangordondid you look at what fremantle kernel is doing to properly refresh the state?08:24
sicelotimer_work has no problem at all. it's not related to the detection issue in any way08:33
siceloIOW, if there is a problem in the way timer_work is called, it's a different problem, for a different commit. it would not help the reporting of charger08:41
sicelofremantle kernel doesn't have notifier_call afaict08:48
sicelommm, or i'm looking at cssu power kernel, since i see author is Pali09:15
* sicelo downloads the proper nokia kernel srcs09:15
Wizzupbtw, I got up to (and just past) hildon-desktop in daedalus so far12:28
Wizzupprobably about 33% of the way there or so12:28
WizzupI forgot just how much work all of this is :D12:28
uvos__Wizzup: i just find it pointless to have finished packages have versions <112:38
uvos__its not like this package of tiny config files is somehow in beta12:38
WizzupI mean I suppose12:50
freemangordonsicelo: and how KP does notify userspace?14:01
freemangordonI have the feeling that bq2415x is ignored and it is isp1704/bq27xxx that are used for charger detection14:03
freemangordonsicelo: also, docs say detection timeout is 2 seconds, how comes that we need more then 5 seconds for reliable detection?14:06
sicelofreemangordon: exactly. fremantle's bme uses multiple heuristics to determine battery state. actually it doesn't even use the chips to determine percentage. so yeah, unfortunately fremantle is not a good guide for what to do here16:50
siceloso, we can do something similar in Leste by simply blacklisting bq2415x. IOW, the problem is not major, as far as Leste is concerned :-)16:52
sicelohowever, i do want to get the kernel side to behave better, so we need less device-specific stuff in userspace. hence my desire to make the ONLINE state reporting work ootb, just kernel side. in future, these improvements may help Leste run just fine ootb with upstream upower16:53
siceloas for the timeout - the docs say typically 2s. they don't have max and min for that particular timeout, which i find interesting. anyway, the very first time you plugin the device, the detection is near-instant. hence, my original patch works. however subsequent plugin builds up more and more delays, for a reason i can't explain. that's why i was wondering if it's perhaps the USB gadget or something16:58
sicelothat said, for argument's sake, let's say it's always 2s. now, you plugin charger, notifier_call gets run, and power_supply_changed() rechecks the flags. this takes ms. by that time, bq24 is still internally trying to detect charging. the uevent will say Not charging, so we haven't achieved our goal. we need a way to wait for those 2s before we run power_supply_changed(), hence i thought that wq was17:01
sicelobest option17:01
sicelobut then, as already mentioned, from testing, the delay can be as high as 8s. a quick way to see it in action is to echo 1 > /sys/class/power_supply/bq24150a-0/stat_pin_enable from a fresh boot, then see how fast the LED comes on. this is completely independent of kernel or userspace17:02
sicelothe slow down doesn't seem to happen when you use a normal charger, as opposed to charging from PC. side note, my el-cheapo, but recent Samsung phones, A037 and A04e also take a few seconds before showing the charging animation. I don't think waiting 10s is that bad, if we were not able to get more instant notification17:04
siceloat least it's way better than waiting minutes until we infer that we are charging ... we do infer it from the fuel gauge's reported status, but that event only comes after you've gained 1% :-)17:06
siceloi think, ideally, the STAT pin should have been connected to a gpio or interrupt, instead of only the LED. it would simplify writing the driver more easily. bq2415x_notifier_call would then be kicked by bq24 itself, instead of being kicked by an independent chip, isp170717:10

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!