From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Sebastian Reichel <sre@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: Re: [PATCH 3/4] power: supply: mm8013: implement POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR_AVAILABLE
Date: Mon, 5 Feb 2024 12:21:45 +0100 [thread overview]
Message-ID: <569bbc9f-1c34-40c1-a563-e7f6aecf63d5@t-8ch.de> (raw)
In-Reply-To: <2f244f9f-8796-4cad-8bf8-d0c3411588c1@redhat.com>
On 2024-02-05 11:00:01+0100, Hans de Goede wrote:
> Hi,
>
> On 2/4/24 18:26, Thomas Weißschuh wrote:
> > The sysfs is documented to report both the current and all available
> > behaviours. For this POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR_AVAILABLE needs
> > to be implemented.
> >
> > Note that this changes the format of the sysfs file
> > (to the documented format):
> >
> > Before: "auto"
> > After: "[auto] inhibit-charge"
> >
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>
> Changing userspace API like this is never ideal, but given how
> new the mm8013 driver is and that this brings things inline
> with the docs I think that this should be fine:
I agree that it's unfortunate.
However looking at the datasheet [0] it seems to me the driver is
not correctly using the API.
Page 23 documents the flag CHG_INH as follows:
CHG_INH : Charge Inhibit When the current is more than or equal to charge
threshold current,
charge inhibit temperature (upper/lower limit) :1
charge permission temperature or the current is
less than charge threshold current :0
This is only diagnostic information and not a control-knob, which the API
was meant for.
So POWER_SUPPLY_STATUS_NOT_CHARGING seems like the better match.
> [..]
Thomas
[0] https://product.minebeamitsumi.com/en/product/category/ics/battery/fuel_gauge/parts/download/__icsFiles/afieldfile/2023/07/12/1_download_01_12.pdf
next prev parent reply other threads:[~2024-02-05 11:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-04 17:26 [PATCH 0/4] power: supply: core: align charge_behaviour format with docs Thomas Weißschuh
2024-02-04 17:26 ` [PATCH 1/4] power: supply: core: fix charge_behaviour formatting Thomas Weißschuh
2024-02-05 9:52 ` Hans de Goede
2024-02-05 11:43 ` Hans de Goede
2024-02-19 23:19 ` Sebastian Reichel
2024-02-04 17:26 ` [PATCH 2/4] power: supply: test-power: implement charge_behaviour property Thomas Weißschuh
2024-02-05 9:59 ` Hans de Goede
2024-02-04 17:26 ` [PATCH 3/4] power: supply: mm8013: implement POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR_AVAILABLE Thomas Weißschuh
2024-02-05 10:00 ` Hans de Goede
2024-02-05 11:21 ` Thomas Weißschuh [this message]
2024-02-12 13:22 ` Konrad Dybcio
2024-02-05 11:41 ` Konrad Dybcio
2024-02-04 17:26 ` [PATCH 4/4] power: supply: core: drop workaround for missing POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR_AVAILABLE Thomas Weißschuh
2024-02-05 9:58 ` Hans de Goede
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=569bbc9f-1c34-40c1-a563-e7f6aecf63d5@t-8ch.de \
--to=linux@weissschuh.net \
--cc=hdegoede@redhat.com \
--cc=konradybcio@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=sre@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
all inboxes | Powered by JetHome®