coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmh7.c File Reference
#include <arch/io.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pnp.h>
#include <option.h>
#include <delay.h>
#include <types.h>
#include "pmh7.h"
#include "chip.h"
Include dependency graph for pmh7.c:

Go to the source code of this file.

Functions

void pmh7_backlight_enable (int onoff)
 
void pmh7_dock_event_enable (int onoff)
 
void pmh7_touchpad_enable (int onoff)
 
void pmh7_trackpoint_enable (int onoff)
 
void pmh7_ultrabay_power_enable (int onoff)
 
void pmh7_dgpu_power_enable (int onoff)
 
bool pmh7_dgpu_power_state (void)
 
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)
 
static void enable_dev (struct device *dev)
 

Variables

struct chip_operations ec_lenovo_pmh7_ops
 

Function Documentation

◆ enable_dev()

static void enable_dev ( struct device dev)
static

Definition at line 104 of file pmh7.c.

◆ 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:

Variable Documentation

◆ ec_lenovo_pmh7_ops

struct chip_operations ec_lenovo_pmh7_ops
Initial value:
= {
.enable_dev = enable_dev,
}
static void enable_dev(struct device *dev)
Definition: pmh7.c:104

Definition at line 104 of file pmh7.c.