Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46405 )
Change subject: soc/mediatek/mt8192: Add board-specific regulator APIs ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46405/1/src/soc/mediatek/common/inc... File src/soc/mediatek/common/include/soc/regulator.h:
https://review.coreboot.org/c/coreboot/+/46405/1/src/soc/mediatek/common/inc... PS1, Line 8: void mainboard_set_vdd1_vol(uint32_t voltage_uv); : void mainboard_set_vdd2_vol(uint32_t voltage_uv); : void mainboard_set_vddq_vol(uint32_t voltage_uv); : void mainboard_set_vmddr_vol(uint32_t voltage_uv); : : uint32_t mainboard_get_vdd1_vol(void); : uint32_t mainboard_get_vdd2_vol(void); : uint32_t mainboard_get_vddq_vol(void); : uint32_t mainboard_get_vmddr_vol(void); I'd rather implement this by enums, e.g.,
enum mtk_regulator { MTK_REGULATOR_VDD1, MTK_REGULATOR_VDD2, MTK_REGULATOR_VDDQ, MTK_REGULATOR_VMDDR, };
void mainboard_set_regulator_vol(enum mtk_regualtor regulator, uint32_t voltage_uv); uint32_t mainboard_get_regulator_vol(enum mtk_regulator regulator);