Use correct interrupt for the charger
The bq25895 was not getting interrupts so the charging cycle was not getting properly started.
This should fix USB C chargers but the still seems to be an issue with BC1.2 on USB2/3.
Merge request reports
Activity
Tested by observing
/sys/class/power_supply/bq25890-charger/status
after plugging and unplugging the cable.On my Birch it's working, but not reliably - sometimes fails to notice a change (and checking the registers directly shows that bq25895 has noticed it).
Edited by Sebastian KrzyszkowiakPlugging in (no change in sysfs):
[ 2595.016689] bq25890-charger 3-006a: S:CHG/PG/VSYS=0/0/0, F:CHG/BOOST/BAT=0/0/0 [ 2595.499537] bq25890-charger 3-006a: S:CHG/PG/VSYS=0/0/0, F:CHG/BOOST/BAT=0/0/0 [ 2595.525598] bq25890-charger 3-006a: S:CHG/PG/VSYS=0/1/1, F:CHG/BOOST/BAT=0/0/0
Unplugging:
[ 2616.206147] bq25890-charger 3-006a: S:CHG/PG/VSYS=0/0/0, F:CHG/BOOST/BAT=0/0/0
Plugging in again (this time sysfs has changed):
[ 2636.028015] bq25890-charger 3-006a: S:CHG/PG/VSYS=0/0/0, F:CHG/BOOST/BAT=0/0/0 [ 2636.520559] bq25890-charger 3-006a: S:CHG/PG/VSYS=0/0/0, F:CHG/BOOST/BAT=0/0/0 [ 2636.536194] bq25890-charger 3-006a: S:CHG/PG/VSYS=0/1/1, F:CHG/BOOST/BAT=0/0/0
Unplugging:
[ 2719.757637] bq25890-charger 3-006a: S:CHG/PG/VSYS=0/0/0, F:CHG/BOOST/BAT=0/0/0
Doesn't seem like there's anything interesting there. Will try some more - happened for me only once today so far, yesterday it was easier to trigger.
@sebastian.krzyszkowiak Do you think this is good to merge ?