summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/ptn3460/ptn3460.c
diff options
context:
space:
mode:
authorJan Samek <jan.samek@siemens.com>2023-01-31 14:09:30 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-03-03 17:07:23 +0000
commita3b29d7bd0ed2b30824ef8babe03aaea85294f05 (patch)
tree548d87434d40ea5e72f118a16c36a36342c94375 /src/drivers/i2c/ptn3460/ptn3460.c
parent70089e9814b91cd2a890599aac0bb8c1f141b6c2 (diff)
drv/i2c/ptn3460: Add 'mainboard' prefix to mainboard-level callbacks
As discused earlier, the callback name 'mb_adjust_cfg' was considered too generic. The new naming is chosen to be consistent with other drivers' callback names designed to be used at mainboard level. Also other functions, namely 'mb_get_edid' and 'mb_select_edid_table' are renamed accordingly. BUG=none TEST=Builds for siemens/mc_apl{1,4,5,7} and siemens/mc_ehl boards complete successfully. Change-Id: I4cbec0e72e5f03e94df0faa36765d1a6cd873a7a Signed-off-by: Jan Samek <jan.samek@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72629 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Diffstat (limited to 'src/drivers/i2c/ptn3460/ptn3460.c')
-rw-r--r--src/drivers/i2c/ptn3460/ptn3460.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/drivers/i2c/ptn3460/ptn3460.c b/src/drivers/i2c/ptn3460/ptn3460.c
index d2df04d216..7dee2222a0 100644
--- a/src/drivers/i2c/ptn3460/ptn3460.c
+++ b/src/drivers/i2c/ptn3460/ptn3460.c
@@ -76,13 +76,13 @@ static void ptn3460_init(struct device *dev)
}
/* Mainboard provides EDID data. */
- if (mb_get_edid(edid_data) != CB_SUCCESS) {
+ if (mainboard_ptn3460_get_edid(edid_data) != CB_SUCCESS) {
printk(BIOS_ERR, "PTN3460 error: Unable to get EDID data from mainboard.\n");
return;
}
/* Mainboard decides which EDID table has to be used. */
- edid_tab = mb_select_edid_table();
+ edid_tab = mainboard_ptn3460_select_edid_table();
if (edid_tab > PTN_MAX_EDID_NUM) {
printk(BIOS_ERR, "PTN3460 error: invalid EDID table (%d) selected.\n",
edid_tab);
@@ -108,7 +108,7 @@ static void ptn3460_init(struct device *dev)
}
/* Mainboard can modify the configuration data.
Write back configuration data to PTN3460 if modified by mainboard */
- if (mb_adjust_cfg(&cfg) == CB_SUCCESS) {
+ if (mainboard_ptn3460_config(&cfg) == CB_SUCCESS) {
ptr = (uint8_t *)&cfg;
for (i = 0; i < sizeof(struct ptn_3460_config); i++) {
val = i2c_dev_writeb_at(dev, PTN_CONFIG_OFF + i, *ptr++);
@@ -123,15 +123,15 @@ static void ptn3460_init(struct device *dev)
init_done = true;
}
-__weak enum cb_err mb_get_edid(uint8_t edid_data[PTN_EDID_LEN])
+__weak enum cb_err mainboard_ptn3460_get_edid(uint8_t edid_data[PTN_EDID_LEN])
{
return CB_ERR;
}
-__weak uint8_t mb_select_edid_table(void)
+__weak uint8_t mainboard_ptn3460_select_edid_table(void)
{
return 0;
}
-__weak enum cb_err mb_adjust_cfg(struct ptn_3460_config *cfg_ptr)
+__weak enum cb_err mainboard_ptn3460_config(struct ptn_3460_config *cfg_ptr)
{
return CB_ERR;
}