From: "Wang, Crag" <Crag.Wang@dell.com>
To: Sebastian Reichel <sre@kernel.org>, Crag Wang <crag0715@gmail.com>
Cc: "mathewk@chromium.org" <mathewk@chromium.org>,
"Limonciello, Mario" <Mario.Limonciello@dell.com>,
"campello@google.com" <campello@google.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH RESEND 1/1] power_supply: wilco_ec: Add permanent long life charging mode
Date: Tue, 28 Jul 2020 06:48:04 +0000 [thread overview]
Message-ID: <MN2PR19MB32808EA057889F61C063DB4CE3730@MN2PR19MB3280.namprd19.prod.outlook.com> (raw)
In-Reply-To: <20200727233414.xu5eqyes76a5hpkw@earth.universe>
> > + Permanent Long Life: Last longer battery life, this mode
> > + is programmed once in the factory. Switching to a
> > + different mode is unavailable.
>
> The documentation lacks one important aspect: What happens if I have a
> device where the factory did not program "Long Life"?
> I.e. what happens when
>
> # cat /sys/class/power_supply/wilco-charger/charge_type
> Standard
> # echo "Long Life" > /sys/class/power_supply/wilco-charger/charge_type
>
> Will the controller switch into permanent long life battery mode without any
> exit strategy?
>
The set_property attempt will convert "Long Life" to its index of charge mode
and send a EC command to Property ID 0x0710 for configuration. This try will be
denied by EC because "Long Life" mode must be set (enable/disable) through a
different PID that isn't publicly known. In the factory there's a proprietary tool
in use for PLL configuration.
In above example after the run the charge mode will remain unchanged i.e.:
"Standard".
> > What: /sys/class/power_supply/wilco-
> charger/charge_control_start_threshold
> > Date: April 2019
> > diff --git a/drivers/power/supply/power_supply_sysfs.c
> > b/drivers/power/supply/power_supply_sysfs.c
> > index bc79560229b5..af3884015ad8 100644
> > --- a/drivers/power/supply/power_supply_sysfs.c
> > +++ b/drivers/power/supply/power_supply_sysfs.c
> > @@ -87,6 +87,7 @@ static const char * const
> POWER_SUPPLY_CHARGE_TYPE_TEXT[] = {
> > [POWER_SUPPLY_CHARGE_TYPE_STANDARD] = "Standard",
> > [POWER_SUPPLY_CHARGE_TYPE_ADAPTIVE] = "Adaptive",
> > [POWER_SUPPLY_CHARGE_TYPE_CUSTOM] = "Custom",
> > + [POWER_SUPPLY_CHARGE_TYPE_LONGLIFE] = "Permanent Long
> Life",
>
> The "Permanent" part is specific to the Wilco EC, so I think it's better to avoid
> it in the generic API. I think it's better to use just "Long Life" (and keep the
> wilco specific sysfs Documentation, that Long Life configuration is
> permanent).
Agree with you, I will include this modification in the next patch.
>
> -- Sebastian
>
next prev parent reply other threads:[~2020-07-28 6:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-15 14:55 Crag Wang
2020-07-27 23:34 ` Sebastian Reichel
2020-07-28 6:48 ` Wang, Crag [this message]
2020-07-30 3:26 ` [PATCH v2 1/1] power_supply: wilco_ec: Add " Crag Wang
2020-07-31 13:30 ` Sebastian Reichel
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=MN2PR19MB32808EA057889F61C063DB4CE3730@MN2PR19MB3280.namprd19.prod.outlook.com \
--to=crag.wang@dell.com \
--cc=Mario.Limonciello@dell.com \
--cc=campello@google.com \
--cc=crag0715@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mathewk@chromium.org \
--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®