linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sicelo <absicsz@gmail.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: linux-pm@vger.kernel.org, maemo-leste@lists.dyne.org, pali@kernel.org
Subject: Re: [PATCH] power: supply: bq2415x_charger: report online status
Date: Tue, 27 Feb 2024 23:34:54 +0200	[thread overview]
Message-ID: <Zd5VflcLb3Es1xiJ@tp440p.steeds.sam> (raw)
In-Reply-To: <6slfmvqmtawwjlsobcfod6ewcjjbzmylz3owsdamdi4dod55wr@iiox5rzjj5ht>

Hi Sebastian

On Tue, Feb 27, 2024 at 09:11:36PM +0100, Sebastian Reichel wrote:
> Hi,
> 
> On Mon, Feb 26, 2024 at 09:44:32PM +0200, Sicelo A. Mhlongo wrote:
> > Provide the Online property. This chip does not have specific flags to
> > indicate the presence of an input voltage, but this can be inferred from
> > the reported charging status.
> 
> The datasheet suggests, that you can get the status from the fault
> bits:
> 
> 011 - Poor input source or VBUS < UVLO
> 
Absolutely, yes. This particular state, which is a fault condition, clearly
indicates VBUS is present.

However, when there are no faults at all, then those bits always read
`000`. On a running system, one can check this by connecting and
disconnecting a charger (Nokia N900 used in my tests) while watching
/sys/class/power_supply/bq24150a-0/registers. Only bit 4 changes state.
In other words, the fault bits do not appear to be enough to determine
the presence of an input voltage.

However, looking at them more closely seems to suggest I should respin the
patch to also report VBUS online if a fault is reported instead of only
during charging and charge full states.

Please let me know if this sounds correct, or if I misunderstood your
reply.

Sincerely
Sicelo

  reply	other threads:[~2024-02-27 21:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 19:44 [PATCH] power: supply: bq2415x_charger: report online status Sicelo A. Mhlongo
2024-02-27 20:11 ` Sebastian Reichel
2024-02-27 21:34   ` Sicelo [this message]
2024-02-28  0:00     ` Sebastian Reichel
2024-02-28  7:09       ` Sicelo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zd5VflcLb3Es1xiJ@tp440p.steeds.sam \
    --to=absicsz@gmail.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=maemo-leste@lists.dyne.org \
    --cc=pali@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).