libera/#maemo-leste/ Wednesday, 2024-10-09

freemangordonsicelo: ok, we shall read the tocs more carefully then, taking 8s for bq to report status does not seem like HW issue, but rather how it is programmed08:31
freemangordon*docs08:31
freemangordonsicelo: it seens this 2s timeout is to re-start charging on temporal low input voltage, see "Input Source Detection"08:44
freemangordon*seems08:44
freemangordonso, I would think that we shall have (almost) immediate status change08:50
sicelofreemangordon, have you done the LED test?09:15
sicelowe can report instantaneous charging state if we want, by simply setting ONLINE true when reported_mode changes in notifier_call. but that's cheating, because in reality, the chip has not yet decided that we're charging or not. it's possible (although not very likely) that it'll end up in fault state instead09:18
sicelothat's why I prefer we rely on the STAT_1 & STAT_2 flags, which the STAT pin also uses09:30
siceloi have looked at the docs multiple times, and i have never seen a way to influence how fast the detection/reporting takes place09:39
siceloanyway, i guess in the meantime we can drop the whole thing, blacklist bq24 in the status applet, so it will automatically switch to tracking isp1704.09:47
sicelobut please do the STAT pin LED test, or someone else can do it and report their result, so we're sure i don't have a broken N900. Wizzup, arno11 ...09:57
siceloecho 1 > /sys/class/power_supply/bq24150a-0/stat_pin_enable from a fresh boot. plug in charger, note how fast steady amber LED comes on. disconnect charger. reconnect it, not when steady amber LED comes on. repeat as much as  you can afford to10:27
sicelos/not/note/11:17
freemangordonsicelo: will do once I am home, next week11:23
freemangordonin the meanwhile it will be good if arno11 does it11:24
freemangordonhowever, it is not reasonable charging detection to take 8 seconds11:25
arno11sicelo: on my device, the amber led never comes11:26
arno11(leds work fine on Fremantle)11:27
arno11the green led is ok11:27
siceloarno11: that's not possible. did you do the stat_pin_enable?11:29
arno11let me try again (sorry, not too much spare time atm)11:30
siceloarno11: ah, what you're talking about is what i want to fix. you mean it never comes when running 'normally' :-)11:30
arno11yes indeed11:30
sicelobut yes, please do the test mentioned above. no rush. note how fast, or how slow that amber led comes up, each time you plugin charger11:30
arno11ok no probs11:31
arno11results in sec: 9, 7, 8, 0, 0, 011:35
arno11if i wait a couple of seconds and test again, same results11:36
arno11that's a bit random11:37
arno11now: 6, 0, 011:38
arno115, 0, 011:38
arno117, 0, 0, 011:39
sicelothank you so much! you're testing with a real charger or port on pc?11:41
arno11and now after waiting 30 sec to plug it again: 0, 2, 2, 3, 711:41
arno11i use a real charger11:41
siceloperfect. thank you ;-)11:44
arno11no probs11:44
sicelodon't forget to zero the stat_pin_enable sysfs node11:45
siceloif you want, i can share the fixed charger driver corresponding to my PR. amber LED works with it11:46
arno11yup already set to zero, no rush for amber led :) , thx anyway11:47
uvosso the problem is that sometimes the chip takes a long time to detect?12:01
sicelolet me say, long to report12:05
* sicelo is 99% sure his fix is correct12:07
uvossicelo: ok so i gues you sleep for the maximum time so that you allways catch the register state after it has "settled"?12:15
siceloyup12:16
uvosif the time is very variable (like arno's msg seams to suggest)12:16
uvosi gues it would be better to use a periodic timer to poll the state for 10s, so most of the time it finishes sooner12:16
siceloin reality, we run call power_supply_changed() three times for every charger insertion or removal, since for some magical reason, the PHY sends events twice12:20
siceloso if your device is in 'fast mode' so to speak, then it doesn't wait for the 10s at all12:21
uvosi see12:21
uvosok12:21
siceloalso important to note that this whole dance doesn't affect charging itself ... chip is charging just fine. this is only about reporting to userspace. i don't think we have a very big need to report very quickly, especially here the delay is in the hw itself. so that's why i'm not really in favor of polling12:30
uvoswell 10s is a long time12:30
uvosthe user might get confused and think something is wrong with his cable etc12:30
uvosso i can see the apeal of keeping this responsive12:31
sicelomy samsung phones, for some reason i don't know, also take a little while12:32
siceloanyway, if we really want this to be snappy, then sure, i'll restore the blacklist in the status applet. that causes it to use the PHY for reporting, and that microsecond fast. then we can leave bq to take its 10s and userspace won't even know about that12:34
sicelostill curious what causes the bq to be very fast first time, then start delaying. maybe there was (or should have been) some errata for it :)12:37
uvosmz617 sensor suite is quite extensive14:28
uvoswe have a max9635 als (no driver in mainline), a lis3dh accel, an akm8975 compass, a l3g4200d gyro, a bmp180 pressure sensor, and an attiny48 driveing a custom pannel wide capacative proximity sensor (for the pen i presume)14:31
sicelodocs for the als available?14:35
uvosyeah14:36
uvosmaybe we should try to buy these https://www.ebay.com/itm/28585131077716:29
uvosthe presence of the attiny makes me wonder how they work16:29
buZzmy surface pro tablet has similar, it supports 'finger touch' -and- 'pen input' , programs can handle them differently16:31
uvosbuZz: i mean more hw wise16:32
uvosthe touch sensor chip has no support for a active stylus16:32
buZzfancy16:32
buZzso that chip does just the fingers16:32
uvosbut there is a mysterious attiny doing "cpapacitive proximity" in the stock kernel16:33
uvosand android has a callibration procedure for the stylus16:33
uvosso motorola seams to be doing something fairly fancy here to get the hovering pen effect16:34
buZzwacom uses 'EMR Electromagnetic Resonance'16:34
buZzhere on this tablet, the pen functions before touching the screen16:34
buZzit starts a couple mm before the screen16:35
uvosi wonder if i can find the attiny on the board and dump its rom16:38
uvosavr assembly is pretty easy to read16:38

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