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 <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91342
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
Angel Pons 2026-02-18 21:08:32 +01:00
commit d19e5d2550

View file

@ -10,27 +10,19 @@
#include <drivers/option/cfr_frontend.h>
/* 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_ */