coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
acpi_device.h File Reference
#include <device/i2c.h>
#include <spi-generic.h>
#include <types.h>
Include dependency graph for acpi_device.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  acpi_dp
 
struct  acpi_irq
 
struct  acpi_gpio
 
struct  acpi_i2c
 
struct  acpi_spi
 
struct  acpi_uart
 
struct  acpi_power_res_params
 
struct  acpi_gpio_res_params
 

Macros

#define ACPI_DESCRIPTOR_LARGE   (1 << 7)
 
#define ACPI_DESCRIPTOR_INTERRUPT   (ACPI_DESCRIPTOR_LARGE | 9)
 
#define ACPI_DESCRIPTOR_GPIO   (ACPI_DESCRIPTOR_LARGE | 12)
 
#define ACPI_DESCRIPTOR_SERIAL_BUS   (ACPI_DESCRIPTOR_LARGE | 14)
 
#define ACPI_DT_NAMESPACE_HID   "PRP0001"
 
#define ACPI_IRQ_CFG(_pin, _mode, _pol, _shared, _wake)
 
#define ACPI_IRQ_EDGE_LOW(x)
 
#define ACPI_IRQ_EDGE_HIGH(x)
 
#define ACPI_IRQ_LEVEL_LOW(x)
 
#define ACPI_IRQ_LEVEL_HIGH(x)
 
#define ACPI_IRQ_WAKE_EDGE_LOW(x)
 
#define ACPI_IRQ_WAKE_EDGE_HIGH(x)
 
#define ACPI_IRQ_WAKE_LEVEL_LOW(x)
 
#define ACPI_IRQ_WAKE_LEVEL_HIGH(x)
 
#define ACPI_GPIO_REVISION_ID   1
 
#define ACPI_GPIO_MAX_PINS   8
 
#define ACPI_GPIO_CFG(_gpio, _io_restrict, _active_low)
 
#define ACPI_GPIO_OUTPUT_CFG(gpio, active_low)    ACPI_GPIO_CFG(gpio, ACPI_GPIO_IO_RESTRICT_OUTPUT, active_low)
 
#define ACPI_GPIO_OUTPUT(gpio)   ACPI_GPIO_OUTPUT_CFG(gpio, 0)
 
#define ACPI_GPIO_OUTPUT_ACTIVE_HIGH(gpio)   ACPI_GPIO_OUTPUT_CFG(gpio, 0)
 
#define ACPI_GPIO_OUTPUT_ACTIVE_LOW(gpio)   ACPI_GPIO_OUTPUT_CFG(gpio, 1)
 
#define ACPI_GPIO_INPUT_CFG(gpio, polarity)    ACPI_GPIO_CFG(gpio, ACPI_GPIO_IO_RESTRICT_INPUT, polarity)
 
#define ACPI_GPIO_INPUT(gpio)   ACPI_GPIO_INPUT_CFG(gpio, 0)
 
#define ACPI_GPIO_INPUT_ACTIVE_HIGH(gpio)   ACPI_GPIO_INPUT_CFG(gpio, 0)
 
#define ACPI_GPIO_INPUT_ACTIVE_LOW(gpio)   ACPI_GPIO_INPUT_CFG(gpio, 1)
 
#define ACPI_GPIO_IRQ_CFG(_gpio, _mode, _polarity, _wake)
 
#define ACPI_GPIO_IRQ_EDGE(gpio, polarity)    ACPI_GPIO_IRQ_CFG(gpio, ACPI_IRQ_EDGE_TRIGGERED, polarity, 0)
 
#define ACPI_GPIO_IRQ_EDGE_WAKE(gpio, polarity)    ACPI_GPIO_IRQ_CFG(gpio, ACPI_IRQ_EDGE_TRIGGERED, polarity, ACPI_IRQ_WAKE)
 
#define ACPI_GPIO_IRQ_LEVEL(gpio, polarity)    ACPI_GPIO_IRQ_CFG(gpio, ACPI_IRQ_LEVEL_TRIGGERED, polarity, 0)
 
#define ACPI_GPIO_IRQ_LEVEL_WAKE(gpio, polarity)    ACPI_GPIO_IRQ_CFG(gpio, ACPI_IRQ_LEVEL_TRIGGERED, polarity, ACPI_IRQ_WAKE)
 
#define ACPI_GPIO_IRQ_EDGE_HIGH(gpio)    ACPI_GPIO_IRQ_EDGE(gpio, ACPI_IRQ_ACTIVE_HIGH)
 
#define ACPI_GPIO_IRQ_EDGE_LOW(gpio)    ACPI_GPIO_IRQ_EDGE(gpio, ACPI_IRQ_ACTIVE_LOW)
 
#define ACPI_GPIO_IRQ_EDGE_BOTH(gpio)    ACPI_GPIO_IRQ_EDGE(gpio, ACPI_IRQ_ACTIVE_BOTH)
 
#define ACPI_GPIO_IRQ_EDGE_HIGH_WAKE(gpio)    ACPI_GPIO_IRQ_EDGE_WAKE(gpio, ACPI_IRQ_ACTIVE_HIGH)
 
#define ACPI_GPIO_IRQ_EDGE_LOW_WAKE(gpio)    ACPI_GPIO_IRQ_EDGE_WAKE(gpio, ACPI_IRQ_ACTIVE_LOW)
 
#define ACPI_GPIO_IRQ_EDGE_BOTH_WAKE(gpio)    ACPI_GPIO_IRQ_EDGE_WAKE(gpio, ACPI_IRQ_ACTIVE_BOTH)
 
#define ACPI_GPIO_IRQ_LEVEL_HIGH(gpio)    ACPI_GPIO_IRQ_LEVEL(gpio, ACPI_IRQ_ACTIVE_HIGH)
 
#define ACPI_GPIO_IRQ_LEVEL_LOW(gpio)    ACPI_GPIO_IRQ_LEVEL(gpio, ACPI_IRQ_ACTIVE_LOW)
 
#define ACPI_GPIO_IRQ_LEVEL_HIGH_WAKE(gpio)    ACPI_GPIO_IRQ_LEVEL_WAKE(gpio, ACPI_IRQ_ACTIVE_HIGH)
 
#define ACPI_GPIO_IRQ_LEVEL_LOW_WAKE(gpio)    ACPI_GPIO_IRQ_LEVEL_WAKE(gpio, ACPI_IRQ_ACTIVE_LOW)
 
#define ACPI_SERIAL_BUS_TYPE_I2C   1
 
#define ACPI_SERIAL_BUS_TYPE_SPI   2
 
#define ACPI_SERIAL_BUS_TYPE_UART   3
 
#define ACPI_I2C_SERIAL_BUS_REVISION_ID   1 /* TODO: upgrade to 2 */
 
#define ACPI_I2C_TYPE_SPECIFIC_REVISION_ID   1
 
#define ACPI_SPI_SERIAL_BUS_REVISION_ID   1
 
#define ACPI_SPI_TYPE_SPECIFIC_REVISION_ID   1
 
#define ACPI_UART_SERIAL_BUS_REVISION_ID   1
 
#define ACPI_UART_TYPE_SPECIFIC_REVISION_ID   1
 
#define ACPI_UART_RAW_DEVICE(baud_rate, fifo_bytes)
 

Enumerations

enum  acpi_dp_type {
  ACPI_DP_TYPE_UNKNOWN , ACPI_DP_TYPE_INTEGER , ACPI_DP_TYPE_STRING , ACPI_DP_TYPE_REFERENCE ,
  ACPI_DP_TYPE_TABLE , ACPI_DP_TYPE_ARRAY , ACPI_DP_TYPE_CHILD , ACPI_DP_TYPE_PACKAGE
}
 
enum  acpi_irq_mode { ACPI_IRQ_EDGE_TRIGGERED , ACPI_IRQ_LEVEL_TRIGGERED }
 
enum  acpi_irq_polarity { ACPI_IRQ_ACTIVE_LOW , ACPI_IRQ_ACTIVE_HIGH , ACPI_IRQ_ACTIVE_BOTH }
 
enum  acpi_irq_shared { ACPI_IRQ_EXCLUSIVE , ACPI_IRQ_SHARED }
 
enum  acpi_irq_wake { ACPI_IRQ_NO_WAKE , ACPI_IRQ_WAKE }
 
enum  acpi_gpio_type { ACPI_GPIO_TYPE_INTERRUPT , ACPI_GPIO_TYPE_IO }
 
enum  acpi_gpio_pull { ACPI_GPIO_PULL_DEFAULT , ACPI_GPIO_PULL_UP , ACPI_GPIO_PULL_DOWN , ACPI_GPIO_PULL_NONE }
 
enum  acpi_gpio_io_restrict { ACPI_GPIO_IO_RESTRICT_NONE , ACPI_GPIO_IO_RESTRICT_INPUT , ACPI_GPIO_IO_RESTRICT_OUTPUT , ACPI_GPIO_IO_RESTRICT_PRESERVE }
 
enum  acpi_uart_data_bits {
  ACPI_UART_DATA_BITS_5 , ACPI_UART_DATA_BITS_6 , ACPI_UART_DATA_BITS_7 , ACPI_UART_DATA_BITS_8 ,
  ACPI_UART_DATA_BITS_9
}
 
enum  acpi_uart_stop_bits { ACPI_UART_STOP_BITS_0 , ACPI_UART_STOP_BITS_1 , ACPI_UART_STOP_BITS_1_5 , ACPI_UART_STOP_BITS_2 }
 
enum  acpi_uart_lines {
  ACPI_UART_LINE_DTD = BIT(2) , ACPI_UART_LINE_RI = BIT(3) , ACPI_UART_LINE_DSR = BIT(4) , ACPI_UART_LINE_DTR = BIT(5) ,
  ACPI_UART_LINE_CTS = BIT(6) , ACPI_UART_LINE_RTS = BIT(7)
}
 
enum  acpi_uart_endian { ACPI_UART_ENDIAN_LITTLE , ACPI_UART_ENDIAN_BIG }
 
enum  acpi_uart_parity {
  ACPI_UART_PARITY_NONE , ACPI_UART_PARITY_EVEN , ACPI_UART_PARITY_ODD , ACPI_UART_PARITY_MARK ,
  ACPI_UART_PARITY_SPACE
}
 
enum  acpi_uart_flow_control { ACPI_UART_FLOW_NONE , ACPI_UART_FLOW_HARDWARE , ACPI_UART_FLOW_SOFTWARE }
 

Functions

const char * acpi_device_name (const struct device *dev)
 
const char * acpi_device_hid (const struct device *dev)
 
uint32_t acpi_device_uid (const struct device *dev)
 
const char * acpi_device_path (const struct device *dev)
 
const char * acpi_device_scope (const struct device *dev)
 
const char * acpi_device_path_join (const struct device *dev, const char *name)
 
int acpi_device_status (const struct device *dev)
 
void acpi_device_write_uid (const struct device *dev)
 
void acpi_device_write_interrupt (const struct acpi_irq *irq)
 
void acpi_device_write_gpio (const struct acpi_gpio *gpio)
 
void acpi_device_write_i2c (const struct acpi_i2c *i2c)
 
void acpi_device_write_spi (const struct acpi_spi *spi)
 
void acpi_device_write_uart (const struct acpi_uart *uart)
 
void acpi_device_add_power_res (const struct acpi_power_res_params *params)
 
struct acpi_dpacpi_dp_new_table (const char *ref)
 
struct acpi_dpacpi_dp_add_package (struct acpi_dp *dp, struct acpi_dp *package)
 
struct acpi_dpacpi_dp_add_integer (struct acpi_dp *dp, const char *name, uint64_t value)
 
struct acpi_dpacpi_dp_add_string (struct acpi_dp *dp, const char *name, const char *string)
 
struct acpi_dpacpi_dp_add_reference (struct acpi_dp *dp, const char *name, const char *reference)
 
struct acpi_dpacpi_dp_add_array (struct acpi_dp *dp, struct acpi_dp *array)
 
struct acpi_dpacpi_dp_add_integer_array (struct acpi_dp *dp, const char *name, const uint64_t *array, int len)
 
struct acpi_dpacpi_dp_add_gpio (struct acpi_dp *dp, const char *name, const char *ref, int index, int pin, int active_low)
 
struct acpi_dpacpi_dp_add_gpio_array (struct acpi_dp *dp, const char *name, const struct acpi_gpio_res_params *params, size_t param_count)
 
struct acpi_dpacpi_dp_add_child (struct acpi_dp *dp, const char *name, struct acpi_dp *child)
 
size_t acpi_dp_add_property_list (struct acpi_dp *dp, const struct acpi_dp *property_list, size_t property_count)
 
void acpi_dp_write (struct acpi_dp *table)
 
void acpi_device_write_pci_dev (const struct device *dev)
 

Macro Definition Documentation

◆ ACPI_DESCRIPTOR_GPIO

#define ACPI_DESCRIPTOR_GPIO   (ACPI_DESCRIPTOR_LARGE | 12)

Definition at line 38 of file acpi_device.h.

◆ ACPI_DESCRIPTOR_INTERRUPT

#define ACPI_DESCRIPTOR_INTERRUPT   (ACPI_DESCRIPTOR_LARGE | 9)

Definition at line 37 of file acpi_device.h.

◆ ACPI_DESCRIPTOR_LARGE

#define ACPI_DESCRIPTOR_LARGE   (1 << 7)

Definition at line 36 of file acpi_device.h.

◆ ACPI_DESCRIPTOR_SERIAL_BUS

#define ACPI_DESCRIPTOR_SERIAL_BUS   (ACPI_DESCRIPTOR_LARGE | 14)

Definition at line 39 of file acpi_device.h.

◆ ACPI_DT_NAMESPACE_HID

#define ACPI_DT_NAMESPACE_HID   "PRP0001"

Definition at line 51 of file acpi_device.h.

◆ ACPI_GPIO_CFG

#define ACPI_GPIO_CFG (   _gpio,
  _io_restrict,
  _active_low 
)
Value:
{ \
.type = ACPI_GPIO_TYPE_IO, \
.io_restrict = _io_restrict, \
.active_low = _active_low, \
.pin_count = 1, \
.pins = { (_gpio) } }
@ ACPI_GPIO_PULL_DEFAULT
Definition: acpi_device.h:148
@ ACPI_GPIO_TYPE_IO
Definition: acpi_device.h:144

Definition at line 194 of file acpi_device.h.

◆ ACPI_GPIO_INPUT

#define ACPI_GPIO_INPUT (   gpio)    ACPI_GPIO_INPUT_CFG(gpio, 0)

Definition at line 214 of file acpi_device.h.

◆ ACPI_GPIO_INPUT_ACTIVE_HIGH

#define ACPI_GPIO_INPUT_ACTIVE_HIGH (   gpio)    ACPI_GPIO_INPUT_CFG(gpio, 0)

Definition at line 215 of file acpi_device.h.

◆ ACPI_GPIO_INPUT_ACTIVE_LOW

#define ACPI_GPIO_INPUT_ACTIVE_LOW (   gpio)    ACPI_GPIO_INPUT_CFG(gpio, 1)

Definition at line 216 of file acpi_device.h.

◆ ACPI_GPIO_INPUT_CFG

#define ACPI_GPIO_INPUT_CFG (   gpio,
  polarity 
)     ACPI_GPIO_CFG(gpio, ACPI_GPIO_IO_RESTRICT_INPUT, polarity)

Definition at line 211 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_CFG

#define ACPI_GPIO_IRQ_CFG (   _gpio,
  _mode,
  _polarity,
  _wake 
)
Value:
{ \
.irq.mode = _mode, \
.irq.polarity = _polarity, \
.irq.wake = _wake, \
.pin_count = 1, \
.pins = { (_gpio) } }
@ ACPI_GPIO_TYPE_INTERRUPT
Definition: acpi_device.h:143

Definition at line 219 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_EDGE

#define ACPI_GPIO_IRQ_EDGE (   gpio,
  polarity 
)     ACPI_GPIO_IRQ_CFG(gpio, ACPI_IRQ_EDGE_TRIGGERED, polarity, 0)

Definition at line 228 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_EDGE_BOTH

#define ACPI_GPIO_IRQ_EDGE_BOTH (   gpio)     ACPI_GPIO_IRQ_EDGE(gpio, ACPI_IRQ_ACTIVE_BOTH)

Definition at line 249 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_EDGE_BOTH_WAKE

#define ACPI_GPIO_IRQ_EDGE_BOTH_WAKE (   gpio)     ACPI_GPIO_IRQ_EDGE_WAKE(gpio, ACPI_IRQ_ACTIVE_BOTH)

Definition at line 261 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_EDGE_HIGH

#define ACPI_GPIO_IRQ_EDGE_HIGH (   gpio)     ACPI_GPIO_IRQ_EDGE(gpio, ACPI_IRQ_ACTIVE_HIGH)

Definition at line 241 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_EDGE_HIGH_WAKE

#define ACPI_GPIO_IRQ_EDGE_HIGH_WAKE (   gpio)     ACPI_GPIO_IRQ_EDGE_WAKE(gpio, ACPI_IRQ_ACTIVE_HIGH)

Definition at line 253 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_EDGE_LOW

#define ACPI_GPIO_IRQ_EDGE_LOW (   gpio)     ACPI_GPIO_IRQ_EDGE(gpio, ACPI_IRQ_ACTIVE_LOW)

Definition at line 245 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_EDGE_LOW_WAKE

#define ACPI_GPIO_IRQ_EDGE_LOW_WAKE (   gpio)     ACPI_GPIO_IRQ_EDGE_WAKE(gpio, ACPI_IRQ_ACTIVE_LOW)

Definition at line 257 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_EDGE_WAKE

#define ACPI_GPIO_IRQ_EDGE_WAKE (   gpio,
  polarity 
)     ACPI_GPIO_IRQ_CFG(gpio, ACPI_IRQ_EDGE_TRIGGERED, polarity, ACPI_IRQ_WAKE)

Definition at line 231 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_LEVEL

#define ACPI_GPIO_IRQ_LEVEL (   gpio,
  polarity 
)     ACPI_GPIO_IRQ_CFG(gpio, ACPI_IRQ_LEVEL_TRIGGERED, polarity, 0)

Definition at line 234 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_LEVEL_HIGH

#define ACPI_GPIO_IRQ_LEVEL_HIGH (   gpio)     ACPI_GPIO_IRQ_LEVEL(gpio, ACPI_IRQ_ACTIVE_HIGH)

Definition at line 265 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_LEVEL_HIGH_WAKE

#define ACPI_GPIO_IRQ_LEVEL_HIGH_WAKE (   gpio)     ACPI_GPIO_IRQ_LEVEL_WAKE(gpio, ACPI_IRQ_ACTIVE_HIGH)

Definition at line 273 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_LEVEL_LOW

#define ACPI_GPIO_IRQ_LEVEL_LOW (   gpio)     ACPI_GPIO_IRQ_LEVEL(gpio, ACPI_IRQ_ACTIVE_LOW)

Definition at line 269 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_LEVEL_LOW_WAKE

#define ACPI_GPIO_IRQ_LEVEL_LOW_WAKE (   gpio)     ACPI_GPIO_IRQ_LEVEL_WAKE(gpio, ACPI_IRQ_ACTIVE_LOW)

Definition at line 277 of file acpi_device.h.

◆ ACPI_GPIO_IRQ_LEVEL_WAKE

#define ACPI_GPIO_IRQ_LEVEL_WAKE (   gpio,
  polarity 
)     ACPI_GPIO_IRQ_CFG(gpio, ACPI_IRQ_LEVEL_TRIGGERED, polarity, ACPI_IRQ_WAKE)

Definition at line 237 of file acpi_device.h.

◆ ACPI_GPIO_MAX_PINS

#define ACPI_GPIO_MAX_PINS   8

Definition at line 162 of file acpi_device.h.

◆ ACPI_GPIO_OUTPUT

#define ACPI_GPIO_OUTPUT (   gpio)    ACPI_GPIO_OUTPUT_CFG(gpio, 0)

Definition at line 206 of file acpi_device.h.

◆ ACPI_GPIO_OUTPUT_ACTIVE_HIGH

#define ACPI_GPIO_OUTPUT_ACTIVE_HIGH (   gpio)    ACPI_GPIO_OUTPUT_CFG(gpio, 0)

Definition at line 207 of file acpi_device.h.

◆ ACPI_GPIO_OUTPUT_ACTIVE_LOW

#define ACPI_GPIO_OUTPUT_ACTIVE_LOW (   gpio)    ACPI_GPIO_OUTPUT_CFG(gpio, 1)

Definition at line 208 of file acpi_device.h.

◆ ACPI_GPIO_OUTPUT_CFG

#define ACPI_GPIO_OUTPUT_CFG (   gpio,
  active_low 
)     ACPI_GPIO_CFG(gpio, ACPI_GPIO_IO_RESTRICT_OUTPUT, active_low)

Definition at line 203 of file acpi_device.h.

◆ ACPI_GPIO_REVISION_ID

#define ACPI_GPIO_REVISION_ID   1

Definition at line 161 of file acpi_device.h.

◆ ACPI_I2C_SERIAL_BUS_REVISION_ID

#define ACPI_I2C_SERIAL_BUS_REVISION_ID   1 /* TODO: upgrade to 2 */

Definition at line 291 of file acpi_device.h.

◆ ACPI_I2C_TYPE_SPECIFIC_REVISION_ID

#define ACPI_I2C_TYPE_SPECIFIC_REVISION_ID   1

Definition at line 292 of file acpi_device.h.

◆ ACPI_IRQ_CFG

#define ACPI_IRQ_CFG (   _pin,
  _mode,
  _pol,
  _shared,
  _wake 
)
Value:
{ \
.pin = (_pin), \
.mode = (_mode), \
.polarity = (_pol), \
.shared = (_shared), \
.wake = (_wake) }

Definition at line 96 of file acpi_device.h.

◆ ACPI_IRQ_EDGE_HIGH

#define ACPI_IRQ_EDGE_HIGH (   x)
Value:
@ ACPI_IRQ_EXCLUSIVE
Definition: acpi_device.h:79
@ ACPI_IRQ_ACTIVE_HIGH
Definition: acpi_device.h:74
@ ACPI_IRQ_NO_WAKE
Definition: acpi_device.h:84
#define ACPI_IRQ_CFG(_pin, _mode, _pol, _shared, _wake)
Definition: acpi_device.h:96
@ ACPI_IRQ_EDGE_TRIGGERED
Definition: acpi_device.h:68
int x
Definition: edid.c:994

Definition at line 107 of file acpi_device.h.

◆ ACPI_IRQ_EDGE_LOW

#define ACPI_IRQ_EDGE_LOW (   x)

◆ ACPI_IRQ_LEVEL_HIGH

#define ACPI_IRQ_LEVEL_HIGH (   x)
Value:

Definition at line 115 of file acpi_device.h.

◆ ACPI_IRQ_LEVEL_LOW

#define ACPI_IRQ_LEVEL_LOW (   x)

◆ ACPI_IRQ_WAKE_EDGE_HIGH

#define ACPI_IRQ_WAKE_EDGE_HIGH (   x)

◆ ACPI_IRQ_WAKE_EDGE_LOW

#define ACPI_IRQ_WAKE_EDGE_LOW (   x)

◆ ACPI_IRQ_WAKE_LEVEL_HIGH

#define ACPI_IRQ_WAKE_LEVEL_HIGH (   x)

◆ ACPI_IRQ_WAKE_LEVEL_LOW

#define ACPI_IRQ_WAKE_LEVEL_LOW (   x)

◆ ACPI_SERIAL_BUS_TYPE_I2C

#define ACPI_SERIAL_BUS_TYPE_I2C   1

Definition at line 287 of file acpi_device.h.

◆ ACPI_SERIAL_BUS_TYPE_SPI

#define ACPI_SERIAL_BUS_TYPE_SPI   2

Definition at line 288 of file acpi_device.h.

◆ ACPI_SERIAL_BUS_TYPE_UART

#define ACPI_SERIAL_BUS_TYPE_UART   3

Definition at line 289 of file acpi_device.h.

◆ ACPI_SPI_SERIAL_BUS_REVISION_ID

#define ACPI_SPI_SERIAL_BUS_REVISION_ID   1

Definition at line 293 of file acpi_device.h.

◆ ACPI_SPI_TYPE_SPECIFIC_REVISION_ID

#define ACPI_SPI_TYPE_SPECIFIC_REVISION_ID   1

Definition at line 294 of file acpi_device.h.

◆ ACPI_UART_RAW_DEVICE

#define ACPI_UART_RAW_DEVICE (   baud_rate,
  fifo_bytes 
)
Value:
{ \
.initial_baud_rate = (baud_rate), \
.data_bits = ACPI_UART_DATA_BITS_8, \
.stop_bits = ACPI_UART_STOP_BITS_1, \
.parity = ACPI_UART_PARITY_NONE, \
.flow_control = ACPI_UART_FLOW_NONE, \
.rx_fifo_bytes = (fifo_bytes), \
.tx_fifo_bytes = (fifo_bytes), \
.shared = false }
@ ACPI_UART_STOP_BITS_1
Definition: acpi_device.h:356
@ ACPI_UART_DATA_BITS_8
Definition: acpi_device.h:350
@ ACPI_UART_FLOW_NONE
Definition: acpi_device.h:384
@ ACPI_UART_ENDIAN_LITTLE
Definition: acpi_device.h:371
@ ACPI_UART_PARITY_NONE
Definition: acpi_device.h:376

Definition at line 413 of file acpi_device.h.

◆ ACPI_UART_SERIAL_BUS_REVISION_ID

#define ACPI_UART_SERIAL_BUS_REVISION_ID   1

Definition at line 295 of file acpi_device.h.

◆ ACPI_UART_TYPE_SPECIFIC_REVISION_ID

#define ACPI_UART_TYPE_SPECIFIC_REVISION_ID   1

Definition at line 296 of file acpi_device.h.

Enumeration Type Documentation

◆ acpi_dp_type

Enumerator
ACPI_DP_TYPE_UNKNOWN 
ACPI_DP_TYPE_INTEGER 
ACPI_DP_TYPE_STRING 
ACPI_DP_TYPE_REFERENCE 
ACPI_DP_TYPE_TABLE 
ACPI_DP_TYPE_ARRAY 
ACPI_DP_TYPE_CHILD 
ACPI_DP_TYPE_PACKAGE 

Definition at line 10 of file acpi_device.h.

◆ acpi_gpio_io_restrict

Enumerator
ACPI_GPIO_IO_RESTRICT_NONE 
ACPI_GPIO_IO_RESTRICT_INPUT 
ACPI_GPIO_IO_RESTRICT_OUTPUT 
ACPI_GPIO_IO_RESTRICT_PRESERVE 

Definition at line 154 of file acpi_device.h.

◆ acpi_gpio_pull

Enumerator
ACPI_GPIO_PULL_DEFAULT 
ACPI_GPIO_PULL_UP 
ACPI_GPIO_PULL_DOWN 
ACPI_GPIO_PULL_NONE 

Definition at line 147 of file acpi_device.h.

◆ acpi_gpio_type

Enumerator
ACPI_GPIO_TYPE_INTERRUPT 
ACPI_GPIO_TYPE_IO 

Definition at line 142 of file acpi_device.h.

◆ acpi_irq_mode

Enumerator
ACPI_IRQ_EDGE_TRIGGERED 
ACPI_IRQ_LEVEL_TRIGGERED 

Definition at line 67 of file acpi_device.h.

◆ acpi_irq_polarity

Enumerator
ACPI_IRQ_ACTIVE_LOW 
ACPI_IRQ_ACTIVE_HIGH 
ACPI_IRQ_ACTIVE_BOTH 

Definition at line 72 of file acpi_device.h.

◆ acpi_irq_shared

Enumerator
ACPI_IRQ_EXCLUSIVE 
ACPI_IRQ_SHARED 

Definition at line 78 of file acpi_device.h.

◆ acpi_irq_wake

Enumerator
ACPI_IRQ_NO_WAKE 
ACPI_IRQ_WAKE 

Definition at line 83 of file acpi_device.h.

◆ acpi_uart_data_bits

Enumerator
ACPI_UART_DATA_BITS_5 
ACPI_UART_DATA_BITS_6 
ACPI_UART_DATA_BITS_7 
ACPI_UART_DATA_BITS_8 
ACPI_UART_DATA_BITS_9 

Definition at line 346 of file acpi_device.h.

◆ acpi_uart_endian

Enumerator
ACPI_UART_ENDIAN_LITTLE 
ACPI_UART_ENDIAN_BIG 

Definition at line 370 of file acpi_device.h.

◆ acpi_uart_flow_control

Enumerator
ACPI_UART_FLOW_NONE 
ACPI_UART_FLOW_HARDWARE 
ACPI_UART_FLOW_SOFTWARE 

Definition at line 383 of file acpi_device.h.

◆ acpi_uart_lines

Enumerator
ACPI_UART_LINE_DTD 
ACPI_UART_LINE_RI 
ACPI_UART_LINE_DSR 
ACPI_UART_LINE_DTR 
ACPI_UART_LINE_CTS 
ACPI_UART_LINE_RTS 

Definition at line 361 of file acpi_device.h.

◆ acpi_uart_parity

Enumerator
ACPI_UART_PARITY_NONE 
ACPI_UART_PARITY_EVEN 
ACPI_UART_PARITY_ODD 
ACPI_UART_PARITY_MARK 
ACPI_UART_PARITY_SPACE 

Definition at line 375 of file acpi_device.h.

◆ acpi_uart_stop_bits

Enumerator
ACPI_UART_STOP_BITS_0 
ACPI_UART_STOP_BITS_1 
ACPI_UART_STOP_BITS_1_5 
ACPI_UART_STOP_BITS_2 

Definition at line 354 of file acpi_device.h.

Function Documentation

◆ acpi_device_add_power_res()

◆ acpi_device_hid()

const char* acpi_device_hid ( const struct device dev)

Definition at line 78 of file device.c.

References NULL, and device::ops.

Referenced by superio_common_fill_ssdt_generator().

Here is the caller graph for this function:

◆ acpi_device_name()

◆ acpi_device_path()

◆ acpi_device_path_join()

◆ acpi_device_scope()

◆ acpi_device_status()

◆ acpi_device_uid()

uint32_t acpi_device_uid ( const struct device dev)

Definition at line 99 of file device.c.

References acpi_device_path(), CRC, crc32_byte(), device::path, and strlen().

Referenced by acpi_device_write_uid().

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

◆ acpi_device_write_gpio()

◆ acpi_device_write_i2c()

◆ acpi_device_write_interrupt()

◆ acpi_device_write_pci_dev()

void acpi_device_write_pci_dev ( const struct device dev)

Definition at line 1168 of file device.c.

References acpi_device_name(), acpi_device_scope(), acpi_device_status(), acpigen_pop_len(), acpigen_write_ADR_pci_device(), acpigen_write_device(), acpigen_write_scope(), acpigen_write_STA(), assert, DEVICE_PATH_PCI, name, device::path, and device_path::type.

Referenced by graphics_fill_ssdt().

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

◆ acpi_device_write_spi()

◆ acpi_device_write_uart()

◆ acpi_device_write_uid()

void acpi_device_write_uid ( const struct device dev)

Definition at line 203 of file device.c.

References acpi_device_uid(), and acpigen_write_name_integer().

Referenced by crb_tpm_fill_ssdt(), superio_common_fill_ssdt_generator(), and wifi_ssdt_write_device().

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

◆ acpi_dp_add_array()

struct acpi_dp* acpi_dp_add_array ( struct acpi_dp dp,
struct acpi_dp array 
)

◆ acpi_dp_add_child()

struct acpi_dp* acpi_dp_add_child ( struct acpi_dp dp,
const char *  name,
struct acpi_dp child 
)

◆ acpi_dp_add_gpio()

struct acpi_dp* acpi_dp_add_gpio ( struct acpi_dp dp,
const char *  name,
const char *  ref,
int  index,
int  pin,
int  active_low 
)

◆ acpi_dp_add_gpio_array()

struct acpi_dp* acpi_dp_add_gpio_array ( struct acpi_dp dp,
const char *  name,
const struct acpi_gpio_res_params params,
size_t  param_count 
)

Definition at line 1088 of file device.c.

References acpi_dp_add_array(), acpi_dp_add_integer(), acpi_dp_add_reference(), acpi_dp_new_table(), name, NULL, and params.

Referenced by acpi_dp_add_gpio(), and i2c_gpiomux_mux_fill_ssdt().

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

◆ acpi_dp_add_integer()

◆ acpi_dp_add_integer_array()

struct acpi_dp* acpi_dp_add_integer_array ( struct acpi_dp dp,
const char *  name,
const uint64_t array,
int  len 
)

Definition at line 1066 of file device.c.

References acpi_dp_add_array(), acpi_dp_add_integer(), acpi_dp_new_table(), acpi_dp::array, name, and NULL.

Referenced by cs42l42_fill_ssdt().

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

◆ acpi_dp_add_package()

struct acpi_dp* acpi_dp_add_package ( struct acpi_dp dp,
struct acpi_dp package 
)

Definition at line 1036 of file device.c.

References acpi_dp_new(), ACPI_DP_TYPE_PACKAGE, ACPI_DP_TYPE_TABLE, acpi_dp::name, NULL, and acpi_dp::type.

Referenced by pcie_rtd3_acpi_fill_ssdt(), pcie_rtd3_device_acpi_fill_ssdt(), and wifi_ssdt_write_properties().

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

◆ acpi_dp_add_property_list()

◆ acpi_dp_add_reference()

struct acpi_dp* acpi_dp_add_reference ( struct acpi_dp dp,
const char *  name,
const char *  reference 
)

Definition at line 1005 of file device.c.

References acpi_dp_new(), ACPI_DP_TYPE_REFERENCE, name, and NULL.

Referenced by acpi_dp_add_gpio_array(), acpi_dp_add_property_list(), add_device_ref(), camera_fill_cio2(), and camera_fill_sensor().

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

◆ acpi_dp_add_string()

struct acpi_dp* acpi_dp_add_string ( struct acpi_dp dp,
const char *  name,
const char *  string 
)

◆ acpi_dp_new_table()

◆ acpi_dp_write()