ec/starlabs: Guard Max Charge in Kconfig
Guard Max Charge EC write in Kconfig so it's only used on platforms that support it. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I7be39cd9543c8253d53070950edc6908a21e864a Reviewed-on: https://review.coreboot.org/c/coreboot/+/62123 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Andy Pont <andy.pont@sdcsystems.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
ad6157ebdf
commit
4d1bf7b847
|
@ -44,6 +44,13 @@ config EC_STARLABS_FAN
|
||||||
help
|
help
|
||||||
Select if the mainboard has a fan.
|
Select if the mainboard has a fan.
|
||||||
|
|
||||||
|
config EC_STARLABS_MAX_CHARGE
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
depends on EC_STARLABS_ITE
|
||||||
|
help
|
||||||
|
Select if the mainboard supports limiting the maximum charge of the battery.
|
||||||
|
|
||||||
config EC_STARLABS_MERLIN
|
config EC_STARLABS_MERLIN
|
||||||
bool "Use open-source Merlin EC Firmware"
|
bool "Use open-source Merlin EC Firmware"
|
||||||
default n
|
default n
|
||||||
|
|
|
@ -130,11 +130,12 @@ static void merlin_init(struct device *dev)
|
||||||
CHARGE_60
|
CHARGE_60
|
||||||
};
|
};
|
||||||
|
|
||||||
ec_write(ECRAM_MAX_CHARGE,
|
if (CONFIG(EC_STARLABS_MAX_CHARGE))
|
||||||
get_ec_value_from_option("max_charge",
|
ec_write(ECRAM_MAX_CHARGE,
|
||||||
0,
|
get_ec_value_from_option("max_charge",
|
||||||
max_charge,
|
0,
|
||||||
ARRAY_SIZE(max_charge)));
|
max_charge,
|
||||||
|
ARRAY_SIZE(max_charge)));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fan Mode
|
* Fan Mode
|
||||||
|
|
|
@ -31,6 +31,7 @@ config BOARD_STARLABS_STARBOOK_TGL
|
||||||
select DRIVERS_INTEL_USB4_RETIMER
|
select DRIVERS_INTEL_USB4_RETIMER
|
||||||
select EC_STARLABS_KBL_LEVELS
|
select EC_STARLABS_KBL_LEVELS
|
||||||
select EC_STARLABS_FAN
|
select EC_STARLABS_FAN
|
||||||
|
select EC_STARLABS_MAX_CHARGE
|
||||||
select EC_STARLABS_NEED_ITE_BIN
|
select EC_STARLABS_NEED_ITE_BIN
|
||||||
select MAINBOARD_HAS_LPC_TPM
|
select MAINBOARD_HAS_LPC_TPM
|
||||||
select MAINBOARD_HAS_TPM2
|
select MAINBOARD_HAS_TPM2
|
||||||
|
|
Loading…
Reference in New Issue