Lines Matching defs:adev
469 struct acpi_device *adev;
512 adev = acpi_get_acpi_dev(handle);
514 if (adev && ACPI_SUCCESS(acpi_hotplug_schedule(adev, type)))
517 acpi_put_acpi_dev(adev);
557 int acpi_dev_install_notify_handler(struct acpi_device *adev,
563 status = acpi_install_notify_handler(adev->handle, handler_type,
564 handler, adev);
572 void acpi_dev_remove_notify_handler(struct acpi_device *adev,
576 acpi_remove_notify_handler(adev->handle, handler_type, handler);
638 * @adev: ACPI device in question
640 * Return: First physical node of ACPI device @adev
642 struct device *acpi_get_first_physical_node(struct acpi_device *adev)
644 struct mutex *physical_node_lock = &adev->physical_node_lock;
648 if (list_empty(&adev->physical_node_list)) {
653 node = list_first_entry(&adev->physical_node_list,
663 static struct acpi_device *acpi_primary_dev_companion(struct acpi_device *adev,
666 const struct device *phys_dev = acpi_get_first_physical_node(adev);
668 return phys_dev && phys_dev == dev ? adev : NULL;
673 * @adev: ACPI companion device
680 * Note that the caller have to provide valid @adev pointer.
682 bool acpi_device_is_first_physical_node(struct acpi_device *adev,
685 return !!acpi_primary_dev_companion(adev, dev);
711 struct acpi_device *adev;
713 adev = ACPI_COMPANION(dev);
714 if (!adev)
717 if (list_empty(&adev->pnp.ids))
720 return acpi_primary_dev_companion(adev, dev);
725 * @adev: ACPI device object to match.
733 static bool acpi_of_match_device(const struct acpi_device *adev,
740 if (!adev)
743 of_compatible = adev->data.of_compatible;
769 static bool acpi_of_modalias(struct acpi_device *adev,
776 of_compatible = adev->data.of_compatible;
794 * @adev: ACPI device object to match
800 * objects. If there is a compatible string for @adev, it will be copied to
804 void acpi_set_modalias(struct acpi_device *adev, const char *default_id,
807 if (!acpi_of_modalias(adev, modalias, len))
880 * @adev: The ACPI device pointer to match.
882 * Match the ACPI device @adev against a given list of ACPI IDs @ids.
888 const struct acpi_device *adev)
892 __acpi_match_device(adev, ids, NULL, &id, NULL);
917 struct acpi_device *adev = ACPI_COMPANION(dev);
920 if (!acpi_of_match_device(adev, dev->driver->of_match_table, &match))
1104 int acpi_dev_for_each_child(struct acpi_device *adev,
1112 return device_for_each_child(&adev->dev, &adwc, acpi_dev_for_one_check);
1115 int acpi_dev_for_each_child_reverse(struct acpi_device *adev,
1124 return device_for_each_child_reverse(&adev->dev, &adwc, acpi_dev_for_one_check);