mb/google/asurada: Implement enable_regulator and regulator_is_enabled
commitdfd5ccee758030350957a821a286eaad07b79eaf
authorYidi Lin <yidi.lin@mediatek.com>
Fri, 23 Oct 2020 08:58:38 +0000 (23 16:58 +0800)
committerHung-Te Lin <hungte@chromium.org>
Wed, 18 Nov 2020 06:13:26 +0000 (18 06:13 +0000)
tree4b9c55cea92af92db70b715049f8a61413d1cd74
parent99e6dd9f74c4d35189b078eda756575e642ca2c7
mb/google/asurada: Implement enable_regulator and regulator_is_enabled

SD Card driver needs to access two regulators - MT6360_LDO5 and
MT6360_LDO3. These two regulators are disabled by default.

Two APIs are implemented:
- mainboard_enable_regulator: Configure the regulator as enabled/disabled.
- mainboard_regulator_is_enabled: Query if the regulator is enabled.

BUG=b:168863056,b:147789962
BRANCH=none
TEST=emerge-asurada coreboot

Change-Id: I391f908fcb33ffdcccc53063644482eabc863ac4
Signed-off-by: Yidi Lin <yidi.lin@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46687
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
src/mainboard/google/asurada/Makefile.inc
src/mainboard/google/asurada/regulator.c
src/soc/mediatek/common/include/soc/regulator.h