OpenBIC
OpenSource Bridge-IC
plat_gpio.c File Reference
#include <zephyr.h>
#include <stdio.h>
#include <string.h>
#include <logging/log.h>
#include "libutil.h"
#include "cmsis_os.h"
#include "hal_gpio.h"
#include "plat_gpio.h"
#include "plat_isr.h"
#include "plat_class.h"
Include dependency graph for plat_gpio.c:

Macros

#define gpio_name_to_num(x)   #x,
 

Functions

 LOG_MODULE_REGISTER (plat_gpio)
 
void init_board_rev_gpio ()
 
void update_gpio_cfg_name ()
 
bool pal_load_gpio_config (void)
 
int get_cxl_ioexp_alert_pin (uint8_t cxl_id, uint8_t *alert_pin)
 

Variables

char * gpio_name []
 
char * update_gpio_name []
 
GPIO_CFG plat_gpio_cfg []
 
GPIO_CFG update_gpio_cfg []
 

Macro Definition Documentation

◆ gpio_name_to_num

#define gpio_name_to_num (   x)    #x,

Function Documentation

◆ get_cxl_ioexp_alert_pin()

int get_cxl_ioexp_alert_pin ( uint8_t  cxl_id,
uint8_t *  alert_pin 
)

◆ init_board_rev_gpio()

void init_board_rev_gpio ( )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_gpio  )

◆ pal_load_gpio_config()

bool pal_load_gpio_config ( void  )
Here is the call graph for this function:

◆ update_gpio_cfg_name()

void update_gpio_cfg_name ( )
Here is the call graph for this function:

Variable Documentation

◆ gpio_name

char* gpio_name[]
Initial value:
= {
}
#define name_gpioO
Definition: plat_gpio.h:157
#define name_gpioK
Definition: plat_gpio.h:120
#define name_gpioH
Definition: plat_gpio.h:93
#define name_gpioQ
Definition: plat_gpio.h:176
#define name_gpioR
Definition: plat_gpio.h:185
#define name_gpioP
Definition: plat_gpio.h:166
#define name_gpioE
Definition: plat_gpio.h:66
#define name_gpioL
Definition: plat_gpio.h:129
#define name_gpioC
Definition: plat_gpio.h:48
#define name_gpioD
Definition: plat_gpio.h:57
#define name_gpioT
Definition: plat_gpio.h:205
#define name_gpioN
Definition: plat_gpio.h:148
#define name_gpioM
Definition: plat_gpio.h:139
#define name_gpioI
Definition: plat_gpio.h:102
#define name_gpioB
Definition: plat_gpio.h:39
#define name_gpioJ
Definition: plat_gpio.h:111
#define name_gpioA
Definition: plat_gpio.h:30
#define name_gpioG
Definition: plat_gpio.h:84
#define name_gpioS
Definition: plat_gpio.h:195
#define name_gpioU
Definition: plat_gpio.h:215
@ name_gpioF
Definition: plat_gpio.h:176

◆ plat_gpio_cfg

GPIO_CFG plat_gpio_cfg[]

◆ update_gpio_cfg

GPIO_CFG update_gpio_cfg[]
Initial value:
= {
{ CHIP_GPIO, 30, ENABLE, DISABLE, GPIO_OUTPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 32, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 33, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 34, ENABLE, DISABLE, GPIO_OUTPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 35, DISABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 36, DISABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 37, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 38, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 39, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 44, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 48, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 49, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 50, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 51, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 52, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 53, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 54, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 55, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 59, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 90, ENABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 91, ENABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 92, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 93, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 95, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 97, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 99, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 105, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 107, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE, NULL },
}
#define GPIO_LOW
Definition: hal_gpio.h:72
#define OPEN_DRAIN
Definition: hal_gpio.h:76
#define ENABLE
Definition: hal_gpio.h:68
#define GPIO_HIGH
Definition: hal_gpio.h:73
#define DISABLE
Definition: hal_gpio.h:69
#define CHIP_GPIO
Definition: hal_gpio.h:70
#define PUSH_PULL
Definition: hal_gpio.h:77

◆ update_gpio_name

char* update_gpio_name[]
Initial value:
= {
}
#define update_name_gpioL
Definition: plat_gpio.h:279
#define update_name_gpioM
Definition: plat_gpio.h:289
#define update_name_gpioD
Definition: plat_gpio.h:269
#define update_name_gpioG
Definition: plat_gpio.h:267
#define update_name_gpioN
Definition: plat_gpio.h:307
#define update_name_gpioE
Definition: plat_gpio.h:247
#define update_name_gpioF
Definition: plat_gpio.h:257
#define update_name_gpioH
Definition: plat_gpio.h:277