Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
drivers/acpi/sbs.c
static int acpi_manager_get_info(struct acpi_sbs *sbs) { int result = 0; u16 battery_system_info; result = acpi_smbus_read(sbs->hc, SMBUS_READ_WORD, ACPI_SBS_MANAGER, 0x04, (u8 *)&battery_system_info); if (!result) sbs->batteries_supported = battery_system_info & 0x000f; retur...
[ 1, 0 ]
Linux Kernel
drivers/acpi/sbs.c
static int acpi_battery_get_info(struct acpi_battery *battery) { int i, result = 0; for (i = 0; i < ARRAY_SIZE(info_readers); ++i) { result = acpi_smbus_read(battery->sbs->hc, info_readers[i].mode, ACPI_SBS_BATTERY, info_readers[i].command, (u8 *)batte...
[ 0, 0 ]
Linux Kernel
drivers/acpi/sbs.c
static ssize_t acpi_battery_alarm_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { unsigned long x; struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev)); if (sscanf(buf, "%lu\n...
[ 0, 0 ]
Linux Kernel
drivers/acpi/sbs.c
static int acpi_battery_add(struct acpi_sbs *sbs, int id) { struct acpi_battery *battery = &sbs->battery[id]; struct power_supply_config psy_cfg = { .drv_data = battery, }; int result; battery->id = id; battery->sbs = sbs; result = acpi_battery_read(battery); if (result) return result; spr...
[ 1, 0 ]
Linux Kernel
drivers/acpi/sbs.c
static void acpi_charger_remove(struct acpi_sbs *sbs) { if (sbs->charger) power_supply_unregister(sbs->charger); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/sbshc.c
static inline void acpi_smbus_callback(void *context) { struct acpi_smb_hc *hc = context; if (hc->callback) hc->callback(hc->context); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/sbshc.c
static void acpi_smbus_hc_remove(struct acpi_device *device) { struct acpi_smb_hc *hc; if (!device) return; hc = acpi_driver_data(device); acpi_ec_remove_query_handler(hc->ec, hc->query_bit); acpi_os_wait_events_complete(); kfree(hc); device->driver_data = NULL; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
void acpi_scan_lock_acquire(void) { mutex_lock(&acpi_scan_lock); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
void acpi_scan_lock_release(void) { mutex_unlock(&acpi_scan_lock); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
void acpi_unlock_hp_context(void) { mutex_unlock(&acpi_hp_context_lock); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static acpi_status acpi_bus_offline(acpi_handle handle, u32 lvl, void *data, void **ret_p) { struct acpi_device *device = acpi_fetch_acpi_dev(handle); struct acpi_device_physical_node *pn; bool second_pass = (bool)data; acpi_status status = AE_OK; if (!device) return A...
[ 1, 0 ]
Linux Kernel
drivers/acpi/scan.c
static int acpi_scan_device_not_present(struct acpi_device *adev) { if (!acpi_device_enumerated(adev)) { dev_warn(&adev->dev, "Still not present\n"); return -EALREADY; } acpi_bus_trim(adev); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static int acpi_scan_device_check(struct acpi_device *adev) { int error; acpi_bus_get_status(adev); if (adev->status.present || adev->status.functional) { if (adev->handler) { dev_warn(&adev->dev, "Already enumerated\n"); return -EALREADY; } error = acpi_bus_scan(adev->handle); if (e...
[ 1, 0 ]
Linux Kernel
drivers/acpi/scan.c
static void acpi_scan_drop_device(acpi_handle handle, void *context) { static DECLARE_WORK(work, acpi_device_del_work_fn); struct acpi_device *adev = context; mutex_lock(&acpi_device_del_lock); if (list_empty(&acpi_device_del_list)) acpi_queue_hotplug_work(&work); list_add_tail(&adev->del_list, &acpi_d...
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static void get_acpi_device(void *dev) { acpi_dev_get(dev); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static struct acpi_device_bus_id *acpi_device_bus_id_match(const char *dev_id) { struct acpi_device_bus_id *acpi_device_bus_id; list_for_each_entry(acpi_device_bus_id, &acpi_bus_id_list, node) { if (!strcmp(acpi_device_bus_id->bus_id, dev_id)) return acpi_device_bus_id; } return NULL; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static void acpi_bus_get_flags(struct acpi_device *device) { if (acpi_has_method(device->handle, "_STA")) device->flags.dynamic_status = 1; /* Presence of _RMV indicates 'removable' */ if (acpi_has_method(device->handle, "_RMV")) device->flags.removable = 1; /* Presence of _EJD|_EJ0 indicates 'ejecta...
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
bool acpi_device_is_battery(struct acpi_device *adev) { struct acpi_hardware_id *hwid; list_for_each_entry(hwid, &adev->pnp.ids, list) if (!strcmp("PNP0C0A", hwid->id)) return true; return false; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static bool acpi_ibm_smbus_match(acpi_handle handle) { char node_name[ACPI_PATH_SEGMENT_LENGTH]; struct acpi_buffer path = {sizeof(node_name), node_name}; if (!dmi_name_in_vendors("IBM")) return false; if (ACPI_FAILURE(acpi_get_name(handle, ACPI_SINGLE_NAME, &path)) || strcmp("SMBS", path.pointer)) ...
[ 1, 0 ]
Linux Kernel
drivers/acpi/scan.c
int acpi_dma_get_range(struct device *dev, const struct bus_dma_region **map) { struct acpi_device *adev; LIST_HEAD(list); struct resource_entry *rentry; int ret; struct device *dma_dev = dev; struct bus_dma_region *r; do { adev = ACPI_COMPANION(dma_dev); if (adev && acpi_has_method(adev->handle,...
[ 1, 0 ]
Linux Kernel
drivers/acpi/scan.c
static const struct iommu_ops *acpi_iommu_configure_id(struct device *dev, const u32 *id_in) { return NULL; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static bool acpi_device_enumeration_by_parent(struct acpi_device *device) { struct list_head resource_list; bool is_serial_bus_slave = false; static const struct acpi_device_id ignore_serial_bus_ids[] = { { "BSG1160", }, { "BSG2150", }, { "CSC3551", ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static void acpi_scan_dep_init(struct acpi_device *adev) { struct acpi_dep_data *dep; list_for_each_entry(dep, &acpi_dep_list, node) { if (dep->consumer == adev->handle) { if (dep->honor_dep) adev->flags.honor_deps = 1; adev->dep_unmet++; } } }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static bool acpi_scan_handler_matching(struct acpi_scan_handler *handler, const char *idstr, const struct acpi_device_id **matchid) { const struct acpi_device_id *devid; if (handler->match) return handler->match(idstr, matchid); ...
[ 1, 0 ]
Linux Kernel
drivers/acpi/scan.c
void acpi_scan_hotplug_enabled(struct acpi_hotplug_profile *hotplug, bool val) { if (!!hotplug->enabled == !!val) return; mutex_lock(&acpi_scan_lock); hotplug->enabled = val; mutex_unlock(&acpi_scan_lock); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static void acpi_scan_init_hotplug(struct acpi_device *adev) { struct acpi_hardware_id *hwid; if (acpi_dock_match(adev->handle) || is_ejectable_bay(adev)) { acpi_dock_add(adev); return; } list_for_each_entry(hwid, &adev->pnp.ids, list) { struct acpi_scan_handler *handler; handler = acpi_scan_...
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static u32 acpi_scan_check_dep(acpi_handle handle, bool check_dep) { struct acpi_handle_list dep_devices; acpi_status status; u32 count; int i; if (!check_dep || !acpi_has_method(handle, "_DEP") || !acpi_has_method(handle, "_HID")) return 0; status = acpi_evaluate_reference(handle, "_DEP", NULL,...
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static acpi_status acpi_bus_check_add_1(acpi_handle handle, u32 lvl_not_used, void *not_used, void **ret_p) { return acpi_bus_check_add(handle, true, (struct acpi_device **)ret_p); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static int acpi_dev_get_next_consumer_dev_cb(struct acpi_dep_data *dep, void *data) { struct acpi_device **adev_p = data; struct acpi_device *adev = *adev_p; if (adev) { if (dep->consumer == adev->handle) *adev_p = NULL; return 0; } adev = acpi_get...
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static int acpi_walk_dep_device_list(acpi_handle handle, int (*callback)(struct acpi_dep_data *, void *), void *data) { struct acpi_dep_data *dep, *tmp; int ret = 0; mutex_lock(&acpi_dep...
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
int acpi_bus_scan(acpi_handle handle) { struct acpi_device *device = NULL; acpi_bus_scan_second_pass = false; if (ACPI_SUCCESS(acpi_bus_check_add(handle, true, &device))) acpi_walk_namespace(ACPI_TYPE_ANY, handle, ACPI_UINT32_MAX, acpi_bus_check_add_1, NULL, NULL, (void **)&device); ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static void __init acpi_get_spcr_uart_addr(void) { acpi_status status; struct acpi_table_spcr *spcr_ptr; status = acpi_get_table(ACPI_SIG_SPCR, 0, (struct acpi_table_header **)&spcr_ptr); if (ACPI_FAILURE(status)) { pr_warn("STAO table present, but SPCR is missing\n"); return; } spcr_uart_a...
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
static int __init acpi_match_madt(union acpi_subtable_headers *header, const unsigned long end) { if (!ape->subtable_valid || ape->subtable_valid(&header->common, ape)) if (!ape->probe_subtbl(header, end)) acpi_probe_count++; return 0; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/scan.c
void acpi_scan_table_notify(void) { struct work_struct *work; if (!acpi_scan_initialized) return; work = kmalloc(sizeof(*work), GFP_KERNEL); if (!work) return; INIT_WORK(work, acpi_table_events_fn); schedule_work(work); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
bool acpi_sleep_state_supported(u8 sleep_state) { acpi_status status; u8 type_a, type_b; status = acpi_get_sleep_type_data(sleep_state, &type_a, &type_b); return ACPI_SUCCESS(status) && (!acpi_gbl_reduced_hardware || (acpi_gbl_FADT.sleep_control.address && acp...
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
void __init acpi_nvs_nosave_s3(void) { nvs_nosave_s3 = true; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
void __init acpi_sleep_no_blacklist(void) { ignore_blacklist = true; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
static int acpi_pm_freeze(void) { acpi_disable_all_gpes(); acpi_os_wait_events_complete(); acpi_ec_block_transactions(); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
static int __acpi_pm_prepare(void) { int error = acpi_sleep_prepare(acpi_target_sleep_state); if (error) acpi_target_sleep_state = ACPI_STATE_S0; return error; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
static int acpi_pm_prepare(void) { int error = __acpi_pm_prepare(); if (!error) error = acpi_pm_pre_suspend(); return error; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
static int acpi_suspend_state_valid(suspend_state_t pm_state) { u32 acpi_state; switch (pm_state) { case PM_SUSPEND_ON: case PM_SUSPEND_STANDBY: case PM_SUSPEND_MEM: acpi_state = acpi_suspend_states[pm_state]; return sleep_states[acpi_state]; default: return 0; } }
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
static int acpi_suspend_begin_old(suspend_state_t pm_state) { int error = acpi_suspend_begin(pm_state); if (!error) error = __acpi_pm_prepare(); return error; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
static void acpi_sleep_suspend_setup(void) { bool suspend_ops_needed = false; int i; for (i = ACPI_STATE_S1; i < ACPI_STATE_S4; i++) if (acpi_sleep_state_supported(i)) { sleep_states[i] = 1; suspend_ops_needed = true; } if (suspend_ops_needed) suspend_set_ops(old_suspend_ordering ? &a...
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
static inline void acpi_sleep_suspend_setup(void) {} #endif
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
static void acpi_hibernation_leave(void) { pm_set_resume_via_firmware(); acpi_enable(); /* Reprogram control registers */ acpi_leave_sleep_state_prep(ACPI_STATE_S4); /* Check the hardware signature */ if (facs && s4_hardware_signature != facs->hardware_signature) pr_crit("Hardware changed while hiberna...
[ 1, 0 ]
Linux Kernel
drivers/acpi/sleep.c
static void acpi_pm_thaw(void) { acpi_ec_unblock_transactions(); acpi_enable_all_runtime_gpes(); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
static inline void acpi_sleep_hibernate_setup(void) {} #endif
[ 0, 0 ]
Linux Kernel
drivers/acpi/sleep.c
static int acpi_power_off(struct sys_off_data *data) { pr_debug("%s called\n", __func__); local_irq_disable(); acpi_enter_sleep_state(ACPI_STATE_S5); return NOTIFY_DONE; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/spcr.c
static bool qdf2400_erratum_44_present(struct acpi_table_header *h) { if (memcmp(h->oem_id, "QCOM ", ACPI_OEM_ID_SIZE)) return false; if (!memcmp(h->oem_table_id, "QDF2432 ", ACPI_OEM_TABLE_ID_SIZE)) return true; if (!memcmp(h->oem_table_id, "QDF2400 ", ACPI_OEM_TABLE_ID_SIZE) && h->oem_revision ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/sysfs.c
static int param_get_debug_layer(char *buffer, const struct kernel_param *kp) { int result = 0; int i; result = sprintf(buffer, "%-25s\tHex SET\n", "Description"); for (i = 0; i < ARRAY_SIZE(acpi_debug_layers); i++) { result += sprintf(buffer + result, "%-25s\t0x%08lX [%c]\n", ...
[ 1, 0 ]
Linux Kernel
drivers/acpi/sysfs.c
static int param_set_trace_method_name(const char *val, const struct kernel_param *kp) { u32 saved_flags = 0; bool is_abs_path = true; if (*val != '\\') is_abs_path = false; if ((is_abs_path && strlen(val) > 1023) || (!is_abs_path && strlen(val) > 1022)) { ...
[ 1, 1 ]
Linux Kernel
drivers/acpi/sysfs.c
static ssize_t acpi_table_show(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t offset, size_t count) { struct acpi_table_attr *table_attr = container_of(bin_attr, struct acpi_table_attr, attr); struct acp...
[ 0, 0 ]
Linux Kernel
drivers/acpi/sysfs.c
static ssize_t acpi_data_show(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t offset, size_t count) { struct acpi_data_attr *data_attr; void __iomem *base; ssize_t size; data_attr = container_of(bin_attr, st...
[ 0, 0 ]
Linux Kernel
drivers/acpi/sysfs.c
static int acpi_table_data_init(struct acpi_table_header *th) { struct acpi_data_attr *data_attr; int i; for (i = 0; i < NUM_ACPI_DATA_OBJS; i++) { if (ACPI_COMPARE_NAMESEG(th->signature, acpi_data_objs[i].name)) { data_attr = kzalloc(sizeof(*data_attr), GFP_KERNEL); if (!data_attr) retu...
[ 0, 0 ]
Linux Kernel
drivers/acpi/sysfs.c
static ssize_t force_remove_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { return sprintf(buf, "%d\n", 0); }
[ 1, 0 ]
Linux Kernel
drivers/acpi/sysfs.c
static ssize_t force_remove_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t size) { bool val; int ret; ret = kstrtobool(buf, &val); if (ret < 0) return ret; if (val) { pr_err("Enabling force_remove ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/sysfs.c
int __init acpi_sysfs_init(void) { int result; result = acpi_tables_sysfs_init(); if (result) return result; hotplug_kobj = kobject_create_and_add("hotplug", acpi_kobj); if (!hotplug_kobj) return -ENOMEM; result = sysfs_create_file(hotplug_kobj, &force_remove_attr.attr); if (result) return...
[ 0, 0 ]
Linux Kernel
drivers/acpi/tables.c
static unsigned long __init_or_acpilib acpi_get_entry_type(struct acpi_subtable_entry *entry) { switch (entry->type) { case ACPI_SUBTABLE_COMMON: return entry->hdr->common.type; case ACPI_SUBTABLE_HMAT: return entry->hdr->hmat.type; case ACPI_SUBTABLE_PRMT: return 0; case ACPI_SUBTABLE_CEDT: ...
[ 1, 0 ]
Linux Kernel
drivers/acpi/tables.c
static unsigned long __init_or_acpilib acpi_get_entry_length(struct acpi_subtable_entry *entry) { switch (entry->type) { case ACPI_SUBTABLE_COMMON: return entry->hdr->common.length; case ACPI_SUBTABLE_HMAT: return entry->hdr->hmat.length; case ACPI_SUBTABLE_PRMT: return entry->hdr->prmt.length; c...
[ 1, 0 ]
Linux Kernel
drivers/acpi/tables.c
static unsigned long __init_or_acpilib acpi_get_subtable_header_length(struct acpi_subtable_entry *entry) { switch (entry->type) { case ACPI_SUBTABLE_COMMON: return sizeof(entry->hdr->common); case ACPI_SUBTABLE_HMAT: return sizeof(entry->hdr->hmat); case ACPI_SUBTABLE_PRMT: return sizeof(entry->hd...
[ 1, 0 ]
Linux Kernel
drivers/acpi/tables.c
static __init_or_acpilib bool has_handler(struct acpi_subtable_proc *proc) { return proc->handler || proc->handler_arg; }
[ 1, 0 ]
Linux Kernel
drivers/acpi/tables.c
static __init_or_acpilib int call_handler(struct acpi_subtable_proc *proc, union acpi_subtable_headers *hdr, unsigned long end) { if (proc->handler) return proc->handler(hdr, end); if (proc->handler_arg) return proc->handle...
[ 0, 0 ]
Linux Kernel
drivers/acpi/tables.c
int __init_or_acpilib acpi_table_parse_entries_array( char *id, unsigned long table_size, struct acpi_subtable_proc *proc, int proc_num, unsigned int max_entries) { struct acpi_table_header *table_header = NULL; int count; u32 instance = 0; if (acpi_disabled) return -ENODEV; if (!id) return...
[ 0, 0 ]
Linux Kernel
drivers/acpi/tables.c
static acpi_status acpi_table_initrd_override(struct acpi_table_header *existing_table, acpi_physical_address *address, u32 *table_length) { *table_length = 0; *address = 0; return AE_OK; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/tables.c
void __init acpi_reserve_initial_tables(void) { int i; for (i = 0; i < ACPI_MAX_TABLES; i++) { struct acpi_table_desc *table_desc = &initial_tables[i]; u64 start = table_desc->address; u64 size = table_desc->length; if (!start || !size) break; pr_info("Reserving %4s table memory at [me...
[ 1, 0 ]
Linux Kernel
drivers/acpi/thermal.c
static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) { acpi_status status = AE_OK; unsigned long long tmp; if (!tz) return -EINVAL; status = acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, &tmp); if (ACPI_FAILURE(status)) return -ENODEV; tz->polling_frequency = tmp; a...
[ 1, 0 ]
Linux Kernel
drivers/acpi/thermal.c
static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode) { if (!tz) return -EINVAL; if (ACPI_FAILURE( acpi_execute_simple_method(tz->device->handle, "_SCP", mode))) return -ENODEV; return 0; } #define ACPI_TRIPS_CRITICAL 0x01 #define ACPI_TRIPS_HOT 0x02 #define ACPI_TRIPS_P...
[ 1, 1 ]
Linux Kernel
drivers/acpi/thermal.c
static void acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz) { sysfs_remove_link(&tz->device->dev.kobj, "thermal_zone"); sysfs_remove_link(&tz->thermal_zone->device.kobj, "device"); thermal_zone_device_unregister(tz->thermal_zone); tz->thermal_zone = NULL; acpi_bus_detach_private_data(tz->device...
[ 0, 0 ]
Linux Kernel
drivers/acpi/thermal.c
static void acpi_thermal_guess_offset(struct acpi_thermal *tz) { if (tz->trips.critical.flags.valid && (tz->trips.critical.temperature % 5) == 1) tz->kelvin_offset = 273100; else tz->kelvin_offset = 273200; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/thermal.c
static void acpi_thermal_check_fn(struct work_struct *work) { struct acpi_thermal *tz = container_of(work, struct acpi_thermal, thermal_check_work); if (!refcount_dec_not_one(&tz->thermal_check_count)) return; mutex_lock(&tz->thermal_check_lock); thermal_zone_device_update(tz->thermal_zone, THERMAL...
[ 0, 0 ]
Linux Kernel
drivers/acpi/thermal.c
static void acpi_thermal_remove(struct acpi_device *device) { struct acpi_thermal *tz; if (!device || !acpi_driver_data(device)) return; flush_workqueue(acpi_thermal_pm_queue); tz = acpi_driver_data(device); acpi_thermal_unregister_thermal_zone(tz); kfree(tz); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/thermal.c
static int thermal_act(const struct dmi_system_id *d) { if (act == 0) { pr_notice("%s detected: disabling all active thermal trip points\n", d->ident); act = -1; } return 0; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/thermal.c
static int thermal_nocrt(const struct dmi_system_id *d) { pr_notice("%s detected: disabling all critical thermal trip point actions.\n", d->ident); nocrt = 1; return 0; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/thermal.c
static int __init acpi_thermal_init(void) { int result; dmi_check_system(thermal_dmi_table); if (off) { pr_notice("thermal control disabled\n"); return -ENODEV; } acpi_thermal_pm_queue = alloc_workqueue("acpi_thermal_pm", WQ_HIGHPRI | WQ_MEM_RECLAIM, 0); if (!acpi_thermal_pm_queue) ret...
[ 0, 0 ]
Linux Kernel
drivers/acpi/tiny-power-button.c
static void acpi_noop_remove(struct acpi_device *device) {}
[ 0, 0 ]
Linux Kernel
drivers/acpi/utils.c
acpi_status acpi_evaluate_integer(acpi_handle handle, acpi_string pathname, struct acpi_object_list *arguments, unsigned long long *data) { acpi_status status = AE_OK; union acpi_object element; struct acpi_buffer buffer = {0, NULL}; if (!dat...
[ 1, 0 ]
Linux Kernel
drivers/acpi/utils.c
acpi_status acpi_execute_simple_method(acpi_handle handle, char *method, u64 arg) { union acpi_object obj = {.type = ACPI_TYPE_INTEGER}; struct acpi_object_list arg_list = { .count = 1, .pointer = &obj, }; obj.integer.value = arg; return acpi_evaluate_obje...
[ 0, 0 ]
Linux Kernel
drivers/acpi/utils.c
int acpi_dev_uid_to_integer(struct acpi_device *adev, u64 *integer) { const char *uid; if (!adev) return -ENODEV; uid = acpi_device_uid(adev); if (!uid) return -ENODATA; return kstrtou64(uid, 0, integer); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/utils.c
struct acpi_device *acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv) { return acpi_dev_get_next_match_dev(NULL, hid, uid, hrv); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/utils.c
static int __init acpi_backlight(char *str) { strscpy(acpi_video_backlight_string, str, sizeof(acpi_video_backlight_string)); return 1; }
[ 1, 0 ]
Linux Kernel
drivers/acpi/video_detect.c
static acpi_status find_video(acpi_handle handle, u32 lvl, void *context, void **rv) { struct acpi_device *acpi_dev = acpi_fetch_acpi_dev(handle); long *cap = context; struct pci_dev *dev; static const struct acpi_device_id video_ids[] = { {ACPI_VIDEO_HID, 0}, {"", 0},...
[ 0, 0 ]
Linux Kernel
drivers/acpi/video_detect.c
static bool nvidia_wmi_ec_supported(void) { return false; } #endif
[ 0, 0 ]
Linux Kernel
drivers/acpi/video_detect.c
static bool google_cros_ec_present(void) { return acpi_dev_found("GOOG0004") || acpi_dev_found("GOOG000C"); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/video_detect.c
static bool prefer_native_over_acpi_video(void) { return acpi_osi_is_win8() || google_cros_ec_present(); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/viot.c
static struct viot_iommu *__init viot_get_iommu(unsigned int offset) { int ret; struct viot_iommu *viommu; struct acpi_viot_header *hdr = ACPI_ADD_PTR(struct acpi_viot_header, viot, offset); union { struct acpi_viot_virtio_iommu_pci pci; struct acpi_viot_virtio_iommu_mmio mmio; } *node = (void ...
[ 1, 0 ]
Linux Kernel
drivers/acpi/viot.c
static int viot_mmio_dev_iommu_init(struct platform_device *pdev) { struct resource *mem; struct viot_endpoint *ep; mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!mem) return -ENODEV; list_for_each_entry(ep, &viot_mmio_endpoints, list) { if (ep->address == mem->start) return viot_...
[ 0, 0 ]
Linux Kernel
drivers/acpi/wakeup.c
void acpi_enable_wakeup_devices(u8 sleep_state) { struct acpi_device *dev, *tmp; list_for_each_entry_safe(dev, tmp, &acpi_wakeup_device_list, wakeup_list) { if (!dev->wakeup.flags.valid || sleep_state > (u32)dev->wakeup.sleep_state || !(device_may_wakeup(&dev->dev) || dev->wakeup.prepare_count)...
[ 1, 0 ]
Linux Kernel
drivers/acpi/wakeup.c
void acpi_unregister_wakeup_handler(bool (*wakeup)(void *context), void *context) { struct acpi_wakeup_handler *handler; mutex_lock(&acpi_wakeup_handler_mutex); list_for_each_entry(handler, &acpi_wakeup_handler_head, list_node) { if (handler->wakeup == wakeup && handler->c...
[ 1, 0 ]
Linux Kernel
drivers/acpi/x86/s2idle.c
static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, guid_t dsm_guid) { union acpi_object *out_obj; if (!(func_mask & (1 << func))) return; out_obj = acpi_evaluate_dsm(lps0_device_handle, &dsm_guid, rev_id, func, NULL); ACPI_FREE(out_obj...
[ 0, 0 ]
Linux Kernel
drivers/acpi/x86/s2idle.c
void acpi_s2idle_restore_early(void) { struct acpi_s2idle_dev_ops *handler; if (!lps0_device_handle || sleep_no_lps0) return; list_for_each_entry(handler, &lps0_s2idle_devops_head, list_node) if (handler->restore) handler->restore(); if (lps0_dsm_func_mask_microsoft > 0) acpi_sl...
[ 0, 0 ]
Linux Kernel
drivers/acpi/x86/utils.c
bool force_storage_d3(void) { const struct dmi_system_id *dmi_id = dmi_first_match(force_storage_d3_dmi); return dmi_id || x86_match_cpu(storage_d3_cpu_ids); } #define ACPI_QUIRK_SKIP_I2C_CLIENTS BIT(0) #define ACPI_QUIRK_UART1_TTY_UART2_SKIP BIT(1) #define ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY BIT(2) #define ACPI_...
[ 0, 0 ]
Linux Kernel
drivers/acpi/x86/utils.c
bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev) { const struct dmi_system_id *dmi_id; long quirks; dmi_id = dmi_first_match(acpi_quirk_skip_dmi_ids); if (!dmi_id) return false; quirks = (unsigned long)dmi_id->driver_data; if (!(quirks & ACPI_QUIRK_SKIP_I2C_CLIENTS)) return f...
[ 0, 0 ]
Linux Kernel
drivers/amba/bus.c
static ssize_t driver_override_show(struct device *_dev, struct device_attribute *attr, char *buf) { struct amba_device *dev = to_amba_device(_dev); ssize_t len; device_lock(_dev); len = sprintf(buf, "%s\n", dev->driver_override); device_unlock(_dev); return len; }
[ 1, 0 ]
Linux Kernel
drivers/amba/bus.c
static int amba_match(struct device *dev, struct device_driver *drv) { struct amba_device *pcdev = to_amba_device(dev); struct amba_driver *pcdrv = to_amba_driver(drv); mutex_lock(&pcdev->periphid_lock); if (!pcdev->periphid) { int ret = amba_read_periphid(pcdev); if (ret) { mutex_unlock(&pcdev-...
[ 0, 0 ]
Linux Kernel
drivers/amba/bus.c
static int amba_uevent(struct device *dev, struct kobj_uevent_env *env) { struct amba_device *pcdev = to_amba_device(dev); int retval = 0; retval = add_uevent_var(env, "AMBA_ID=%08x", pcdev->periphid); if (retval) return retval; retval = add_uevent_var(env, "MODALIAS=amba:d%08X", pcdev->periphid); re...
[ 0, 0 ]
Linux Kernel
drivers/amba/bus.c
static int of_amba_device_decode_irq(struct amba_device *dev) { struct device_node *node = dev->dev.of_node; int i, irq = 0; if (IS_ENABLED(CONFIG_OF_IRQ) && node) { for (i = 0; i < AMBA_NR_IRQS; i++) { irq = of_irq_get(node, i); if (irq < 0) { if (irq == -EPROBE_DEFER) return ...
[ 0, 0 ]
Linux Kernel
drivers/amba/bus.c
static int amba_proxy_probe(struct amba_device *adev, const struct amba_id *id) { WARN(1, "Stub driver should never match any device.\n"); return -ENODEV; }
[ 0, 0 ]
Linux Kernel
drivers/amba/bus.c
int amba_driver_register(struct amba_driver *drv) { if (!drv->probe) return -EINVAL; drv->drv.bus = &amba_bustype; return driver_register(&drv->drv); }
[ 0, 0 ]
Linux Kernel
drivers/amba/bus.c
int amba_device_add(struct amba_device *dev, struct resource *parent) { int ret; ret = request_resource(parent, &dev->res); if (ret) return ret; if (!dev->periphid) { /* * AMBA device uevents require reading its pid and cid * registers. To do this, the device must be on, clocked and * ...
[ 0, 0 ]
Linux Kernel
drivers/amba/bus.c
struct amba_device *amba_device_alloc(const char *name, resource_size_t base, size_t size) { struct amba_device *dev; dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (dev) { amba_device_initialize(dev, name); dev->res.start = base; dev->res.end = base + size - 1; ...
[ 0, 0 ]