34 if (!res || !res->
base)
38 for (
size_t k = 0; k < 4; k++) {
48 if (!res || !res->
size)
51 for (
size_t k = 0; k < 2; k++) {
67 if (!res || !res->
base || !res->
size)
73 if (!res || !res->
size || res->
base > 16)
86 if (!res || !res->
base)
100 if (!res || !res->
size || res->
base >= 16)
102 irq |= 1 << res->
base;
115 if (!res || !res->
base || !res->
size)
143 static const struct {
155 for (
size_t i = 0; hid && i <
ARRAY_SIZE(lookup); i++) {
156 if (
strcmp(hid, lookup[i].hid) == 0)
157 return lookup[i].
name;
159 return "Generic device";
164 if (!dev || !dev->
bus || !dev->
bus->
dev) {
191 if (!scope || !
name) {
void acpi_device_write_uid(const struct device *dev)
const char * acpi_device_hid(const struct device *dev)
const char * acpi_device_name(const struct device *dev)
const char * acpi_device_scope(const struct device *dev)
void acpigen_emit_namestring(const char *namepath)
void acpigen_write_store(void)
void acpigen_write_integer(uint64_t data)
void acpigen_pop_len(void)
void acpigen_write_name_byte(const char *name, uint8_t val)
void acpigen_write_scope(const char *name)
void acpigen_write_resourcetemplate_footer(void)
void acpigen_write_irq(u16 mask)
void acpigen_write_name_integer(const char *name, uint64_t val)
void acpigen_emit_byte(unsigned char b)
void acpigen_write_resourcetemplate_header(void)
void acpigen_write_device(const char *name)
void acpigen_write_io16(u16 min, u16 max, u8 align, u8 len, u8 decode16)
void acpigen_write_method(const char *name, int nargs)
void acpigen_write_name(const char *name)
void acpigen_write_name_string(const char *name, const char *string)
#define printk(level,...)
struct resource * probe_resource(const struct device *dev, unsigned int index)
See if a resource structure already exists for a given index.
const char * dev_path(const struct device *dev)
#define ACPI_HID_KEYBOARD
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_CRIT
BIOS_CRIT - Recovery unlikely.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
#define BIOS_WARNING
BIOS_WARNING - Bad configuration.
int strcmp(const char *s1, const char *s2)
DEVTREE_CONST struct device * dev
enum device_path_type type
DEVTREE_CONST struct bus * bus
static const u8 irq_idx[]
static void ldn_gen_resources_use(const struct device *dev)
const char * superio_common_ldn_acpi_name(const struct device *dev)
void superio_common_fill_ssdt_generator(const struct device *dev)
static void ldn_gen_resources(const struct device *dev)
static bool has_resources(const struct device *dev)
static const char * name_from_hid(const char *hid)
static const struct superio_dev superio_devs[]
static const struct superio_dev * superio_guess_function(const struct device *dev)
int snprintf(char *buf, size_t size, const char *fmt,...)
Note: This file is only for POSIX compatibility, and is meant to be chain-included via string....