1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
From 93e574a0a913b2d982d10aab50f372f59e41ba8c Mon Sep 17 00:00:00 2001
From: Matt DeVillier <matt.devillier@gmail.com>
Date: Fri, 11 Jul 2025 16:09:08 -0500
Subject: [PATCH 36/43] ec/lenovo/pmh7: Add CFR objects for existing options
Add a header with CFR objects for existing configuration options,
so that supported boards can make use of them without duplication.
TEST=build/boot lenovo/t480 w/edk2 payload
Change-Id: I8f5c335a8b9d1697b77b3c3542bd96f98583dbf6
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
---
src/ec/lenovo/pmh7/cfr.h | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 src/ec/lenovo/pmh7/cfr.h
diff --git a/src/ec/lenovo/pmh7/cfr.h b/src/ec/lenovo/pmh7/cfr.h
new file mode 100644
index 0000000000..329fb56a3e
--- /dev/null
+++ b/src/ec/lenovo/pmh7/cfr.h
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+/*
+ * CFR enums and structs for Lenovo PMH7 EC
+ */
+
+#ifndef _LENOVO_PMH7_CFR_H_
+#define _LENOVO_PMH7_CFR_H_
+
+#include <drivers/option/cfr_frontend.h>
+
+/* Touchpad */
+static const struct sm_object touchpad = SM_DECLARE_ENUM({
+ .opt_name = "touchpad",
+ .ui_name = "Touchpad",
+ .ui_helptext = "Enable or disable the touchpad",
+ .default_value = 1,
+ .values = (const struct sm_enum_value[]) {
+ { "Disabled", 0 },
+ { "Enabled", 1 },
+ SM_ENUM_VALUE_END },
+});
+
+/* Trackpoint */
+static const struct sm_object trackpoint = SM_DECLARE_ENUM({
+ .opt_name = "trackpoint",
+ .ui_name = "Trackpoint",
+ .ui_helptext = "Enable or disable the trackpoint",
+ .default_value = 1,
+ .values = (const struct sm_enum_value[]) {
+ { "Disabled", 0 },
+ { "Enabled", 1 },
+ SM_ENUM_VALUE_END },
+});
+
+#endif /* _LENOVO_PMH7_CFR_H_ */
--
2.39.5
|