/drivers/hwmon/ |
D | acpi_power_meter.c | 109 static int update_avg_interval(struct acpi_power_meter_resource *resource) in update_avg_interval() argument 114 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_GAI", in update_avg_interval() 117 acpi_evaluation_failure_warn(resource->acpi_dev->handle, "_GAI", in update_avg_interval() 122 resource->avg_interval = data; in update_avg_interval() 131 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in show_avg_interval() local 133 mutex_lock(&resource->lock); in show_avg_interval() 134 update_avg_interval(resource); in show_avg_interval() 135 mutex_unlock(&resource->lock); in show_avg_interval() 137 return sprintf(buf, "%llu\n", resource->avg_interval); in show_avg_interval() 145 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; in set_avg_interval() local [all …]
|
/drivers/acpi/ |
D | power.c | 61 struct acpi_power_resource *resource; member 95 struct acpi_power_resource *resource = acpi_power_get_context(handle); in acpi_power_resources_list_add() local 98 if (!resource || !list) in acpi_power_resources_list_add() 105 entry->resource = resource; in acpi_power_resources_list_add() 110 if (e->resource->order > resource->order) { in acpi_power_resources_list_add() 205 static int acpi_power_get_state(struct acpi_power_resource *resource, u8 *state) in acpi_power_get_state() argument 207 if (resource->state == ACPI_POWER_RESOURCE_STATE_UNKNOWN) { in acpi_power_get_state() 210 ret = __get_state(resource->device.handle, &resource->state); in acpi_power_get_state() 215 *state = resource->state; in acpi_power_get_state() 229 struct acpi_power_resource *resource = entry->resource; in acpi_power_get_list_state() local [all …]
|
D | pci_link.c | 84 static acpi_status acpi_pci_link_check_possible(struct acpi_resource *resource, in acpi_pci_link_check_possible() argument 91 switch (resource->type) { in acpi_pci_link_check_possible() 97 struct acpi_resource_irq *p = &resource->data.irq; in acpi_pci_link_check_possible() 123 &resource->data.extended_irq; in acpi_pci_link_check_possible() 148 resource->type); in acpi_pci_link_check_possible() 173 static acpi_status acpi_pci_link_check_current(struct acpi_resource *resource, in acpi_pci_link_check_current() argument 178 switch (resource->type) { in acpi_pci_link_check_current() 184 struct acpi_resource_irq *p = &resource->data.irq; in acpi_pci_link_check_current() 199 &resource->data.extended_irq; in acpi_pci_link_check_current() 214 resource->type); in acpi_pci_link_check_current() [all …]
|
/drivers/misc/vmw_vmci/ |
D | vmci_resource.c | 32 return hash_32(handle.resource, VMCI_RESOURCE_HASH_BITS); in vmci_resource_hash() 41 struct vmci_resource *r, *resource = NULL; in vmci_resource_lookup() local 48 u32 rid = r->handle.resource; in vmci_resource_lookup() 51 rid == handle.resource && in vmci_resource_lookup() 54 resource = r; in vmci_resource_lookup() 60 return resource; in vmci_resource_lookup() 99 int vmci_resource_add(struct vmci_resource *resource, in vmci_resource_add() argument 109 if (handle.resource == VMCI_INVALID_ID) { in vmci_resource_add() 110 handle.resource = vmci_resource_find_id(handle.context, in vmci_resource_add() 112 if (handle.resource == VMCI_INVALID_ID) { in vmci_resource_add() [all …]
|
D | vmci_datagram.c | 27 struct vmci_resource resource; member 87 result = vmci_resource_add(&entry->resource, in dg_create_handle() 92 handle.context, handle.resource, result); in dg_create_handle() 97 *out_handle = vmci_resource_handle(&entry->resource); in dg_create_handle() 114 struct vmci_resource *resource; in vmci_datagram_get_priv_flags() local 116 resource = vmci_resource_by_handle(handle, in vmci_datagram_get_priv_flags() 118 if (!resource) in vmci_datagram_get_priv_flags() 121 src_entry = container_of(resource, struct datagram_entry, in vmci_datagram_get_priv_flags() 122 resource); in vmci_datagram_get_priv_flags() 124 vmci_resource_put(resource); in vmci_datagram_get_priv_flags() [all …]
|
D | vmci_doorbell.c | 34 struct vmci_resource resource; member 92 struct vmci_resource *resource; in vmci_dbell_get_priv_flags() local 94 resource = vmci_resource_by_handle(handle, in vmci_dbell_get_priv_flags() 96 if (!resource) in vmci_dbell_get_priv_flags() 99 entry = container_of(resource, struct dbell_entry, resource); in vmci_dbell_get_priv_flags() 101 vmci_resource_put(resource); in vmci_dbell_get_priv_flags() 142 vmci_resource_get(&entry->resource); in dbell_index_table_add() 221 vmci_resource_put(&entry->resource); in dbell_index_table_remove() 286 vmci_resource_put(&entry->resource); in dbell_delayed_dispatch() 295 struct vmci_resource *resource; in vmci_dbell_host_context_notify() local [all …]
|
/drivers/bus/fsl-mc/ |
D | fsl-mc-allocator.c | 38 struct fsl_mc_resource *resource; in fsl_mc_resource_pool_add_device() local 46 if (mc_dev->resource) in fsl_mc_resource_pool_add_device() 63 resource = devm_kzalloc(&mc_bus_dev->dev, sizeof(*resource), in fsl_mc_resource_pool_add_device() 65 if (!resource) { in fsl_mc_resource_pool_add_device() 72 resource->type = pool_type; in fsl_mc_resource_pool_add_device() 73 resource->id = mc_dev->obj_desc.id; in fsl_mc_resource_pool_add_device() 74 resource->data = mc_dev; in fsl_mc_resource_pool_add_device() 75 resource->parent_pool = res_pool; in fsl_mc_resource_pool_add_device() 76 INIT_LIST_HEAD(&resource->node); in fsl_mc_resource_pool_add_device() 77 list_add_tail(&resource->node, &res_pool->free_list); in fsl_mc_resource_pool_add_device() [all …]
|
/drivers/tty/ipwireless/ |
D | main.c | 84 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; in ipwireless_probe() 85 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; in ipwireless_probe() 95 if (!request_region(p_dev->resource[0]->start, in ipwireless_probe() 96 resource_size(p_dev->resource[0]), in ipwireless_probe() 102 p_dev->resource[2]->flags |= in ipwireless_probe() 105 ret = pcmcia_request_window(p_dev, p_dev->resource[2], 0); in ipwireless_probe() 109 ret = pcmcia_map_mem_page(p_dev, p_dev->resource[2], p_dev->card_addr); in ipwireless_probe() 113 ipw->is_v2_card = resource_size(p_dev->resource[2]) == 0x100; in ipwireless_probe() 115 ipw->common_memory = ioremap(p_dev->resource[2]->start, in ipwireless_probe() 116 resource_size(p_dev->resource[2])); in ipwireless_probe() [all …]
|
/drivers/net/ipa/ |
D | ipa_resource.c | 47 const struct ipa_resource *resource; in ipa_resource_limits_valid() local 49 resource = &data->resource_src[i]; in ipa_resource_limits_valid() 51 if (resource->limits[j].min || resource->limits[j].max) in ipa_resource_limits_valid() 60 const struct ipa_resource *resource; in ipa_resource_limits_valid() local 62 resource = &data->resource_dst[i]; in ipa_resource_limits_valid() 64 if (resource->limits[j].min || resource->limits[j].max) in ipa_resource_limits_valid() 93 const struct ipa_resource *resource; in ipa_resource_config_src() local 96 resource = &data->resource_src[resource_type]; in ipa_resource_config_src() 99 ylimits = group_count == 1 ? NULL : &resource->limits[1]; in ipa_resource_config_src() 100 ipa_resource_config_common(ipa, offset, &resource->limits[0], ylimits); in ipa_resource_config_src() [all …]
|
/drivers/vme/ |
D | vme.c | 48 static struct vme_bridge *find_bridge(struct vme_resource *resource) in find_bridge() argument 51 switch (resource->type) { in find_bridge() 53 return list_entry(resource->entry, struct vme_master_resource, in find_bridge() 56 return list_entry(resource->entry, struct vme_slave_resource, in find_bridge() 59 return list_entry(resource->entry, struct vme_dma_resource, in find_bridge() 62 return list_entry(resource->entry, struct vme_lm_resource, in find_bridge() 81 void *vme_alloc_consistent(struct vme_resource *resource, size_t size, in vme_alloc_consistent() argument 86 if (!resource) { in vme_alloc_consistent() 91 bridge = find_bridge(resource); in vme_alloc_consistent() 121 void vme_free_consistent(struct vme_resource *resource, size_t size, in vme_free_consistent() argument [all …]
|
/drivers/acpi/acpica/ |
D | rsmisc.c | 35 acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, in acpi_rs_convert_aml_to_resource() argument 54 if (((acpi_size)resource) & 0x3) { in acpi_rs_convert_aml_to_resource() 60 resource, resource->type, resource->length)); in acpi_rs_convert_aml_to_resource() 81 ACPI_ADD_PTR(void, resource, info->resource_offset); in acpi_rs_convert_aml_to_resource() 88 memset(resource, 0, INIT_RESOURCE_LENGTH(info)); in acpi_rs_convert_aml_to_resource() 89 resource->type = INIT_RESOURCE_TYPE(info); in acpi_rs_convert_aml_to_resource() 90 resource->length = INIT_RESOURCE_LENGTH(info); in acpi_rs_convert_aml_to_resource() 138 resource->length = resource->length + in acpi_rs_convert_aml_to_resource() 147 resource->length = resource->length + in acpi_rs_convert_aml_to_resource() 156 resource->length = resource->length + item_count; in acpi_rs_convert_aml_to_resource() [all …]
|
D | rslist.c | 36 struct acpi_resource *resource; in acpi_rs_convert_aml_to_resources() local 47 resource = *resource_ptr; in acpi_rs_convert_aml_to_resources() 48 if (ACPI_IS_MISALIGNED(resource)) { in acpi_rs_convert_aml_to_resources() 50 "Misaligned resource pointer %p", resource)); in acpi_rs_convert_aml_to_resources() 83 acpi_rs_convert_aml_to_resource(resource, aml_resource, in acpi_rs_convert_aml_to_resources() 92 if (!resource->length) { in acpi_rs_convert_aml_to_resources() 100 resource->length)); in acpi_rs_convert_aml_to_resources() 104 *resource_ptr = ACPI_NEXT_RESOURCE(resource); in acpi_rs_convert_aml_to_resources() 128 acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, in acpi_rs_convert_resources_to_aml() argument 144 if (resource->type > ACPI_RESOURCE_TYPE_MAX) { in acpi_rs_convert_resources_to_aml() [all …]
|
D | rscalc.c | 154 acpi_rs_get_aml_length(struct acpi_resource *resource, in acpi_rs_get_aml_length() argument 166 ACPI_ADD_PTR(struct acpi_resource, resource, resource_list_size); in acpi_rs_get_aml_length() 167 while (resource < resource_end) { in acpi_rs_get_aml_length() 171 if (resource->type > ACPI_RESOURCE_TYPE_MAX) { in acpi_rs_get_aml_length() 177 if (!resource->length) { in acpi_rs_get_aml_length() 183 total_size = acpi_gbl_aml_resource_sizes[resource->type]; in acpi_rs_get_aml_length() 189 switch (resource->type) { in acpi_rs_get_aml_length() 194 if (resource->data.irq.descriptor_length == 2) { in acpi_rs_get_aml_length() 203 if (resource->data.irq.descriptor_length == 0) { in acpi_rs_get_aml_length() 215 if (resource->data.vendor.byte_length > 7) { in acpi_rs_get_aml_length() [all …]
|
D | rsxface.c | 35 acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context); 332 acpi_resource_to_address64(struct acpi_resource *resource, in ACPI_EXPORT_SYMBOL() 338 if (!resource || !out) { in ACPI_EXPORT_SYMBOL() 344 switch (resource->type) { in ACPI_EXPORT_SYMBOL() 349 &resource->data); in ACPI_EXPORT_SYMBOL() 357 &resource->data); in ACPI_EXPORT_SYMBOL() 365 memcpy(out, &resource->data, in ACPI_EXPORT_SYMBOL() 442 acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) in ACPI_EXPORT_SYMBOL() 451 if (resource->type != ACPI_RESOURCE_TYPE_VENDOR) { in ACPI_EXPORT_SYMBOL() 455 vendor = &resource->data.vendor_typed; in ACPI_EXPORT_SYMBOL() [all …]
|
/drivers/tty/serial/8250/ |
D | serial_cs.c | 390 if ((p_dev->resource[1]->end != 0) && in pfc_config() 391 (resource_size(p_dev->resource[1]) == 8)) { in pfc_config() 392 port = p_dev->resource[1]->start; in pfc_config() 395 (resource_size(p_dev->resource[0]) == 0x40)) { in pfc_config() 396 port = p_dev->resource[0]->start + 0x28; in pfc_config() 411 if (p_dev->resource[0]->start == 0) in simple_config_check() 417 if (p_dev->resource[0]->end != size_table[(*try >> 1)]) in simple_config_check() 420 p_dev->resource[0]->end = 8; in simple_config_check() 421 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; in simple_config_check() 422 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; in simple_config_check() [all …]
|
/drivers/block/drbd/ |
D | drbd_debugfs.c | 128 static void seq_print_resource_pending_meta_io(struct seq_file *m, struct drbd_resource *resource, … in seq_print_resource_pending_meta_io() argument 135 idr_for_each_entry(&resource->devices, device, i) { in seq_print_resource_pending_meta_io() 156 static void seq_print_waiting_for_AL(struct seq_file *m, struct drbd_resource *resource, unsigned l… in seq_print_waiting_for_AL() argument 163 idr_for_each_entry(&resource->devices, device, i) { in seq_print_waiting_for_AL() 168 spin_lock_irq(&device->resource->req_lock); in seq_print_waiting_for_AL() 177 spin_unlock_irq(&device->resource->req_lock); in seq_print_waiting_for_AL() 197 spin_lock_irq(&device->resource->req_lock); in seq_print_device_bitmap_io() 206 spin_unlock_irq(&device->resource->req_lock); in seq_print_device_bitmap_io() 216 static void seq_print_resource_pending_bitmap_io(struct seq_file *m, struct drbd_resource *resource… in seq_print_resource_pending_bitmap_io() argument 223 idr_for_each_entry(&resource->devices, device, i) { in seq_print_resource_pending_bitmap_io() [all …]
|
D | drbd_nl.c | 234 adm_ctx->resource = drbd_find_resource(adm_ctx->resource_name); in drbd_adm_prepare() 241 if (!adm_ctx->resource && (flags & DRBD_ADM_NEED_RESOURCE)) { in drbd_adm_prepare() 249 if (adm_ctx->resource) { in drbd_adm_prepare() 269 if (adm_ctx->device && adm_ctx->resource && in drbd_adm_prepare() 270 adm_ctx->device->resource != adm_ctx->resource) { in drbd_adm_prepare() 272 adm_ctx->minor, adm_ctx->resource->name, in drbd_adm_prepare() 273 adm_ctx->device->resource->name); in drbd_adm_prepare() 282 adm_ctx->device->vnr, adm_ctx->device->resource->name); in drbd_adm_prepare() 288 if (!adm_ctx->resource) { in drbd_adm_prepare() 289 adm_ctx->resource = adm_ctx->device ? adm_ctx->device->resource in drbd_adm_prepare() [all …]
|
/drivers/pci/ |
D | setup-bus.c | 33 struct resource *res; 61 struct resource *res, resource_size_t add_size, in add_to_list() 83 static void remove_from_list(struct list_head *head, struct resource *res) in remove_from_list() 97 struct resource *res) in res_to_dev_res() 110 struct resource *res) in get_res_add_size() 119 struct resource *res) in get_res_add_align() 134 struct resource *r; in pdev_sort_resources() 139 r = &dev->resource[i]; in pdev_sort_resources() 197 static inline void reset_resource(struct resource *res) in reset_resource() 218 struct resource *res; in reassign_resources_sorted() [all …]
|
D | setup-res.c | 32 struct resource *res = dev->resource + resno; in pci_std_update_resource() 131 int pci_claim_resource(struct pci_dev *dev, int resource) in pci_claim_resource() argument 133 struct resource *res = &dev->resource[resource]; in pci_claim_resource() 134 struct resource *root, *conflict; in pci_claim_resource() 138 resource, res); in pci_claim_resource() 153 resource, res); in pci_claim_resource() 161 resource, res, conflict->name, conflict); in pci_claim_resource() 195 static int pci_revert_fw_address(struct resource *res, struct pci_dev *dev, in pci_revert_fw_address() 198 struct resource *root, *conflict; in pci_revert_fw_address() 250 const struct resource *res, in pcibios_align_resource() [all …]
|
D | bus.c | 19 void pci_add_resource_offset(struct list_head *resources, struct resource *res, in pci_add_resource_offset() 35 void pci_add_resource(struct list_head *resources, struct resource *res) in pci_add_resource() 47 void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, in pci_bus_add_resource() 63 struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n) in pci_bus_resource_n() 68 return bus->resource[n]; in pci_bus_resource_n() 79 void pci_bus_remove_resource(struct pci_bus *bus, struct resource *res) in pci_bus_remove_resource() 85 if (bus->resource[i] == res) { in pci_bus_remove_resource() 86 bus->resource[i] = NULL; in pci_bus_remove_resource() 106 bus->resource[i] = NULL; in pci_bus_remove_resources() 118 struct resource *parent, *res; in devm_request_pci_bus_resources() [all …]
|
/drivers/tc/ |
D | tc.c | 119 tdev->resource.start = slotaddr; in tc_bus_add_devices() 120 tdev->resource.end = slotaddr + devsize - 1; in tc_bus_add_devices() 122 tdev->resource.start = extslotaddr; in tc_bus_add_devices() 123 tdev->resource.end = extslotaddr + devsize - 1; in tc_bus_add_devices() 132 tdev->resource.name = tdev->name; in tc_bus_add_devices() 133 tdev->resource.flags = IORESOURCE_MEM; in tc_bus_add_devices() 170 tc_bus.resource[0].start = tc_bus.slot_base; in tc_init() 171 tc_bus.resource[0].end = tc_bus.slot_base + in tc_init() 174 tc_bus.resource[0].name = tc_bus.name; in tc_init() 175 tc_bus.resource[0].flags = IORESOURCE_MEM; in tc_init() [all …]
|
/drivers/firmware/imx/ |
D | misc.c | 18 u16 resource; member 25 u16 resource; member 32 u16 resource; member 51 int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource, in imx_sc_misc_set_control() argument 64 msg.resource = resource; in imx_sc_misc_set_control() 81 int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource, in imx_sc_misc_get_control() argument 95 msg.resource = resource; in imx_sc_misc_get_control() 119 int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource, in imx_sc_pm_cpu_start() argument 132 msg.resource = resource; in imx_sc_pm_cpu_start()
|
/drivers/pnp/pnpacpi/ |
D | rsparser.c | 101 static void pnpacpi_add_irqresource(struct pnp_dev *dev, struct resource *r) in pnpacpi_add_irqresource() 172 struct resource *r = &win.res; in pnpacpi_allocated_resource() 607 struct acpi_resource **resource = data; in pnpacpi_type_resources() local 610 (*resource)->type = res->type; in pnpacpi_type_resources() 611 (*resource)->length = sizeof(struct acpi_resource); in pnpacpi_type_resources() 613 (*resource)->data.irq.descriptor_length = in pnpacpi_type_resources() 615 (*resource)++; in pnpacpi_type_resources() 626 struct acpi_resource *resource; in pnpacpi_build_resource_template() local 643 resource = (struct acpi_resource *)buffer->pointer; in pnpacpi_build_resource_template() 645 pnpacpi_type_resources, &resource); in pnpacpi_build_resource_template() [all …]
|
/drivers/mfd/ |
D | twl4030-audio.c | 36 struct twl4030_audio_resource resource[TWL4030_AUDIO_RES_MAX]; member 50 audio->resource[id].reg); in twl4030_audio_set_resource() 53 val |= audio->resource[id].mask; in twl4030_audio_set_resource() 55 val &= ~audio->resource[id].mask; in twl4030_audio_set_resource() 58 val, audio->resource[id].reg); in twl4030_audio_set_resource() 69 audio->resource[id].reg); in twl4030_audio_get_resource() 90 if (!audio->resource[id].request_count) in twl4030_audio_enable_resource() 96 audio->resource[id].request_count++; in twl4030_audio_enable_resource() 119 if (!audio->resource[id].request_count) { in twl4030_audio_disable_resource() 125 audio->resource[id].request_count--; in twl4030_audio_disable_resource() [all …]
|
/drivers/pcmcia/ |
D | pcmcia_cis.c | 200 p_dev->resource[0]->start = p_dev->resource[0]->end = 0; in pcmcia_do_loop_config() 201 p_dev->resource[1]->start = p_dev->resource[1]->end = 0; in pcmcia_do_loop_config() 205 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; in pcmcia_do_loop_config() 206 p_dev->resource[0]->flags |= in pcmcia_do_loop_config() 213 p_dev->resource[1]->flags = p_dev->resource[0]->flags; in pcmcia_do_loop_config() 214 p_dev->resource[1]->start = io->win[1-i].base; in pcmcia_do_loop_config() 215 p_dev->resource[1]->end = io->win[1-i].len; in pcmcia_do_loop_config() 217 p_dev->resource[0]->start = io->win[i].base; in pcmcia_do_loop_config() 218 p_dev->resource[0]->end = io->win[i].len; in pcmcia_do_loop_config() 227 p_dev->resource[2]->start = p_dev->resource[2]->end = 0; in pcmcia_do_loop_config() [all …]
|