ec/starlabs/merlin: Add an option to disabled the lid switch

Previously, the lid switch could be set to not wake the system.

Add another option to ignore the switch entirely.

Change-Id: I1dd666a44b332ffbbef4420799eeffd746fd1664
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86305
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Sean Rhodes 2025-02-06 20:16:58 +00:00
commit 0f3589b3d7
3 changed files with 12 additions and 9 deletions

View file

@ -126,11 +126,12 @@ static const struct sm_object kbl_timeout = SM_DECLARE_ENUM({
static const struct sm_object lid_switch = SM_DECLARE_ENUM({
.opt_name = "lid_switch",
.ui_name = "Lid Switch",
.ui_helptext = "Enable or disable the lid switch.",
.ui_helptext = "Configure what opening or closing the lid will do.",
.default_value = 0,
.values = (const struct sm_enum_value[]) {
{ "Enabled", 0 },
{ "Disabled", 1 },
{ "Normal", 0 },
{ "Sleep Only", 1 },
{ "Disabled", 2 },
SM_ENUM_VALUE_END },
});
#endif

View file

@ -108,11 +108,12 @@ static const struct sm_object kbl_timeout = SM_DECLARE_ENUM({
static const struct sm_object lid_switch = SM_DECLARE_ENUM({
.opt_name = "lid_switch",
.ui_name = "Lid Switch",
.ui_helptext = "Enable or disable the lid switch.",
.ui_helptext = "Configure what opening or closing the lid will do.",
.default_value = 0,
.values = (const struct sm_enum_value[]) {
{ "Enabled", 0 },
{ "Disabled", 1 },
{ "Normal", 0 },
{ "Sleep Only", 1 },
{ "Disabled", 2 },
SM_ENUM_VALUE_END },
});
#endif

View file

@ -73,11 +73,12 @@ static const struct sm_object gna = SM_DECLARE_BOOL({
static const struct sm_object lid_switch = SM_DECLARE_ENUM({
.opt_name = "lid_switch",
.ui_name = "Lid Switch",
.ui_helptext = "Enable or disable the lid switch.",
.ui_helptext = "Configure what opening or closing the lid will do.",
.default_value = 0,
.values = (const struct sm_enum_value[]) {
{ "Enabled", 0 },
{ "Disabled", 1 },
{ "Normal", 0 },
{ "Sleep Only", 1 },
{ "Disabled", 2 },
SM_ENUM_VALUE_END },
});
#endif