From d19e5d2550b1182b89ae4310ee5afa33fb27d81a Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Wed, 18 Feb 2026 21:08:32 +0100 Subject: [PATCH] ec/lenovo/pmh7: Replace CFR enums with booleans Boolean options are intended to represent generic "Enable"/"Disable" options, but without enum options' extra bloat in the CFR structures. Change-Id: I3c73f289271eb4bba899bbfe9d3036171cb31d7b Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/91342 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/ec/lenovo/pmh7/cfr.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/ec/lenovo/pmh7/cfr.h b/src/ec/lenovo/pmh7/cfr.h index 329fb56a3e..bda05edeea 100644 --- a/src/ec/lenovo/pmh7/cfr.h +++ b/src/ec/lenovo/pmh7/cfr.h @@ -10,27 +10,19 @@ #include /* Touchpad */ -static const struct sm_object touchpad = SM_DECLARE_ENUM({ +static const struct sm_object touchpad = SM_DECLARE_BOOL({ .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 }, + .default_value = true, }); /* Trackpoint */ -static const struct sm_object trackpoint = SM_DECLARE_ENUM({ +static const struct sm_object trackpoint = SM_DECLARE_BOOL({ .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 }, + .default_value = true, }); #endif /* _LENOVO_PMH7_CFR_H_ */