coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
h8.c File Reference
#include <acpi/acpi.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pnp.h>
#include <ec/acpi/ec.h>
#include <string.h>
#include <smbios.h>
#include <option.h>
#include <pc80/keyboard.h>
#include <types.h>
#include "h8.h"
#include "chip.h"
Include dependency graph for h8.c:

Go to the source code of this file.

Enumerations

enum  battery { SECONDARY_BATTERY = 0 , PRIMARY_BATTERY = 1 }
 

Functions

void h8_trackpoint_enable (int on)
 
void h8_wlan_enable (int on)
 
static void h8_uwb_enable (int on)
 
static void h8_fn_ctrl_swap (int on)
 
static void h8_charge_priority (enum battery battery)
 
static void h8_sticky_fn (int on)
 
static void f1_to_f12_as_primary (int on)
 
static void h8_log_ec_version (void)
 
void h8_set_audio_mute (int mute)
 
void h8_enable_event (int event)
 
void h8_disable_event (int event)
 
void h8_usb_always_on_enable (enum usb_always_on on)
 
void h8_usb_power_enable (int onoff)
 
int h8_ultrabay_device_present (void)
 
u8 h8_build_id_and_function_spec_version (char *buf, u8 buf_len)
 
static void h8_init (struct device *dev)
 
void __weak h8_mb_init (void)
 
static void h8_enable (struct device *dev)
 

Variables

struct device_operations h8_dev_ops
 
struct chip_operations ec_lenovo_h8_ops
 

Enumeration Type Documentation

◆ battery

enum battery
Enumerator
SECONDARY_BATTERY 
PRIMARY_BATTERY 

Definition at line 49 of file h8.c.

Function Documentation

◆ f1_to_f12_as_primary()

static void f1_to_f12_as_primary ( int  on)
static

Definition at line 75 of file h8.c.

References ec_clr_bit(), and ec_set_bit().

Here is the call graph for this function:

◆ h8_build_id_and_function_spec_version()

u8 h8_build_id_and_function_spec_version ( char *  buf,
u8  buf_len 
)

Definition at line 164 of file h8.c.

References buf, c, ec_read(), memcpy(), MIN, and snprintf().

Referenced by h8_log_ec_version().

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

◆ h8_charge_priority()

static void h8_charge_priority ( enum battery  battery)
static

Definition at line 59 of file h8.c.

References ec_clr_bit(), ec_set_bit(), and PRIMARY_BATTERY.

Here is the call graph for this function:

◆ h8_disable_event()

void h8_disable_event ( int  event)

Definition at line 115 of file h8.c.

References ec_clr_bit().

Here is the call graph for this function:

◆ h8_enable()

static void h8_enable ( struct device dev)
static

Definition at line 224 of file h8.c.

◆ h8_enable_event()

void h8_enable_event ( int  event)

Definition at line 107 of file h8.c.

References ec_set_bit().

Here is the call graph for this function:

◆ h8_fn_ctrl_swap()

static void h8_fn_ctrl_swap ( int  on)
static

Definition at line 41 of file h8.c.

References ec_clr_bit(), and ec_set_bit().

Here is the call graph for this function:

◆ h8_init()

static void h8_init ( struct device dev)
static

Definition at line 199 of file h8.c.

◆ h8_log_ec_version()

static void h8_log_ec_version ( void  )
static

Definition at line 83 of file h8.c.

References BIOS_INFO, ec_read(), h8_build_id_and_function_spec_version(), and printk.

Here is the call graph for this function:

◆ h8_mb_init()

void __weak h8_mb_init ( void  )

Definition at line 222 of file h8.c.

◆ h8_set_audio_mute()

void h8_set_audio_mute ( int  mute)

Definition at line 99 of file h8.c.

References ec_clr_bit(), and ec_set_bit().

Here is the call graph for this function:

◆ h8_sticky_fn()

static void h8_sticky_fn ( int  on)
static

Definition at line 67 of file h8.c.

References ec_clr_bit(), and ec_set_bit().

Here is the call graph for this function:

◆ h8_trackpoint_enable()

void h8_trackpoint_enable ( int  on)

Definition at line 17 of file h8.c.

References ec_write(), H8_TRACKPOINT_CTRL, H8_TRACKPOINT_OFF, and H8_TRACKPOINT_ON.

Here is the call graph for this function:

◆ h8_ultrabay_device_present()

int h8_ultrabay_device_present ( void  )

Definition at line 159 of file h8.c.

References ec_read(), and H8_STATUS1.

Referenced by mainboard_init().

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

◆ h8_usb_always_on_enable()

void h8_usb_always_on_enable ( enum usb_always_on  on)

Definition at line 123 of file h8.c.

References ec_read(), ec_write(), H8_USB_ALWAYS_ON, H8_USB_ALWAYS_ON_AC_ONLY, H8_USB_ALWAYS_ON_ENABLE, UAO_AC_AND_BATTERY, UAO_AC_ONLY, UAO_OFF, and val.

Here is the call graph for this function:

◆ h8_usb_power_enable()

void h8_usb_power_enable ( int  onoff)

Definition at line 151 of file h8.c.

References ec_clr_bit(), and ec_set_bit().

Here is the call graph for this function:

◆ h8_uwb_enable()

static void h8_uwb_enable ( int  on)
static

Definition at line 33 of file h8.c.

References ec_clr_bit(), and ec_set_bit().

Here is the call graph for this function:

◆ h8_wlan_enable()

void h8_wlan_enable ( int  on)

Definition at line 24 of file h8.c.

References ec_clr_bit(), and ec_set_bit().

Here is the call graph for this function:

Variable Documentation

◆ ec_lenovo_h8_ops

struct chip_operations ec_lenovo_h8_ops
Initial value:
= {
.enable_dev = h8_enable,
}
static void h8_enable(struct device *dev)
Definition: h8.c:224

Definition at line 224 of file h8.c.

◆ h8_dev_ops

struct device_operations h8_dev_ops
Initial value:
= {
.init = h8_init,
}
static void h8_init(struct device *dev)
Definition: h8.c:199

Definition at line 199 of file h8.c.