From c5d4d964f1728dad5a60d84b8ee0febe0426678b Mon Sep 17 00:00:00 2001 From: Rex-BC Chen Date: Wed, 20 Jul 2022 11:35:57 +0800 Subject: mb/google: Use boolean type for "enable" argument for regulator Because 0 and 1 are the only possible values, 1. Change input argument "enable" of mainboard_enable_regulator to bool. 2. Change return value of mainboard_regulator_is_enabled() to bool. TEST=build pass BUG=b:233720142 Signed-off-by: Bo-Chen Chen Change-Id: Iae09c5fedf8f7394bfbb677e5aee37ed061304fd Reviewed-on: https://review.coreboot.org/c/coreboot/+/65997 Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- src/soc/mediatek/common/include/soc/regulator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/soc/mediatek/common') diff --git a/src/soc/mediatek/common/include/soc/regulator.h b/src/soc/mediatek/common/include/soc/regulator.h index 0acf91059d..2ff122637a 100644 --- a/src/soc/mediatek/common/include/soc/regulator.h +++ b/src/soc/mediatek/common/include/soc/regulator.h @@ -25,7 +25,7 @@ enum mtk_regulator { void mainboard_set_regulator_voltage(enum mtk_regulator regulator, uint32_t voltage_uv); uint32_t mainboard_get_regulator_voltage(enum mtk_regulator regulator); -int mainboard_enable_regulator(enum mtk_regulator regulator, uint8_t enable); -uint8_t mainboard_regulator_is_enabled(enum mtk_regulator regulator); +int mainboard_enable_regulator(enum mtk_regulator regulator, bool enable); +bool mainboard_regulator_is_enabled(enum mtk_regulator regulator); #endif /* SOC_MEDIATEK_COMMON_REGULATOR_H */ -- cgit v1.2.3