]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86: oxpec: Add turbo led support to X1 devices
authorAntheas Kapenekakis <lkml@antheas.dev>
Fri, 25 Apr 2025 11:18:12 +0000 (13:18 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 30 Apr 2025 11:05:33 +0000 (14:05 +0300)
commit50623acafb6b1d7b66138dbed7aa0c0c170d9e4b
treec48f4ff75f76663f2a3132cb79d8ec8cbef0fdb2
parentb72e0b671ddff48d2fb59e082a9e7f8ada6d7d69
platform/x86: oxpec: Add turbo led support to X1 devices

The X1 and X1 mini lineups feature an LED nested within their turbo
button. When turbo takeover is not enabled, the turbo button allows
the device to switch from 18W to 25W TDP. When the device is in the
25W TDP mode, the LED is turned on.

However, when we engage turbo takeover, the turbo led remains on its
last state, which might be illuminated and cannot be currently
controlled. Therefore, add the register that controls it under sysfs,
to allow userspace to turn it off once engaging turbo takeover and then
control it as they wish.

2024 OneXPlayer devices, other than the X1s, do not have a turbo LED.
However, earlier models do, so this can be extended to them as well
when the register for it is found.

Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://lore.kernel.org/r/20250425111821.88746-8-lkml@antheas.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/oxpec.c