Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48954 )
Change subject: soc/mediatek/mt8192: pmic: unlock key protection before initial setting ......................................................................
Patch Set 8: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/48954/8/src/soc/mediatek/mt8192/mt6... File src/soc/mediatek/mt8192/mt6359p.c:
https://review.coreboot.org/c/coreboot/+/48954/8/src/soc/mediatek/mt8192/mt6... PS8, Line 323: if (lock) { : for (int i = 0; i < ARRAY_SIZE(key_protect_setting); i++) : mt6359p_write(key_protect_setting[i].addr, 0); : } else { : for (int i = 0; i < ARRAY_SIZE(key_protect_setting); i++) : mt6359p_write(key_protect_setting[i].addr, key_protect_setting[i].val); : } I'd rather do
for (int i ... mt6359p_write(...addr, lock ? key_protect_settings[i].val : 0);