coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ptn3460.c File Reference
#include <console/console.h>
#include <device/i2c_bus.h>
#include <types.h>
#include "ptn3460.h"
Include dependency graph for ptn3460.c:

Go to the source code of this file.

Functions

static int ptn_select_edid (struct device *dev, uint8_t edid_num)
 This function selects one of 7 EDID-tables inside PTN3460 which should be emulated on display port and turn emulation ON. More...
 
static int ptn3460_write_edid (struct device *dev, u8 edid_num, u8 *data)
 This function writes one EDID data structure to PTN3460. More...
 
static void ptn3460_init (struct device *dev)
 This function sets up the DP2LVDS-converter to be used with the appropriate EDID data. More...
 
__weak enum cb_err mb_get_edid (uint8_t edid_data[0x80])
 
__weak uint8_t mb_select_edid_table (void)
 
__weak int mb_adjust_cfg (struct ptn_3460_config *cfg_ptr)
 
static void ptn3460_enable (struct device *dev)
 

Variables

static struct device_operations ptn3460_ops
 
struct chip_operations drivers_i2c_ptn3460_ops
 

Function Documentation

◆ mb_adjust_cfg()

__weak int mb_adjust_cfg ( struct ptn_3460_config cfg_ptr)

Definition at line 122 of file ptn3460.c.

Referenced by ptn3460_init().

Here is the caller graph for this function:

◆ mb_get_edid()

__weak enum cb_err mb_get_edid ( uint8_t  edid_data[0x80])

Definition at line 114 of file ptn3460.c.

References CB_ERR.

Referenced by ptn3460_init().

Here is the caller graph for this function:

◆ mb_select_edid_table()

__weak uint8_t mb_select_edid_table ( void  )

Definition at line 118 of file ptn3460.c.

Referenced by ptn3460_init().

Here is the caller graph for this function:

◆ ptn3460_enable()

static void ptn3460_enable ( struct device dev)
static

Definition at line 133 of file ptn3460.c.

◆ ptn3460_init()

static void ptn3460_init ( struct device dev)
static

This function sets up the DP2LVDS-converter to be used with the appropriate EDID data.

Parameters
*devPointer to the I2C controller where PTN3460 is attached

Definition at line 62 of file ptn3460.c.

References BIOS_ERR, CB_SUCCESS, i2c_dev_readb_at(), i2c_dev_writeb_at(), mb_adjust_cfg(), mb_get_edid(), mb_select_edid_table(), printk, ptn3460_write_edid(), PTN_CFG_MODIFIED, PTN_CONFIG_OFF, PTN_EDID_LEN, PTN_MAX_EDID_NUM, ptn_select_edid(), PTN_SUCCESS, and val.

Here is the call graph for this function:

◆ ptn3460_write_edid()

static int ptn3460_write_edid ( struct device dev,
u8  edid_num,
u8 data 
)
static

This function writes one EDID data structure to PTN3460.

Parameters
*devPointer to the relevant I2C controller
edid_numNumber of EDID that must be written (0..6)
*dataPointer to a buffer where data to write is stored in
Returns
PTN_SUCCESS on success or error code

Definition at line 35 of file ptn3460.c.

References i2c_dev_writeb_at(), PTN_BUS_ERROR, PTN_CONFIG_OFF, PTN_EDID_LEN, PTN_EDID_OFF, PTN_INVALID_EDID, PTN_MAX_EDID_NUM, and PTN_SUCCESS.

Referenced by ptn3460_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ptn_select_edid()

static int ptn_select_edid ( struct device dev,
uint8_t  edid_num 
)
static

This function selects one of 7 EDID-tables inside PTN3460 which should be emulated on display port and turn emulation ON.

Parameters
*devPointer to the relevant I2C controller
edid_numNumber of EDID to emulate (0..6)
Returns
PTN_SUCCESS or error code

Definition at line 16 of file ptn3460.c.

References i2c_dev_writeb_at(), PTN_BUS_ERROR, PTN_CONFIG_OFF, PTN_ENABLE_EMULATION, PTN_INVALID_EDID, PTN_MAX_EDID_NUM, PTN_SUCCESS, and val.

Referenced by ptn3460_init().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ drivers_i2c_ptn3460_ops

struct chip_operations drivers_i2c_ptn3460_ops
Initial value:
= {
.enable_dev = ptn3460_enable
}
static void ptn3460_enable(struct device *dev)
Definition: ptn3460.c:133

Definition at line 133 of file ptn3460.c.

◆ ptn3460_ops

struct device_operations ptn3460_ops
static
Initial value:
= {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.init = ptn3460_init,
}
static void noop_read_resources(struct device *dev)
Standard device operations function pointers shims.
Definition: device.h:73
static void noop_set_resources(struct device *dev)
Definition: device.h:74
static void ptn3460_init(struct device *dev)
This function sets up the DP2LVDS-converter to be used with the appropriate EDID data.
Definition: ptn3460.c:62

Definition at line 122 of file ptn3460.c.