Lines Matching defs:adev
300 * @adev: ACPI device pointer
303 * If @adev has non-empty _PR0 the @dev is added as dependent device to all
309 * If @adev does not have _PR0 this does nothing.
313 int acpi_device_power_add_dependent(struct acpi_device *adev,
320 if (!adev->flags.power_manageable)
323 resources = &adev->power.states[ACPI_STATE_D0].resources;
341 * @adev: ACPI device pointer
345 * dependent device if it is found. Can be called to @adev that does not
348 void acpi_device_power_remove_dependent(struct acpi_device *adev,
354 if (!adev->flags.power_manageable)
357 resources = &adev->power.states[ACPI_STATE_D0].resources;
536 static void acpi_power_hide_list(struct acpi_device *adev,
548 sysfs_remove_link_from_group(&adev->dev.kobj,
552 sysfs_remove_group(&adev->dev.kobj, attr_group);
555 static void acpi_power_expose_list(struct acpi_device *adev,
565 ret = sysfs_create_group(&adev->dev.kobj, attr_group);
572 ret = sysfs_add_link_to_group(&adev->dev.kobj,
577 acpi_power_hide_list(adev, resources, attr_group);
583 static void acpi_power_expose_hide(struct acpi_device *adev,
589 acpi_power_expose_list(adev, resources, attr_group);
591 acpi_power_hide_list(adev, resources, attr_group);
594 void acpi_power_add_remove_device(struct acpi_device *adev, bool add)
598 if (adev->wakeup.flags.valid)
599 acpi_power_expose_hide(adev, &adev->wakeup.resources,
602 if (!adev->power.flags.power_resources)
606 acpi_power_expose_hide(adev,
607 &adev->power.states[state].resources,