From 93e574a0a913b2d982d10aab50f372f59e41ba8c Mon Sep 17 00:00:00 2001 From: Matt DeVillier 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 --- 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 + +/* 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