1.. SPDX-License-Identifier: GPL-2.0-or-later
2
3Kernel driver oxp-sensors
4=========================
5
6Authors:
7    - Derek John Clark <derekjohn.clark@gmail.com>
8    - Joaquín Ignacio Aramendía <samsagax@gmail.com>
9
10Description:
11------------
12
13Handheld devices from OneNetbook, AOKZOE, AYANEO, And OrangePi provide fan
14readings and fan control through their embedded controllers.
15
16Currently supports OneXPlayer devices, AOKZOE, AYANEO, and OrangePi
17handheld devices. AYANEO devices preceding the AIR and OneXPlayer devices
18preceding the Mini A07 are not supportable as the EC model is different
19and do not have manual control capabilities.
20
21Some OneXPlayer and AOKZOE models have a toggle for changing the behaviour
22of the "Turbo/Silent" button of the device. It will change the key event
23that it triggers with a flip of the `tt_toggle` attribute. See below for
24boards that support this function.
25
26Supported devices
27-----------------
28
29Currently the driver supports the following handhelds:
30
31 - AOKZOE A1
32 - AOKZOE A1 PRO
33 - AYANEO 2
34 - AYANEO 2S
35 - AYANEO AIR
36 - AYANEO AIR 1S
37 - AYANEO AIR Plus (Mendocino)
38 - AYANEO AIR Pro
39 - AYANEO Flip DS
40 - AYANEO Flip KB
41 - AYANEO Geek
42 - AYANEO Geek 1S
43 - AYANEO KUN
44 - OneXPlayer 2
45 - OneXPlayer 2 Pro
46 - OneXPlayer AMD
47 - OneXPlayer mini AMD
48 - OneXPlayer mini AMD PRO
49 - OneXPlayer OneXFly
50 - OneXPlayer X1 A
51 - OneXPlayer X1 i
52 - OneXPlayer X1 mini
53 - OrangePi NEO-01
54
55"Turbo/Silent" button behaviour toggle is only supported on:
56 - AOK ZOE A1
57 - AOK ZOE A1 PRO
58 - OneXPlayer 2
59 - OneXPlayer 2 Pro
60 - OneXPlayer mini AMD (only with updated alpha BIOS)
61 - OneXPlayer mini AMD PRO
62 - OneXPlayer OneXFly
63 - OneXPlayer X1 A
64 - OneXPlayer X1 i
65 - OneXPlayer X1 mini
66
67Sysfs entries
68-------------
69
70The following attributes are supported:
71
72fan1_input
73  Read Only. Reads current fan RPM.
74
75pwm1_enable
76  Read Write. Enable manual fan control. Write "1" to set to manual, write "0"
77  to let the EC control de fan speed. Read this attribute to see current status.
78
79pwm1
80  Read Write. Read this attribute to see current duty cycle in the range [0-255].
81  When pwm1_enable is set to "1" (manual) write any value in the range [0-255]
82  to set fan speed.
83
84tt_toggle
85  Read Write. Read this attribute to check the status of the turbo/silent
86  button behaviour function. Write "1" to activate the switch and "0" to
87  deactivate it. The specific keycodes and behaviour is specific to the device
88  both with this function on and off. This attribute is attached to the platform
89  driver and not to the hwmon driver (/sys/devices/platform/oxp-platform/tt_toggle)
90