Debian Codegraph @

src/ec/starlabs/merlin/cfr.h

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 /*
4 * CFR enums and structs which are used to control EC settings.
5 */
6
7 #include <drivers/option/cfr_frontend.h>
8 #include "ec.h"
9
10 /*
11 * Keyboard Backlight Timeout
12 */
13 static const struct sm_object kbl_timeout = SM_DECLARE_ENUM({
14 .opt_name = "kbl_timeout",
15 .ui_name = "Keyboard Backlight Timeout",
16 .ui_helptext = "Set the amount of time before the keyboard backlight turns off"
17 " when un-used",
18 .default_value = 0,
19 .values = (struct sm_enum_value[]) {
20 { "30 seconds", 0 },
21 { "1 minute", 1 },
22 { "3 minutes", 2 },
23 { "5 minutes", 3 },
24 { "Never", 4 },
25 SM_ENUM_VALUE_END },
26 });
27
28
29 /*
30 * Function-Control Swap
31 */
32 static const struct sm_object fn_ctrl_swap = SM_DECLARE_BOOL({
33 .opt_name = "fn_ctrl_swap",
34 .ui_name = "Fn Ctrl Reverse",
35 .ui_helptext = "Swap the functions of the [Fn] and [Ctrl] keys",
36 .default_value = false,
37 });
38
39 /*
40 * Maximum Battery Charge Level
41 */
42 static const struct sm_object max_charge = SM_DECLARE_ENUM({
43 .opt_name = "max_charge",
44 .ui_name = "Maximum Charge Level",
45 .ui_helptext = "Set the maximum level the battery will charge to.",
46 .default_value = 0,
47 .values = (const struct sm_enum_value[]) {
48 { "100%", 0 },
49 { "80%", 1 },
50 { "60%", 2 },
51 SM_ENUM_VALUE_END },
52 });
53
54 /*
55 * Fan Mode
56 */
57 static const struct sm_object fan_mode = SM_DECLARE_ENUM({
58 .opt_name = "fan_mode",
59 .ui_name = "Fan Mode",
60 .ui_helptext = "Adjust the fan curve to prioritize performance or noise levels.",
61 .default_value = 0,
62 .values = (const struct sm_enum_value[]) {
63 { "Normal", 0 },
64 { "Aggressive", 1 },
65 { "Quiet", 2 },
66 { "Disabled", 3 },
67 SM_ENUM_VALUE_END },
68 });
69
70 /*
71 * Charging Speed
72 */
73 static const struct sm_object charging_speed = SM_DECLARE_ENUM({
74 .opt_name = "charging_speed",
75 .ui_name = "Charging Speed",
76 .ui_helptext = "Set the maximum speed to charge the battery. Charging faster"
77 " will increase heat and battery wear.",
78 .default_value = 1,
79 .values = (const struct sm_enum_value[]) {
80 { "1.0C", 0 },
81 { "0.5C", 1 },
82 { "0.2C", 2 },
83 SM_ENUM_VALUE_END },
84 });
85
86 /*
87 * Lid Switch
88 */
89 static const struct sm_object lid_switch = SM_DECLARE_ENUM({
90 .opt_name = "lid_switch",
91 .ui_name = "Lid Switch",
92 .ui_helptext = "Configure what opening or closing the lid will do.",
93 .default_value = 0,
94 .values = (const struct sm_enum_value[]) {
95 { "Normal", 0 },
96 { "Sleep Only", 1 },
97 { "Disabled", 2 },
98 SM_ENUM_VALUE_END },
99 });
100
101 /*
102 * Power LED Brightness
103 */
104 static const struct sm_object power_led = SM_DECLARE_ENUM({
105 .opt_name = "power_led",
106 .ui_name = "Power LED Brightness",
107 .ui_helptext = "Control the maximum brightness of the power LED",
108 .default_value = 0,
109 .values = (const struct sm_enum_value[]) {
110 { "Normal", 0 },
111 { "Reduced", 1 },
112 { "Off", 2 },
113 SM_ENUM_VALUE_END,
114 },
115 });