coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
kempld_gpio.c File Reference
#include <stdint.h>
#include <arch/io.h>
#include "chip.h"
#include "kempld.h"
#include "kempld_internal.h"
Include dependency graph for kempld_gpio.c:

Go to the source code of this file.

Enumerations

enum  kempld_gpio_direction { KEMPLD_GPIO_DIR_IN = 0 , KEMPLD_GPIO_DIR_OUT = 1 }
 

Functions

static void kempld_gpio_value_set (u8 pin_num, u8 value)
 
static void kempld_gpio_direction_set (u8 pin_num, enum kempld_gpio_direction dir)
 
static int kempld_configure_gpio (u8 pin_num, enum kempld_gpio_mode mode)
 
int kempld_gpio_pads_config (struct device *dev)
 

Enumeration Type Documentation

◆ kempld_gpio_direction

Enumerator
KEMPLD_GPIO_DIR_IN 
KEMPLD_GPIO_DIR_OUT 

Definition at line 10 of file kempld_gpio.c.

Function Documentation

◆ kempld_configure_gpio()

static int kempld_configure_gpio ( u8  pin_num,
enum kempld_gpio_mode  mode 
)
static

Definition at line 31 of file kempld_gpio.c.

References kempld_get_mutex(), KEMPLD_GPIO_DEFAULT, KEMPLD_GPIO_DIR_IN, KEMPLD_GPIO_DIR_OUT, kempld_gpio_direction_set(), KEMPLD_GPIO_INPUT, KEMPLD_GPIO_OUTPUT_HIGH, KEMPLD_GPIO_OUTPUT_LOW, kempld_gpio_value_set(), and kempld_release_mutex().

Referenced by kempld_gpio_pads_config().

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

◆ kempld_gpio_direction_set()

static void kempld_gpio_direction_set ( u8  pin_num,
enum kempld_gpio_direction  dir 
)
static

Definition at line 23 of file kempld_gpio.c.

References KEMPLD_GPIO_DIR, KEMPLD_GPIO_DIR_OUT, KEMPLD_GPIO_MASK, kempld_read8(), kempld_write8(), and mask.

Referenced by kempld_configure_gpio().

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

◆ kempld_gpio_pads_config()

int kempld_gpio_pads_config ( struct device dev)

Definition at line 59 of file kempld_gpio.c.

References device::chip_info, config, kempld_configure_gpio(), and KEMPLD_NUM_GPIOS.

Here is the call graph for this function:

◆ kempld_gpio_value_set()

static void kempld_gpio_value_set ( u8  pin_num,
u8  value 
)
static

Definition at line 15 of file kempld_gpio.c.

References KEMPLD_GPIO_LVL, KEMPLD_GPIO_MASK, kempld_read8(), kempld_write8(), mask, and value.

Referenced by kempld_configure_gpio().

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