From 4d1bf7b847c400dfd3fd0cd56cd57e49b766843a Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Thu, 17 Feb 2022 13:55:34 +0000 Subject: 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 Change-Id: I7be39cd9543c8253d53070950edc6908a21e864a Reviewed-on: https://review.coreboot.org/c/coreboot/+/62123 Tested-by: build bot (Jenkins) Reviewed-by: Andy Pont Reviewed-by: Angel Pons --- src/ec/starlabs/merlin/ec.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/ec/starlabs/merlin/ec.c') diff --git a/src/ec/starlabs/merlin/ec.c b/src/ec/starlabs/merlin/ec.c index 40be138a82..e8eaa229d7 100644 --- a/src/ec/starlabs/merlin/ec.c +++ b/src/ec/starlabs/merlin/ec.c @@ -130,11 +130,12 @@ static void merlin_init(struct device *dev) CHARGE_60 }; - ec_write(ECRAM_MAX_CHARGE, - get_ec_value_from_option("max_charge", - 0, - max_charge, - ARRAY_SIZE(max_charge))); + if (CONFIG(EC_STARLABS_MAX_CHARGE)) + ec_write(ECRAM_MAX_CHARGE, + get_ec_value_from_option("max_charge", + 0, + max_charge, + ARRAY_SIZE(max_charge))); /* * Fan Mode -- cgit v1.2.3