Re: [RESEND PATCH 1/5] platform/x86: bitland-mifs-wmi: validate WMAA status, never abort suspend
From: KentoNion
Date: Wed Aug 26 2026 - 09:38:25 EST
Hi Ilpo,
On Mon, Aug 24, 2026 at 18:42:43 +0300, Ilpo Järvinen wrote:
> How about using union inside the struct and a type that annotates the
> endianness + endianness accessor to read it here?
Agreed for a global status-word helper. I did not put that in the
TM2424 follow-up on Mingyou v5. On this SKU SET-accepted is the
operation byte 0x80 (XiControl OutData[1]); packed as a 16-bit word
that is the 0x8000 success value Yuming documented. A union +
get_unaligned_le16() belongs in 1/5 so every WMAA call can share it.
> This code makes no sense to me. laptop_profile_get() can return error
> codes so how come can profile be "valid" in that case?
Also agreed: profile_valid as "get returned 0" is a bad name. I
dropped that pattern from the TM2424 patch and left the v5 suspend
hook unchanged. With the TM2424 GET mapping, cmd 0x08 bytes 0x02/03/04/
09/0A are no longer unmapped, so the existing hook should not abort
sleep on this machine. A never-abort change can still go in 1/5 if
you want it globally, with an explicit ret check rather than a
boolean named "valid".
Thanks,
Kento