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

Go to the source code of this file.

Data Structures

struct  max77620_init_reg
 

Enumerations

enum  { MAX77620_I2C_ADDR = 0x3c }
 

Functions

static void pmic_write_reg (unsigned int bus, uint8_t reg, uint8_t val, int delay)
 
void pmic_init (unsigned int bus)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX77620_I2C_ADDR 

Definition at line 11 of file pmic.c.

Function Documentation

◆ pmic_init()

void pmic_init ( unsigned int  bus)

Definition at line 34 of file pmic.c.

References BIOS_DEBUG, MAX77620_AME_GPIO, MAX77620_CNFG1_L1_REG, MAX77620_CNFG1_L2_REG, MAX77620_CNFG2SD_REG, MAX77620_GPIO1_REG, MAX77620_GPIO5_REG, MAX77620_SD1_REG, pmic_write_reg(), and printk.

Referenced by bootblock_mainboard_init().

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

◆ pmic_write_reg()

static void pmic_write_reg ( unsigned int  bus,
uint8_t  reg,
uint8_t  val,
int  delay 
)
static

Definition at line 21 of file pmic.c.

References BIOS_ERR, board_reset(), delay(), i2c_writeb(), MAX77620_I2C_ADDR, printk, udelay(), and val.

Referenced by pmic_init().

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