summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/oxpec.c
diff options
context:
space:
mode:
authorAntheas Kapenekakis <lkml@antheas.dev>2025-11-19 18:45:03 +0100
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2025-11-21 17:36:19 +0200
commite921a8b4dea50b9c20f1ee9b2b69cedc00b7570a (patch)
tree2ad59fd59d612819a24e85fc27a9126f38963407 /drivers/platform/x86/oxpec.c
parent6d710ec3584227a9c393c478b1cd4a70e74a3c88 (diff)
platform/x86: ayaneo-ec: Add controller power and modules attributes
The Ayaneo 3 features hot-swappable controller modules. The ejection and management is done through HID. However, after ejecting the modules, the controller needs to be power cycled via the EC to re-initialize. For this, the EC provides a variable that holds whether the left or right modules are connected, and a power control register to turn the controller on or off. After ejecting the modules, the controller should be turned off. Then, after both modules are reinserted, the controller may be powered on again to re-initialize. This patch introduces two new sysfs attributes: - `controller_modules`: a read-only attribute that indicates whether the left and right modules are connected (none, left, right, both). - `controller_power`: a read-write attribute that allows the user to turn the controller on or off (with '1'/'0'). Therefore, after ejection is complete, userspace can power off the controller, then wait until both modules have been reinserted (`controller_modules` will return 'both') to turn on the controller. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> Link: https://patch.msgid.link/20251119174505.597218-5-lkml@antheas.dev Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/oxpec.c')
0 files changed, 0 insertions, 0 deletions