Lines Matching defs:adev
33 static int acpi_get_rc_addr(struct acpi_device *adev, struct resource *res)
35 struct device *dev = &adev->dev;
43 ret = acpi_dev_get_resources(adev, &list,
81 struct acpi_device *adev;
93 adev = acpi_fetch_acpi_dev(handle);
94 if (!adev)
97 ret = acpi_get_rc_addr(adev, res);
100 dev_name(&adev->dev));
830 struct acpi_device *adev;
833 adev = container_of(context, struct acpi_device, wakeup.context);
834 root = acpi_driver_data(adev);
971 struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
973 return adev && acpi_device_power_manageable(adev);
979 struct acpi_device *adev, *rpadev;
985 adev = ACPI_COMPANION(&dev->dev);
986 if (adev) {
993 if (acpi_dev_power_state_for_wake(adev) <= ACPI_STATE_D2)
1000 if (acpi_device_power_manageable(adev))
1009 rpadev = adev;
1028 if (rpadev != adev &&
1058 struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
1069 if (!adev || acpi_has_method(adev->handle, "_EJ0"))
1092 error = acpi_device_set_power(adev, state_conv[state]);
1097 acpi_power_state_string(adev->power.state));
1113 struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
1123 if (!adev || !acpi_device_power_manageable(adev))
1126 state = adev->power.state;
1135 struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
1137 if (adev && acpi_device_power_manageable(adev))
1138 acpi_device_update_power(adev, NULL);
1171 struct acpi_device *adev;
1186 adev = ACPI_COMPANION(&dev->dev);
1187 if (!adev || !acpi_device_power_manageable(adev))
1190 if (adev->wakeup.flags.valid &&
1191 device_may_wakeup(&dev->dev) != !!adev->wakeup.prepare_count)
1197 return !!adev->power.flags.dsw_present;
1306 struct acpi_device *adev;
1315 adev = pci_acpi_find_companion_hook ?
1320 if (adev)
1321 return adev;
1326 adev = acpi_find_child_device(ACPI_COMPANION(dev->parent), addr,
1342 if (adev && adev->pnp.type.platform_id && !addr &&
1346 return adev;
1417 void pci_acpi_setup(struct device *dev, struct acpi_device *adev)
1421 pci_acpi_optimize_delay(pci_dev, adev->handle);
1425 pci_acpi_add_pm_notifier(adev, pci_dev);
1426 if (!adev->wakeup.flags.valid)
1440 acpi_device_power_add_dependent(adev, dev);
1443 acpi_dev_power_up_children_with_adr(adev);
1446 void pci_acpi_cleanup(struct device *dev, struct acpi_device *adev)
1451 pci_acpi_remove_pm_notifier(adev);
1452 if (adev->wakeup.flags.valid) {
1453 acpi_device_power_remove_dependent(adev, dev);