Lines Matching defs:adev

511 	struct acpi_device *adev;
554 adev = acpi_get_acpi_dev(handle);
556 if (adev && ACPI_SUCCESS(acpi_hotplug_schedule(adev, type)))
559 acpi_put_acpi_dev(adev);
599 int acpi_dev_install_notify_handler(struct acpi_device *adev,
605 status = acpi_install_notify_handler(adev->handle, handler_type,
614 void acpi_dev_remove_notify_handler(struct acpi_device *adev,
618 acpi_remove_notify_handler(adev->handle, handler_type, handler);
680 * @adev: ACPI device in question
682 * Return: First physical node of ACPI device @adev
684 struct device *acpi_get_first_physical_node(struct acpi_device *adev)
686 struct mutex *physical_node_lock = &adev->physical_node_lock;
690 if (list_empty(&adev->physical_node_list)) {
695 node = list_first_entry(&adev->physical_node_list,
705 static struct acpi_device *acpi_primary_dev_companion(struct acpi_device *adev,
708 const struct device *phys_dev = acpi_get_first_physical_node(adev);
710 return phys_dev && phys_dev == dev ? adev : NULL;
715 * @adev: ACPI companion device
722 * Note that the caller have to provide valid @adev pointer.
724 bool acpi_device_is_first_physical_node(struct acpi_device *adev,
727 return !!acpi_primary_dev_companion(adev, dev);
753 struct acpi_device *adev;
755 adev = ACPI_COMPANION(dev);
756 if (!adev)
759 if (list_empty(&adev->pnp.ids))
762 return acpi_primary_dev_companion(adev, dev);
767 * @adev: ACPI device object to match.
775 static bool acpi_of_match_device(const struct acpi_device *adev,
782 if (!adev)
785 of_compatible = adev->data.of_compatible;
811 static bool acpi_of_modalias(struct acpi_device *adev,
818 of_compatible = adev->data.of_compatible;
836 * @adev: ACPI device object to match
842 * objects. If there is a compatible string for @adev, it will be copied to
846 void acpi_set_modalias(struct acpi_device *adev, const char *default_id,
849 if (!acpi_of_modalias(adev, modalias, len))
922 * @adev: The ACPI device pointer to match.
924 * Match the ACPI device @adev against a given list of ACPI IDs @ids.
930 const struct acpi_device *adev)
934 __acpi_match_device(adev, ids, NULL, &id, NULL);
959 struct acpi_device *adev = ACPI_COMPANION(dev);
962 if (!acpi_of_match_device(adev, dev->driver->of_match_table, &match))
1147 int acpi_dev_for_each_child(struct acpi_device *adev,
1155 return device_for_each_child(&adev->dev, &adwc, acpi_dev_for_one_check);
1158 int acpi_dev_for_each_child_reverse(struct acpi_device *adev,
1167 return device_for_each_child_reverse(&adev->dev, &adwc, acpi_dev_for_one_check);