Skip to content
Snippets Groups Projects

Use correct interrupt for the charger

Merged Angus Ainslie requested to merge angus.ainslie/linux:charger into imx8-current-librem5

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

Pipeline #50565 passed

Pipeline passed for a00e0899 on angus.ainslie:charger

Approval is optional

Merged by Sebastian KrzyszkowiakSebastian Krzyszkowiak 5 years ago (Jan 11, 2020 6:43pm UTC)

Merge details

  • Changes merged into imx8-current-librem5 with a00e0899.
  • Did not delete the source branch.

Pipeline #50739 passed

Pipeline passed for a00e0899 on imx8-current-librem5

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 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 Krzyszkowiak
  • Can you enable the bq25895 dynamic debug so we can see the state changes

    echo 'file bq25890_charger.c +p' | sudo tee /sys/kernel/debug/dynamic_debug/control
  • Plugging 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.

  • Wait, the comment above might be just noise - haven't actually checked in sysfs, just in GNOME Settings and seems like it also can get out of sync with what sysfs reports :/

    Will try some more.

  • This likely was my mistake. Will keep an eye still, but let's get this in now, as it surely doesn't make things worse :)

  • @sebastian.krzyszkowiak Do you think this is good to merge ?

  • I think so? I have used it for a few days already.

  • Ok I haven't seen it go out of sync with sysfs but either way it should be an improvement.

Please register or sign in to reply
Loading