coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmh7.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EC_LENOVO_PMH7_INDEX   0x77
 
#define EC_LENOVO_PMH7_BASE   0x15e0
 
#define EC_LENOVO_PMH7_ADDR_L   (EC_LENOVO_PMH7_BASE + 0x0c)
 
#define EC_LENOVO_PMH7_ADDR_H   (EC_LENOVO_PMH7_BASE + 0x0d)
 
#define EC_LENOVO_PMH7_DATA   (EC_LENOVO_PMH7_BASE + 0x0e)
 
#define EC_LENOVO_PMH7_REG_ID   0xc2
 
#define EC_LENOVO_PMH7_REG_REV   0xc3
 

Functions

void pmh7_register_set_bit (int reg, int bit)
 
void pmh7_register_clear_bit (int reg, int bit)
 
char pmh7_register_read (int reg)
 
void pmh7_register_write (int reg, int val)
 
void pmh7_backlight_enable (int onoff)
 
void pmh7_dock_event_enable (int onoff)
 
void pmh7_touchpad_enable (int onoff)
 
void pmh7_ultrabay_power_enable (int onoff)
 
void pmh7_trackpoint_enable (int onoff)
 
void pmh7_dgpu_power_enable (int onoff)
 
bool pmh7_dgpu_power_state (void)
 

Macro Definition Documentation

◆ EC_LENOVO_PMH7_ADDR_H

#define EC_LENOVO_PMH7_ADDR_H   (EC_LENOVO_PMH7_BASE + 0x0d)

Definition at line 10 of file pmh7.h.

◆ EC_LENOVO_PMH7_ADDR_L

#define EC_LENOVO_PMH7_ADDR_L   (EC_LENOVO_PMH7_BASE + 0x0c)

Definition at line 9 of file pmh7.h.

◆ EC_LENOVO_PMH7_BASE

#define EC_LENOVO_PMH7_BASE   0x15e0

Definition at line 8 of file pmh7.h.

◆ EC_LENOVO_PMH7_DATA

#define EC_LENOVO_PMH7_DATA   (EC_LENOVO_PMH7_BASE + 0x0e)

Definition at line 11 of file pmh7.h.

◆ EC_LENOVO_PMH7_INDEX

#define EC_LENOVO_PMH7_INDEX   0x77

Definition at line 6 of file pmh7.h.

◆ EC_LENOVO_PMH7_REG_ID

#define EC_LENOVO_PMH7_REG_ID   0xc2

Definition at line 13 of file pmh7.h.

◆ EC_LENOVO_PMH7_REG_REV

#define EC_LENOVO_PMH7_REG_REV   0xc3

Definition at line 14 of file pmh7.h.

Function Documentation

◆ pmh7_backlight_enable()

void pmh7_backlight_enable ( int  onoff)

Definition at line 14 of file pmh7.c.

References pmh7_register_clear_bit(), and pmh7_register_set_bit().

Here is the call graph for this function:

◆ pmh7_dgpu_power_enable()

void pmh7_dgpu_power_enable ( int  onoff)

Definition at line 54 of file pmh7.c.

References mdelay(), pmh7_register_clear_bit(), pmh7_register_set_bit(), and udelay().

Referenced by early_hybrid_graphics(), mainboard_early_init(), and mb_late_romstage_setup().

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

◆ pmh7_dgpu_power_state()

bool pmh7_dgpu_power_state ( void  )

Definition at line 69 of file pmh7.c.

References pmh7_register_read().

Referenced by early_hybrid_graphics(), mainboard_early_init(), and mb_late_romstage_setup().

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

◆ pmh7_dock_event_enable()

void pmh7_dock_event_enable ( int  onoff)

Definition at line 22 of file pmh7.c.

References pmh7_register_clear_bit(), and pmh7_register_set_bit().

Here is the call graph for this function:

◆ pmh7_register_clear_bit()

void pmh7_register_clear_bit ( int  reg,
int  bit 
)

Definition at line 82 of file pmh7.c.

References pmh7_register_read(), pmh7_register_write(), and val.

Referenced by pmh7_backlight_enable(), pmh7_dgpu_power_enable(), pmh7_dock_event_enable(), pmh7_touchpad_enable(), pmh7_trackpoint_enable(), and pmh7_ultrabay_power_enable().

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

◆ pmh7_register_read()

char pmh7_register_read ( int  reg)

Definition at line 90 of file pmh7.c.

References EC_LENOVO_PMH7_ADDR_H, EC_LENOVO_PMH7_ADDR_L, EC_LENOVO_PMH7_DATA, inb(), and outb().

Referenced by dock_present(), pmh7_dgpu_power_state(), pmh7_register_clear_bit(), and pmh7_register_set_bit().

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

◆ pmh7_register_set_bit()

void pmh7_register_set_bit ( int  reg,
int  bit 
)

Definition at line 74 of file pmh7.c.

References pmh7_register_read(), pmh7_register_write(), and val.

Referenced by pmh7_backlight_enable(), pmh7_dgpu_power_enable(), pmh7_dock_event_enable(), pmh7_touchpad_enable(), pmh7_trackpoint_enable(), and pmh7_ultrabay_power_enable().

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

◆ pmh7_register_write()

void pmh7_register_write ( int  reg,
int  val 
)

Definition at line 97 of file pmh7.c.

References EC_LENOVO_PMH7_ADDR_H, EC_LENOVO_PMH7_ADDR_L, EC_LENOVO_PMH7_DATA, outb(), and val.

Referenced by pmh7_register_clear_bit(), and pmh7_register_set_bit().

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

◆ pmh7_touchpad_enable()

void pmh7_touchpad_enable ( int  onoff)

Definition at line 30 of file pmh7.c.

References pmh7_register_clear_bit(), and pmh7_register_set_bit().

Here is the call graph for this function:

◆ pmh7_trackpoint_enable()

void pmh7_trackpoint_enable ( int  onoff)

Definition at line 38 of file pmh7.c.

References pmh7_register_clear_bit(), and pmh7_register_set_bit().

Here is the call graph for this function:

◆ pmh7_ultrabay_power_enable()

void pmh7_ultrabay_power_enable ( int  onoff)

Definition at line 46 of file pmh7.c.

References pmh7_register_clear_bit(), and pmh7_register_set_bit().

Referenced by legacy_io_init(), and mainboard_init().

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