Lines Matching defs:adev

290 static void acpi_init_of_compatible(struct acpi_device *adev)
295 ret = acpi_data_get_property_array(&adev->data, "compatible",
298 ret = acpi_dev_get_property(adev, "compatible",
301 if (adev->parent
302 && adev->parent->flags.of_compatible_ok)
308 adev->data.of_compatible = of_compatible;
311 adev->flags.of_compatible_ok = 1;
384 void acpi_init_properties(struct acpi_device *adev)
391 INIT_LIST_HEAD(&adev->data.properties);
392 INIT_LIST_HEAD(&adev->data.subnodes);
394 if (!adev->handle)
401 list_for_each_entry(hwid, &adev->pnp.ids, list) {
408 status = acpi_evaluate_object_typed(adev->handle, "_DSD", NULL, &buf,
413 if (acpi_extract_properties(buf.pointer, &adev->data)) {
414 adev->data.pointer = buf.pointer;
416 acpi_init_of_compatible(adev);
418 if (acpi_enumerate_nondev_subnodes(adev->handle, buf.pointer,
419 &adev->data, acpi_fwnode_handle(adev)))
420 adev->data.pointer = buf.pointer;
422 if (!adev->data.pointer) {
423 acpi_handle_debug(adev->handle, "Invalid _DSD data, skipping\n");
428 if (acpi_of && !adev->flags.of_compatible_ok)
429 acpi_handle_info(adev->handle,
432 if (!adev->data.pointer)
433 acpi_extract_apple_properties(adev);
463 void acpi_free_properties(struct acpi_device *adev)
465 acpi_destroy_nondev_subnodes(&adev->data.subnodes);
466 ACPI_FREE((void *)adev->data.pointer);
467 adev->data.of_compatible = NULL;
468 adev->data.pointer = NULL;
469 acpi_free_device_properties(&adev->data.properties);
532 * @adev: ACPI device to get the property from.
537 int acpi_dev_get_property(const struct acpi_device *adev, const char *name,
540 return adev ? acpi_data_get_property(&adev->data, name, type, obj) : -EINVAL;
548 const struct acpi_device *adev = to_acpi_device_node(fwnode);
549 return &adev->data;
573 * @adev: ACPI data object to get the property from
646 * target object in @args->adev. If the reference includes arguments, store
854 int acpi_dev_prop_read_single(struct acpi_device *adev, const char *propname,
859 if (!adev || !val)
862 ret = acpi_data_prop_read_single(&adev->data, propname, proptype, val);
1008 int acpi_dev_prop_read(const struct acpi_device *adev, const char *propname,
1011 return adev ? acpi_data_prop_read(&adev->data, propname, proptype, val, nval) : -EINVAL;
1042 const struct acpi_device *adev = to_acpi_device_node(fwnode);
1049 if (adev)
1050 head = &adev->children;
1058 adev = to_acpi_device_node(child);
1059 next = adev->node.next;
1079 * hierarchical _DSD properties. Make sure the adev pointer is
1084 adev = to_acpi_device_node(fwnode);
1085 if (adev)
1086 head = &adev->data.subnodes;
1342 const struct acpi_device *adev;
1358 adev = to_acpi_device_node(fwnode);
1359 if (WARN_ON(!adev))
1362 return acpi_device_bid(adev);