diff options
author | Rex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com> | 2021-07-16 20:04:26 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-07-21 15:46:53 +0000 |
commit | 86c50e11ced7d7e3ae62b90a4a0dcdae8d740247 (patch) | |
tree | 21cc1222df5db7a4cb8dcc166eef2984b9614e61 /src/mainboard | |
parent | cd67657dea6e4c5ca1f068ebf16623924e1b001d (diff) |
soc/mediatek/mt8195: modify mt6360 interface
With the new definition of mt6360_regulator_id,
merge the MT6360 LDO and PMIC interfaces into one.
Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I7ccc32cb0a9481d5f55349c152267a44fe09d20a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56435
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/cherry/mainboard.c | 4 | ||||
-rw-r--r-- | src/mainboard/google/cherry/regulator.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mainboard/google/cherry/mainboard.c b/src/mainboard/google/cherry/mainboard.c index 21ab24c58a..76aa59b5bb 100644 --- a/src/mainboard/google/cherry/mainboard.c +++ b/src/mainboard/google/cherry/mainboard.c @@ -127,8 +127,8 @@ static void configure_sdcard(void) mtk_i2c_bus_init(7); mt6360_init(7); - mt6360_ldo_enable(MT6360_LDO3, 1); - mt6360_ldo_enable(MT6360_LDO5, 1); + mt6360_enable(MT6360_LDO3, 1); + mt6360_enable(MT6360_LDO5, 1); } /* Set up backlight control pins as output pin and power-off by default */ diff --git a/src/mainboard/google/cherry/regulator.c b/src/mainboard/google/cherry/regulator.c index b59a643069..0c1f7feb05 100644 --- a/src/mainboard/google/cherry/regulator.c +++ b/src/mainboard/google/cherry/regulator.c @@ -57,7 +57,7 @@ void mainboard_set_regulator_vol(enum mtk_regulator regulator, id = get_mt6360_regulator_id(regulator); if (id >= 0) { - mt6360_pmic_set_voltage(id, voltage_uv); + mt6360_set_voltage(id, voltage_uv); return; } @@ -85,7 +85,7 @@ uint32_t mainboard_get_regulator_vol(enum mtk_regulator regulator) id = get_mt6360_regulator_id(regulator); if (id >= 0) - return mt6360_pmic_get_voltage(id); + return mt6360_get_voltage(id); id = get_mt6359p_regulator_id(regulator); if (id >= 0) @@ -113,7 +113,7 @@ int mainboard_enable_regulator(enum mtk_regulator regulator, uint8_t enable) id = get_mt6360_regulator_id(regulator); if (id >= 0) { - mt6360_pmic_enable(id, enable); + mt6360_enable(id, enable); return 0; } @@ -131,7 +131,7 @@ uint8_t mainboard_regulator_is_enabled(enum mtk_regulator regulator) id = get_mt6360_regulator_id(regulator); if (id >= 0) - return mt6360_pmic_is_enabled(id); + return mt6360_is_enabled(id); printk(BIOS_ERR, "Failed to query regulator ID: %d\n; assuming disabled", |