Lines Matching full:resources
381 * hisi_lpc_acpi_set_io_res - set the resources for a child
384 * @res: double pointer to be set to the address of translated resources
385 * @num_res: pointer to variable to hold the number of translated resources
391 * logical PIO addresses for each child devices resources.
400 struct resource *resources; in hisi_lpc_acpi_set_io_res() local
415 * The following code segment to retrieve the resources is common to in hisi_lpc_acpi_set_io_res()
421 dev_dbg(&adev->dev, "failed to get resources\n"); in hisi_lpc_acpi_set_io_res()
425 resources = devm_kcalloc(hostdev, count, sizeof(*resources), in hisi_lpc_acpi_set_io_res()
427 if (!resources) { in hisi_lpc_acpi_set_io_res()
428 dev_warn(hostdev, "could not allocate memory for %d resources\n", in hisi_lpc_acpi_set_io_res()
435 resources[count] = *rentry->res; in hisi_lpc_acpi_set_io_res()
436 hisi_lpc_acpi_fixup_child_resource(hostdev, &resources[count]); in hisi_lpc_acpi_set_io_res()
442 /* translate the I/O resources */ in hisi_lpc_acpi_set_io_res()
446 if (!(resources[i].flags & IORESOURCE_IO)) in hisi_lpc_acpi_set_io_res()
448 ret = hisi_lpc_acpi_xlat_io_res(adev, host, &resources[i]); in hisi_lpc_acpi_set_io_res()
451 &resources[i], ret); in hisi_lpc_acpi_set_io_res()
455 *res = resources; in hisi_lpc_acpi_set_io_res()
572 * Create a platform device per child, fixing up the resources
641 /* register the LPC host PIO resources */ in hisi_lpc_probe()