Re: [PATCH 2/2] platform/x86: thinkpad_acpi: Only check charge_start against a known charge_stop

From: Tom Hu

Date: Wed Nov 25 2026 - 07:53:08 EST


Hi Rong, Mark,

Thanks for the reviews.

On 2026-11-24, Rong Zhang wrote:
> A random thought: perhaps initializing charge_stop with 100 could make
> the code cleaner?
Good idea, Since charge_start is already limited to [0, 99] earlier in the
store path, defaulting charge_stop to 100 when GET_STOP is not available makes
the existing `value > charge_stop` check a no-op for such machines, and the extra
stop_support condition is not needed.

The v2 I'm about to send.


On 2026-11-24, Mark Pearson wrote:
> Have you seen this happen on any actual HW?
Not on hardware I have access to; I agree a firmware exposing GET_START but not GET_STOP
is unusual, so the patch is mostly hardening, but the current behaviour (rejecting every charge_start > 0)
is wrong either way, so I think it is worth fixing.

Thanks,
Tom