coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mt6691.h File Reference
#include <stdint.h>
Include dependency graph for mt6691.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MT6691_CID_CODE   0x01
 
#define MT6691_VDD2_ID   0x0000
 
#define MT6691_VDDQ_ID   0x0000
 
#define MT6691_PGOOD_SHIFT   7
 
#define MT6691_DN_SR_MASK   0x7
 
#define MT6691_DN_SR_SHIFT   5
 

Enumerations

enum  {
  MT6691_VSEL0 = 0x00 , MT6691_VSEL1 = 0x01 , MT6691_CONTROL = 0x02 , MT6691_ID1 = 0x03 ,
  MT6691_ID2 = 0x04 , MT6691_MONITOR = 0x05 , MT6691_CTRL2 = 0x06 , MT6691_CTRL3 = 0x07 ,
  MT6691_CTRL4 = 0x08
}
 

Functions

void mt6691_probe (uint8_t i2c_num)
 
int mt6691_set_voltage (uint8_t i2c_num, unsigned int volt_uv)
 
int mt6691_get_voltage (uint8_t i2c_num)
 

Macro Definition Documentation

◆ MT6691_CID_CODE

#define MT6691_CID_CODE   0x01

Definition at line 12 of file mt6691.h.

◆ MT6691_DN_SR_MASK

#define MT6691_DN_SR_MASK   0x7

Definition at line 17 of file mt6691.h.

◆ MT6691_DN_SR_SHIFT

#define MT6691_DN_SR_SHIFT   5

Definition at line 18 of file mt6691.h.

◆ MT6691_PGOOD_SHIFT

#define MT6691_PGOOD_SHIFT   7

Definition at line 16 of file mt6691.h.

◆ MT6691_VDD2_ID

#define MT6691_VDD2_ID   0x0000

Definition at line 14 of file mt6691.h.

◆ MT6691_VDDQ_ID

#define MT6691_VDDQ_ID   0x0000

Definition at line 15 of file mt6691.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MT6691_VSEL0 
MT6691_VSEL1 
MT6691_CONTROL 
MT6691_ID1 
MT6691_ID2 
MT6691_MONITOR 
MT6691_CTRL2 
MT6691_CTRL3 
MT6691_CTRL4 

Definition at line 20 of file mt6691.h.

Function Documentation

◆ mt6691_get_voltage()

int mt6691_get_voltage ( uint8_t  i2c_num)

Definition at line 30 of file mt6691.c.

References BIOS_ERR, i2c_read_field(), MT6691_MAX_VOLTAGE, MT6691_MIN_VOLTAGE, MT6691_SLAVE_ADDR, MT6691_STEP_UV, MT6691_VSEL0, and printk.

Referenced by mainboard_get_regulator_vol().

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

◆ mt6691_probe()

void mt6691_probe ( uint8_t  i2c_num)

Definition at line 64 of file mt6691.c.

References BIOS_ERR, get_mt6691_chip_id(), i2c_write_field(), MT6691_CTRL2, MT6691_DN_SR_MASK, MT6691_DN_SR_SHIFT, MT6691_SLAVE_ADDR, and printk.

Here is the call graph for this function:

◆ mt6691_set_voltage()

int mt6691_set_voltage ( uint8_t  i2c_num,
unsigned int  volt_uv 
)

Definition at line 15 of file mt6691.c.

References BIOS_ERR, DIV_ROUND_UP, i2c_write_field(), MT6691_MAX_VOLTAGE, MT6691_MIN_VOLTAGE, MT6691_SLAVE_ADDR, MT6691_STEP_UV, MT6691_VSEL0, and printk.

Referenced by mainboard_set_regulator_vol().

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