uvos has quit [Remote host closed the connection]
maemish_ has quit [Quit: Connection closed for inactivity]
xmn has quit [Quit: ZZZzzz…]
uvos__ has quit [Ping timeout: 240 seconds]
uvos__ has joined #maemo-leste
xmn has joined #maemo-leste
<sicelo> Wizzup: n900 bq27200 charge_full is always 2050560 when no calibration has taken place. this value will also be charge_now if battery reaches 100% full. it only starts becoming 'sane' once you have a full, uninterrupted discharge
<sicelo> tldr; don't mind charge_* until you have calibrated
joerg is now known as Guest730
joerg has joined #maemo-leste
Guest730 has quit [Ping timeout: 255 seconds]
k1r1t0 has joined #maemo-leste
<freemangordon> tmlind: is it acceptable to have sysfs attribute in cpcap_adc driver that controls single vs multi channels? otherwise I would have to have 8 more channels dedicated to single-channel ADC
<freemangordon> IOW: when buffer support is implemented, one should enable the channels she would like to read. Having 4x2 single-channel read means 8 additional channels.
<freemangordon> Unless I a missing something
Twig has joined #maemo-leste
<tmlind> freemangordon: hmm yeah i don't know, best to ask the iio folks.. maybe IIO_CHAN_INFO_AVERAGE_RAW could be used?
<freemangordon> ok
xmn has quit [Ping timeout: 240 seconds]
elastic_dog has quit [Ping timeout: 240 seconds]
elastic_1 has joined #maemo-leste
<freemangordon> tmlind: https://pastebin.com/X1jFb5g7
<freemangordon> what is the current status of the driver? like, you said you will push changes upstream, but I didn;t follow
rafael2k has joined #maemo-leste
k1r1t0 has quit [Read error: Connection reset by peer]
rafael2k has quit [Ping timeout: 246 seconds]
<freemangordon> tmlind: do we really need to expose raw adc values to sysfs?
norayr has left #maemo-leste [Error from remote client]
<Wizzup> sicelo: ok, but I am not sure if my n900 is charging anymore even with empty battery
<Wizzup> and the usb cable is fine
<Wizzup> so something is off
<Wizzup> I am wondering if it is maybe the module blacklist we did for pm
<freemangordon> which module?
<freemangordon> ix isp1704 module loaded?
<freemangordon> *is
<Wizzup> yes
<Wizzup> # ls /sys/class/power_supply/
<Wizzup> bq24150a-0 bq27000-battery bq27200-0isp1704 twl4030_ac twl4030_usb
<Wizzup> but upower doesn't 'detect' charging
<Wizzup> and the led doesn't pulsate orange
<Wizzup> it seems to be charging, but the led doesn't show it, neither does status applet
<Wizzup> it's kind of weird
<Wizzup> # cat capacity
<Wizzup> 8
<Wizzup> better than 1, I guess
<freemangordon> sorry, no idea
<freemangordon> better ask Pali or joerg
<joerg> hm?
<Wizzup> I think I might try to unblacklist a few modules first
<Wizzup> and see if it's related at all
<freemangordon> ok
<freemangordon> joerg: something weird on n900, see backscroll if you have some spare time
<joerg> please provide a anchor quote
<freemangordon> " sicelo: ok, but I am not sure if my n900 is charging anymore even with empty battery"
<Wizzup> it is charging now, I can see it, but it's a bit weird
<freemangordon> ok
<Wizzup> I'll have to check upower and our status applet code
<joerg> the kernel module taking charge about 2translating" bq27200 data into sysnodes, it's... tricky. Pali implemented it for maemo
<Wizzup> we had this working for sure
<joerg> taking care about...
<joerg> yes, it works IFFF
<joerg> and e.g. my and speedevi's bq27k-detail.sh scriopts iirc only work when you unload the kernel module
<Wizzup> I'll report back when I've figured this out, it might be a kernel change or just the module blacklist
<joerg> something about I2C device exclusive open()
<joerg> there are several mutually exclusive kernel midules which may try to access the bq27k stuff
<joerg> and twl4030 iirc only involved regarding some A/D or USB-ID-pin or whatever
<joerg> twl4030 can not emergency-charge
<joerg> aka bootstrap-charge
<Wizzup> freemangordon: battery_bq27200_0 has state charging, battery_bq24150a_0 has state charging (but is meaningless), DisplayDevice is state charging
<Wizzup> both the displaydevice and the bq27200_0 seem ok info wise, so somehow our code decides not to use it
<Wizzup> both mce and status applet
<Wizzup> mce for led, status applet for gui
<Wizzup> I'll check the code in a bit and see if I can find anything there
<freemangordon> ok
<joerg> to start with, the bq24150 charger chip needs D+/- short for bootstrap-charging (when the battery voltage is too low to bring up the CPU)
<freemangordon> joerg: well, it seems kernel-wise it is fine
<joerg> basically no USB wallwart charger supports this any more nowadays
<freemangordon> some userspace issues
<joerg> ok, then I'm probably out :-)
<joerg> pali should know more details
<freemangordon> yeah, thanks
<joerg> yw
arno11 has joined #maemo-leste
<Wizzup> arno11: do you ever see the orange led when charging/
<Wizzup> or the battery charging animation
<arno11> Never seen the orange led since beowulf in 2021-2022
<arno11> always troubles with battery animation
<arno11> but charging always works
<arno11> did you try to charge through fremantle to see any difference ?
<arno11> i mean with your current battery
Daanct12 has quit [Quit: Quitting]
<Wizzup> arno11: yeah fremantle is fine I think
<arno11> maybe we have new issues if the battery is not already calibrated
<Wizzup> arno11: in any case that is not normal, I think we had this working ok
<Wizzup> (status applet and led)
<arno11> indeed
<joerg> during early boot, NOLO/uBoot takes care about amber breathing indicator LED. Before even NOLO gets loaded to CPU, on batter_very_low the hardware BQ24150 enables the green and red (=amber) indicator LEDs on a mere hardware level
<joerg> the latter mode is steady amber, not breathing
<Wizzup> I think the problem here is just mce's upower module not picking up on this
<joerg> if you don't see it on completely depleted battery durning the first fraction of a second on pluggin in USB, extending to a usually max ~20s until battery voltage got boosted up to a level where CPU can load NOLO and take over management of the indicator LED, then either you got no D+/- short in your USB wallwart charger, or your indicator LED and associated hardware is broken
<Wizzup> yeah upower picks up something else
<Wizzup> ok, I can fix this I think
arno11 has left #maemo-leste [#maemo-leste]
<Wizzup> https://bpa.st/H4LKC there are all of these, and only some are ignored
<Wizzup> mce: xup_check_device: accepting device as line power twl4030_ac
<Wizzup> mce: xup_check_device: accepting device as battery bq27200-0
<Wizzup> hm... I wonder if we simply miss some patch the report sysfs values over udev
<Wizzup> unplugged cable makes the charging symbol start in battery applet
<Wizzup> s/symbol/pattern/
<Wizzup> I guess it would be better to use isp1704 and not twl4030_ac
<Wizzup> same logic in as mce as battery applet
<Wizzup> will have a fix soon I hope
<joerg> >>line power twl4030_ac<< hmmmm
<Wizzup> the mce code just iterates over upower devices
<Wizzup> and it picks the first line power device
<Wizzup> (there are at least three)
<joerg> afaik in N900 the twl4030 does zilch for power
<Wizzup> eaxctly, this is the problem
<Wizzup> it also rarely reports on udevadm monitor
<Wizzup> yup
<Wizzup> now it works again, with blacklist mod
<joerg> :-D
<Wizzup> the 'problem' we have with leste is that we support more than one device, so we need heuristics to find the right devices on a phone that exposes at least line power devices
<Wizzup> and also several battery devices
<Wizzup> it's possible the only thing that changed is the way the devices are loadeds or ordered in upower
<Wizzup> uvos__: I assume you're not opposed to blacklisting two more n900 line power devices in mce's upower blacklist
<Wizzup> isp1704, twl4030_ac and twl4030_usb are all 'power_supply: yes' and have a line-power property
<Wizzup> I see nothing that we can distinguish them on in code
akossh has quit [Quit: Leaving.]
<tmlind> freemangordon: i guess the idea with the raw values is that the data can be processed later on with little overhead during sampling
<tmlind> freemangordon: getting the gsm support to mainline needs quite a bit of work, mostly to switch to serdev read and write for the virtual ports
<Wizzup> freemangordon: (status-area-applet-battery) I rebased maemo/chimaera-devel and master on maemo/beowulf-devel, since there were some unmerged changes there, and I'm making a new release 1.5.5, with the blacklist added
<freemangordon> tmlind: ok, but do we need in the particular driver?
<freemangordon> Wizzup: yeah
<tmlind> freemangordon: sorry care to clarify, not following you
<freemangordon> cpcap_adc driver exposes both raw and processed values to sysfs. My question is - what is the usecase in exporting raw values from this particular driver and wouldn't it be better to remove BIT(IIO_CHAN_INFO_RAW) from .info_mask_separate?
<freemangordon> thus exporting processed values only
<freemangordon> BTW, I got buffer reads working (with made-up data, but still)
<freemangordon> tmlind: ^^^
<Wizzup> uvos__: freemangordon: should we treat battery at 100% as full battery? right now n900 says battery-full-charging-symbolic with percentage at 100% but state is 'charging'
<Wizzup> so the led never turns green
<Wizzup> we check for UP_DEVICE_STATE_FULLY_CHARGED
<tmlind> freemangordon: yeah maybe doable, the rate of data is very low volume for cpcap. nice that you got the buffer reads going
<freemangordon> Wizzup: I don't think so
<freemangordon> it is up to the driver/upower to set thta, no?
<freemangordon> tmlind: sure it is doable, just that bit in question removed and we'll halve sysfs entries
<freemangordon> not a biggie, but still
<Wizzup> freemangordon: well, the icon state seems to imply it's full: battery-full-charging-symbolic
<Wizzup> as in, charge_now == charge_full in sysfs
<Wizzup> anyway, it's not important now
<Wizzup> it just prevents green LED ;)
Twig has quit [Remote host closed the connection]
xmn has joined #maemo-leste
<freemangordon> tmlind: https://pastebin.com/CW9WwP5F :)
<freemangordon> this is real data
akossh has joined #maemo-leste
<tmlind> freemangordon: cool, any idea on the sample rate?
<freemangordon> no sample rate but sysfs trigger ;)
<freemangordon> "As an example, here is how to create a sysfs trigger:"
arno11 has joined #maemo-leste
<freemangordon> so it is polled
<freemangordon> "echo 1 > trigger_now" in /sys/bus/iio/devices/trigger1
<arno11> Wizzup: just have dist-upgraded: working battery applet confirmed ;)
<tmlind> freemangordon: oh ok
<freemangordon> do we need constant sampling?
<freemangordon> I don;t hink so
<tmlind> with polling you need to be careful with the battery life
<freemangordon> fyi: https://pastebin.com/u7H1Ps7J
<tmlind> ideally you would request the 2x4 samples, then get an interrupt when it's ready
<freemangordon> no, I think I didn;t explain it correctly
<freemangordon> by 'polling' I mean - you request 4x2 samples and then wait
<freemangordon> tmlind: see cpcap_adc_trigger_handler in the ^^^ patch
<tmlind> yeah ok cool
<freemangordon> so, when a diver or userspace needs data, it just triggers the trigger
<freemangordon> and then gets the data when it is ready
<freemangordon> the same as if you read from sysfs
<tmlind> ok great
<tmlind> so how do you now select between single channel and 2x4 data?
<freemangordon> buffer is allowed only for single channel
<tmlind> oh ok, but data shows both voltage and current?
<freemangordon> because the way thje buffer channels are registered
<freemangordon> yes, both voltage and current
<tmlind> so what's the /dev/iio name to read the 2x4 voltage + current data?
<freemangordon> /dev/iio\:device1
<freemangordon> /dev/iio:device1
<freemangordon> but this is not hard-coded I would say
<freemangordon> but you can get that from uevent file
<tmlind> sorry i mean the name for /sys/bus/iio, not /dev..
<freemangordon> no, you read from /dev
<tmlind> ok
<freemangordon> that's how buffers work
<tmlind> ok makes sense
<tmlind> so /sys/bus/iio can stay the same more or less
<freemangordon> right
<freemangordon> but I changed it a bit :D
<tmlind> except for the broken channels 16 & 17 that don't show the full data
<freemangordon> I removed those
<freemangordon> also removed indexes and put 'labels' instead
<tmlind> yeah makes sense if it's really 2x4 samples
<freemangordon> now you know which channel is what
<tmlind> cool
<freemangordon> so, one select what to receive by enabling in scan_elements/
<tmlind> did you find any new interesting adc sources or names?
<freemangordon> no, I reused your 'datasheet' ones
<tmlind> ok
<tmlind> some of them are still a bit of mystery
<freemangordon> also see https://pastebin.com/JwMKsU1H
<freemangordon> yeah
<tmlind> ok nice
<freemangordon> shall I split the changes before submitting?
<tmlind> hmm so what are the *label names describing?
<tmlind> a description for the channel if you cat it?
<freemangordon> I was not able to remove those, they auto-appear if you set https://elixir.bootlin.com/linux/v6.3-rc3/source/include/linux/iio/iio.h#L221
<freemangordon> yes
<Wizzup> arno11: good, mce will also work once uvos__ merges the pr
<tmlind> ok cool
<freemangordon> so, shall I split to 2 patches: 1. rename existing channels, 2. add buffer support?
<tmlind> freemangordon: yeah makes sense since 16 & 17 are wrong
<freemangordon> ok, will do that and will send them.
<tmlind> great
<tmlind> need to go, nice work! ttyl
<freemangordon> ttyl
<arno11> Wizzup: ok
<Wizzup> my phone still says 2040mAh but I guess over time that will settle
<arno11> calibration is quiete complicated
<Wizzup> so for the image to work well ootb now we need to check why nokia-modem does not load
<Wizzup> yeah
<arno11> several days needed
<Wizzup> does not load automatically I mean
<arno11> good question
<Wizzup> and swap
<Wizzup> :D
<arno11> for the swap using a basic 1G file works great btw
<Wizzup> I use the emmc swap that fremantle uses
<arno11> only problem: fragmentation
<Wizzup> I think that might be better
<arno11> ok maybe
<Wizzup> since it's a bit faster and usually present
<Wizzup> only reason not to do it is if you fear to kill emmc
<arno11> yes
<arno11> definitly !
<arno11> that's why i prefer basic file
<arno11> low battery ttyl
<Wizzup> :)
<Wizzup> my battery applet says I have about 22 hours left with wifi and modem on
<arno11> :)
arno11 has left #maemo-leste [#maemo-leste]
mro has joined #maemo-leste
maemish_ has joined #maemo-leste
mro has quit [Remote host closed the connection]
mro has joined #maemo-leste
Pali has joined #maemo-leste
rafael2k has joined #maemo-leste
noidea_ has joined #maemo-leste
mro has quit [Remote host closed the connection]
mro has joined #maemo-leste
elastic_dog has joined #maemo-leste
elastic_dog is now known as Guest9423
Guest9423 has quit [Killed (platinum.libera.chat (Nickname regained by services))]
Twig has joined #maemo-leste
norayr has joined #maemo-leste
rafael2k has quit [Remote host closed the connection]
rafael2k has joined #maemo-leste
mro has quit [Remote host closed the connection]
rafael2k has quit [Remote host closed the connection]
rafael2k has joined #maemo-leste
mro has joined #maemo-leste
rafael2k has quit [Ping timeout: 276 seconds]
mro has quit [Ping timeout: 240 seconds]
rafael2k has joined #maemo-leste
rafael2k has quit [Remote host closed the connection]
rafael2k has joined #maemo-leste
arno11 has joined #maemo-leste
mro has joined #maemo-leste
<arno11> Wizzup: i found why modem refuse to load on boot...
<arno11> still blacklisted
<Wizzup> where?
<arno11> in /etc/modprobe.d/nokia-modem.conf
<arno11> and /etc/modprobe.d/nokia-modem.conf.leste
<Wizzup> # cat /etc/modprobe.d/nokia-modem.conf.leste
<Wizzup> options nokia-modem pm=1
<arno11> yep
<Wizzup> that's not a blacklist
<Wizzup> that's just an option for it I think
<arno11> sure
<Wizzup> it has to say 'blacklist' in front of it in /etc/modprobe.d for it to be blacklisted afaik
<arno11> not sure iirc
<arno11> anyway i will try remove this option lol and see
<arno11> back in 10min
arno11 has left #maemo-leste [#maemo-leste]
rafael2k has quit [Ping timeout: 265 seconds]
arno11 has joined #maemo-leste
<arno11> Wizzup: apologies that's the opposite
<arno11> the file is suppose to load the option
<arno11> but it doesn't work
<arno11> with or without same result
mro has quit [Ping timeout: 248 seconds]
<Wizzup> hmm, ok
<Wizzup> we could add it to modules-load.g
<Wizzup> modules-load.d
<Wizzup> unless this is systemd-only
<arno11> back in 20 min
arno11 has left #maemo-leste [#maemo-leste]
arno11 has joined #maemo-leste
Pali has quit [Quit: Pali]
mro has joined #maemo-leste
norayr has left #maemo-leste [Error from remote client]
arno11 has left #maemo-leste [#maemo-leste]
maemish_ has quit [Quit: Connection closed for inactivity]
arno11 has joined #maemo-leste
norayr has joined #maemo-leste
<arno11> Wizzup: 'options nokia-modem pm' is linked with old issues wth ofono on startup.
<arno11> setting up the option after boot to load modem seems the safest
<arno11> according to old leste bug tracker issue
<buZz> oooo update to battery applet?
<arno11> yes
<Wizzup> arno11: I do not understand 'setting up the option after boot to load modem seems the safest'
mro has quit [Remote host closed the connection]
<arno11> i mean loading the option manually or with script
<arno11> after boot
<Wizzup> it might be worth to see if /etc/modules-load.d works
<Wizzup> I don't know how to debug why udev does or does not load a module
<Wizzup> let me try moddep -a
mro has joined #maemo-leste
<Wizzup> didn't help it seems
<arno11> and modules-load.d will not be possible
<Wizzup> why is that?
<arno11> only systemd i think
<Wizzup> ok
<Wizzup> there is /etc/modules
<Wizzup> but it's not a *.d :)
<Wizzup> trying it now
<buZz> does anyone else ever get the battery statusbar icon to 'blink' between 100% full and charging animation?
<Wizzup> I mean, that will happen all the time when you're at full battery
<buZz> i mean, its displaying -both- at the same time
<buZz> maybe at ..2hz?
<Wizzup> when the battery is full, the kernel reporting is nuts
<Wizzup> so anything can happen
<buZz> is that whats making upower misbehave?
<Wizzup> it will switch between charging and discharging many times
<buZz> yeah, thats what pavels patch was about
<Wizzup> yes
<buZz> still gotta try it :)
<Wizzup> the n900 actually used to do this correctly, but I can't get it to do that currently, but maybe that's a calibration problem too
<Wizzup> as in it would report fully charged and just power itself from the usb only
<Wizzup> arno11: looks like it works :)
<Wizzup> arno11: openrc also implements it
<arno11> really ?
<Wizzup> yup
<arno11> well done
<Wizzup> my n900 just asked me for a pin
<Wizzup> I'll put it in leste-config for the n900 then
<arno11> coooooool
<arno11> ;)
<Wizzup> swap will be harder, as there is no /etc/fstab.d
<arno11> true
<arno11> oh i forgot: did you try to use ofono then?
<Wizzup> if it asks for the pin, it means ofono works
<Wizzup> the modem doesn't seem to be online yet atm
<arno11> i asked because if the modem is loaded too early with pm=1 it could cause ofono troubles
<Wizzup> what kind of trouble?
<arno11> segmentfault
<Wizzup> ofono is still running
<Wizzup> onlining the modem usually didn't take this long though
<arno11> maybe have a look in ofonod.log
<Wizzup> yeah, looks like something is off, although it's not a segfault
<arno11> ok
<Wizzup> so to test this we can have kmod depend on ofono, just as a test of course
<Wizzup> then ofono will start before the module is loaded
<Wizzup> but really it sounds like a bug we need to fix in ofono
<arno11> ah good idea
<arno11> yes but it seems to be an issue from the beginning
<Wizzup> I don't even remember what the pm option does
<Wizzup> do we need it still?
<buZz> 'power management' sounds plausible?
<Wizzup> buZz: .. that much is clear
<arno11> it was set to zero at the beginning
<buZz> oh :)
<arno11> yes according to modinfo it is power management
<arno11> and per default it is set to 1
<arno11> so why we need this command to start the modem ?
<Wizzup> I imagine we probably set it to 0 in the past and then just changed the config to 1
<Wizzup> I suppose it might be able to do go
<Wizzup> to go away*
<arno11> i think so
<Wizzup> it won't change the bug at least
<arno11> indeed
<Wizzup> but yeah, this will require a bit of debugging
<Wizzup> there is OFONO_ISI_DEBUG and OFONO_ISI_TRACE for env vars, and indeed we can improve ofono debugging
<Wizzup> maybe it is best to make an issue for this, I won't be able to look at this right now...
<Wizzup> it's plugins/n900.c in ofono
<Wizzup> arno11: what was the old issue you were looking it?
__20h__ has quit [Ping timeout: 252 seconds]
<arno11> bugtracker issue 61 i think
<arno11> with other links
<arno11> time to sleep. i'll have a look on this tomorrow
<Wizzup> gn
<Wizzup> and thanks
<Wizzup> there should be a leste-config now btw
__20h__ has joined #maemo-leste
<arno11> :) gn
arno11 has left #maemo-leste [#maemo-leste]
xmn has quit [Ping timeout: 268 seconds]
mro has quit [Quit: Leaving...]
<Wizzup> lol the ringtone on the n900 for incoming sms comes like 4 seconds after the vibration :D
<Wizzup> when it's in cache it is better
akossh has quit [Quit: Leaving.]