Re: [PATCH v2] power: supply: cros_charge-control: adopt EC charge state on probe

From: Sebastian Reichel

Date: Wed Sep 09 2026 - 18:08:59 EST



On Tue, 25 Aug 2026 07:09:00 -0500, Matt DeVillier wrote:
> The driver previously always forced AUTO with no charge limits at
> probe, which discarded sustainer thresholds and modes set by firmware
> or firmware setup before the kernel loaded.
>
> For command versions that support GET (v2+), read the EC state into
> the driver cache instead. Valid sustainer limits are adopted as AUTO
> with those thresholds: while the sustainer is active the EC may report
> IDLE or DISCHARGE as a transient hold/discharge step, which must not
> be exposed as inhibit-charge or force-discharge. Sustainer off
> (-1/-1) still maps to Linux "no limit" (0/100); other invalid limit
> pairs are remapped the same way with a warning and pushed back to
> the EC so the cache stays in sync.
>
> [...]

Applied, thanks!

[1/1] power: supply: cros_charge-control: adopt EC charge state on probe
commit: 58a5bc61cb7065b52c5b3f537724b1991a88f3ea

Best regards,
--
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>