platform/x86: alienware-wmi-wmax: Improve ID processing
authorKurt Borja <kuurtb@gmail.com>
Sat, 29 Mar 2025 07:32:19 +0000 (04:32 -0300)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 11 Apr 2025 10:04:38 +0000 (13:04 +0300)
commita000da9dbc249642233587a80df03130e8983d10
tree248e918127a82704f38915dfbada4499bd7098d9
parent8a1a0fb55f8a8e482314d2769a9cac0703016fd4
platform/x86: alienware-wmi-wmax: Improve ID processing

Rename AWCC_SENSOR_ID_MASK to AWCC_SENSOR_ID_FLAG and reorder the ID
processing defines in a more logical manner. Then replace their use in
bitwise operations with FIELD_GET().

The latter also involves dropping the AWCC_SENSOR_ID_FLAG check inside
is_awcc_thermal_mode() in favor of extracting the first byte out of IDs
obtained with AWCC_OP_GET_RESOURCE_ID. This is also a requirement to add
support for Alienware Aurora desktops.

While at it, also rename is_awcc_thermal_mode() to
is_awcc_thermal_profile_id().

Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20250329-hwm-v7-2-a14ea39d8a94@gmail.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/dell/alienware-wmi-wmax.c