Commit 45c36462 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branch 'acpi-dev-pm' into acpi-enumeration

Subsequent commits in this branch will depend on 'acpi-dev-pm'
material.
parents c4e05037 b88ce2a4
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -204,3 +204,34 @@ Description:

		This attribute has no effect on system-wide suspend/resume and
		hibernation.

What:		/sys/devices/.../power/pm_qos_no_power_off
Date:		September 2012
Contact:	Rafael J. Wysocki <rjw@sisk.pl>
Description:
		The /sys/devices/.../power/pm_qos_no_power_off attribute
		is used for manipulating the PM QoS "no power off" flag.  If
		set, this flag indicates to the kernel that power should not
		be removed entirely from the device.

		Not all drivers support this attribute.  If it isn't supported,
		it is not present.

		This attribute has no effect on system-wide suspend/resume and
		hibernation.

What:		/sys/devices/.../power/pm_qos_remote_wakeup
Date:		September 2012
Contact:	Rafael J. Wysocki <rjw@sisk.pl>
Description:
		The /sys/devices/.../power/pm_qos_remote_wakeup attribute
		is used for manipulating the PM QoS "remote wakeup required"
		flag.  If set, this flag indicates to the kernel that the
		device is a source of user events that have to be signaled from
		its low-power states.

		Not all drivers support this attribute.  If it isn't supported,
		it is not present.

		This attribute has no effect on system-wide suspend/resume and
		hibernation.
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ reading the aggregated value does not require any locking mechanism.

From kernel mode the use of this interface is the following:

int dev_pm_qos_add_request(device, handle, value):
int dev_pm_qos_add_request(device, handle, type, value):
Will insert an element into the list for that identified device with the
target value.  Upon change to this list the new target is recomputed and any
registered notifiers are called only if the target value is now different.
+2 −1
Original line number Diff line number Diff line
@@ -21,9 +21,10 @@ obj-y += acpi.o \
acpi-y				+= osl.o utils.o reboot.o
acpi-y				+= nvs.o

# sleep related files
# Power management related files
acpi-y				+= wakeup.o
acpi-y				+= sleep.o
acpi-$(CONFIG_PM)		+= device_pm.o
acpi-$(CONFIG_ACPI_SLEEP)	+= proc.o


+18 −3
Original line number Diff line number Diff line
@@ -257,7 +257,15 @@ static int __acpi_bus_get_power(struct acpi_device *device, int *state)
}


static int __acpi_bus_set_power(struct acpi_device *device, int state)
/**
 * acpi_device_set_power - Set power state of an ACPI device.
 * @device: Device to set the power state of.
 * @state: New power state to set.
 *
 * Callers must ensure that the device is power manageable before using this
 * function.
 */
int acpi_device_set_power(struct acpi_device *device, int state)
{
	int result = 0;
	acpi_status status = AE_OK;
@@ -298,6 +306,12 @@ static int __acpi_bus_set_power(struct acpi_device *device, int state)
	 * a lower-powered state.
	 */
	if (state < device->power.state) {
		if (device->power.state >= ACPI_STATE_D3_HOT &&
		    state != ACPI_STATE_D0) {
			printk(KERN_WARNING PREFIX
			      "Cannot transition to non-D0 state from D3\n");
			return -ENODEV;
		}
		if (device->power.flags.power_resources) {
			result = acpi_power_transition(device, state);
			if (result)
@@ -341,6 +355,7 @@ static int __acpi_bus_set_power(struct acpi_device *device, int state)

	return result;
}
EXPORT_SYMBOL(acpi_device_set_power);


int acpi_bus_set_power(acpi_handle handle, int state)
@@ -359,7 +374,7 @@ int acpi_bus_set_power(acpi_handle handle, int state)
		return -ENODEV;
	}

	return __acpi_bus_set_power(device, state);
	return acpi_device_set_power(device, state);
}
EXPORT_SYMBOL(acpi_bus_set_power);

@@ -402,7 +417,7 @@ int acpi_bus_update_power(acpi_handle handle, int *state_p)
	if (result)
		return result;

	result = __acpi_bus_set_power(device, state);
	result = acpi_device_set_power(device, state);
	if (!result && state_p)
		*state_p = state;

+668 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading