From: Mario Limonciello <mario.limonciello@amd.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
"Dustin Howett" <dustin@howett.net>
Cc: Benson Leung <bleung@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
Sebastian Reichel <sre@kernel.org>, Lee Jones <lee@kernel.org>,
chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org,
Stephen Horvath <s.horvath@outlook.com.au>,
Rajas Paranjpe <paranjperajas@gmail.com>
Subject: Re: [PATCH v2 0/3] ChromeOS Embedded Controller charge control driver
Date: Wed, 5 Jun 2024 15:32:33 -0500 [thread overview]
Message-ID: <db20a640-5323-4866-9968-c57391fbb6bc@amd.com> (raw)
In-Reply-To: <a527a3fd-1458-43cc-aac0-0b360beeb349@t-8ch.de>
On 6/5/2024 04:33, Thomas Weißschuh wrote:
> On 2024-06-04 20:27:57+0000, Dustin Howett wrote:
>> On Mon, Jun 3, 2024 at 3:59 PM Thomas Weißschuh <linux@weissschuh.net> wrote:
>>>
>>> Can you try disabling all of the Framework-specific charge control
>>> settings and test again?
>>> Probably the different, disparate logics in the Framework ECs are
>>> conflicting with each other.
>>
>> Fascinating! This board does indeed support charge limiting through
>> both interfaces. It looks like the most recently set one wins for a
>> time.
>
> If it is the most recent one, shouldn't the driver have worked?
> What does "for a time" mean?
> I'm using only the upstream EC command and that seems to work fine.
>
>> The UEFI setup utility only sets the framework-specific charge limit value.
>>
>> We should probably find some way to converge them, for all of the
>> supported Framework Laptop programs.
>
> In the long term, Framework should align their implementation with
> upstream CrOS EC and either drop their custom command or make it a thin
> wrapper around the normal the upstream command.
>
> (As you are familiar with EC programming maybe you want to tackle this?)
>
> Until then I think we can detect at probe-time if the Framework APIs are
> available and use them to disable the Framework-specific mechanism.
> Then the CrOS EC commands should be usable.
>
> The drawback is, that userspace using the Framework APIs will break
> the driver. That userspace would need to migrate to the standard UAPI.
How does userspace access the Framework APIs? Surely it needs to go
through the kernel? Could you "filter" the userspace calls to block them?
For example this is something that currently happens in the dell-pc
driver to block userspace from doing thermal calls and instead guide
people to the proper API that the driver exports.
>
> Also the settings set in the firmware would be ignored at that point.
>
> I don't want to use the functionality of the Framework command because
> it's less featureful and I really hope it will go away at some point.
next prev parent reply other threads:[~2024-06-05 20:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 20:04 Thomas Weißschuh
2024-05-28 20:04 ` [PATCH v2 1/3] platform/chrome: Update binary interface for EC-based charge control Thomas Weißschuh
2024-06-03 1:38 ` Tzung-Bi Shih
2024-05-28 20:04 ` [PATCH v2 2/3] power: supply: add ChromeOS EC based charge control driver Thomas Weißschuh
2024-06-05 22:14 ` Sebastian Reichel
2024-05-28 20:04 ` [PATCH v2 3/3] mfd: cros_ec: Register charge control subdevice Thomas Weißschuh
2024-05-31 15:50 ` (subset) " Lee Jones
2024-06-14 9:03 ` Lee Jones
2024-06-02 23:40 ` [PATCH v2 0/3] ChromeOS Embedded Controller charge control driver Dustin Howett
2024-06-03 20:59 ` Thomas Weißschuh
2024-06-05 1:27 ` Dustin Howett
2024-06-05 9:33 ` Thomas Weißschuh
2024-06-05 20:32 ` Mario Limonciello [this message]
2024-06-06 6:25 ` Thomas Weißschuh
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=db20a640-5323-4866-9968-c57391fbb6bc@amd.com \
--to=mario.limonciello@amd.com \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=dustin@howett.net \
--cc=groeck@chromium.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=paranjperajas@gmail.com \
--cc=s.horvath@outlook.com.au \
--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®