From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v3] power: Make power_supply_am_i_supplied return -ENODEV if there are no suppliers
Date: Mon, 1 May 2017 13:28:34 +0200 [thread overview]
Message-ID: <20170501112834.n3k7jyp4imnrb6wa@earth> (raw)
In-Reply-To: <20170416153031.11531-1-hdegoede@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]
Hi,
On Sun, Apr 16, 2017 at 05:30:31PM +0200, Hans de Goede wrote:
> It is sensible to assume that the hardware actually always has a
> way of charging the battery so when power_supply_am_i_supplied does not
> find any suppliers, that does not mean that there are none, but simply
> that no power_supply-drivers are registered / bound for any suppliers for
> the supply calling power_supply_am_i_supplied.
>
> At which point a fuel-gauge driver calling power_supply_am_i_supplied()
> cannot determine whether the battery is being charged or not.
>
> Allow a caller of power_supply_am_i_supplied to differentiate between
> there not being any suppliers, vs no suppliers being online by returning
> -ENODEV if there are no suppliers matching supplied_to / supplied_from,
> which allows fuel-gauge drivers to return POWER_SUPPLY_STATUS_UNKNOWN
> rather then POWER_SUPPLY_STATUS_DISCHARGING if there are no suppliers.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Thanks, queued.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2017-05-01 11:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-16 15:30 [PATCH v3] power: Make power_supply_am_i_supplied return -ENODEV if there are no suppliers Hans de Goede
2017-04-16 17:33 ` Krzysztof Kozlowski
2017-05-01 11:28 ` Sebastian Reichel [this message]
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=20170501112834.n3k7jyp4imnrb6wa@earth \
--to=sebastian.reichel@collabora.co.uk \
--cc=b.zolnierkie@samsung.com \
--cc=hdegoede@redhat.com \
--cc=krzk@kernel.org \
--cc=linux-pm@vger.kernel.org \
/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