mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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>
20 lines
779 B
Plaintext
20 lines
779 B
Plaintext
What: /sys/devices/platform/ayaneo-ec/controller_power
|
|
Date: Nov 2025
|
|
KernelVersion: 6.19
|
|
Contact: "Antheas Kapenekakis" <lkml@antheas.dev>
|
|
Description:
|
|
Current controller power state. Allows turning on and off
|
|
the controller power (e.g. for power savings). Write 1 to
|
|
turn on, 0 to turn off. File is readable and writable.
|
|
|
|
What: /sys/devices/platform/ayaneo-ec/controller_modules
|
|
Date: Nov 2025
|
|
KernelVersion: 6.19
|
|
Contact: "Antheas Kapenekakis" <lkml@antheas.dev>
|
|
Description:
|
|
Shows which controller modules are currently connected to
|
|
the device. Possible values are "left", "right" and "both".
|
|
File is read-only. The Windows software for this device
|
|
will only set controller power to 1 if both module sides
|
|
are connected (i.e. this file returns "both").
|