diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-25 23:32:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-25 23:32:00 -0400 |
commit | 1aad08dc571604ebe473e2a187f0f7b211ae6c3f (patch) | |
tree | 6d95d35c187a4d1ccf07d620d6c84df567cd4df0 /drivers/acpi | |
parent | 27a24cfa04c6f041c0191847d047f25e5627cd63 (diff) | |
parent | 5a2bff8d7c7f63e2e8d467f66f6492fbb4d9509c (diff) |
Merge tag 'pm+acpi-3.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management and ACPI fixes from Rafael Wysocki:
- Additional CPU ID for the intel_pstate driver from Dirk Brandewie.
- More cpufreq fixes related to ARM big.LITTLE support and locking from
Viresh Kumar.
- VIA C7 cpufreq build fix from RafaĆ Bilski.
- ACPI power management fix making it possible to use device power
states regardless of the CONFIG_PM setting from Rafael J Wysocki.
- New ACPI video blacklist item from Bastian Triller.
* tag 'pm+acpi-3.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI / video: Add "Asus UL30A" to ACPI video detect blacklist
cpufreq: arm_big_little_dt: Instantiate as platform_driver
cpufreq: arm_big_little_dt: Register driver only if DT has valid data
cpufreq / e_powersaver: Fix linker error when ACPI processor is a module
cpufreq / intel_pstate: Add additional supported CPU ID
cpufreq: Drop rwsem lock around CPUFREQ_GOV_POLICY_EXIT
ACPI / PM: Allow device power states to be used for CONFIG_PM unset
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/Makefile | 2 | ||||
-rw-r--r-- | drivers/acpi/device_pm.c | 126 | ||||
-rw-r--r-- | drivers/acpi/video_detect.c | 8 |
3 files changed, 73 insertions, 63 deletions
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index 6050c8028dce..536562c626a2 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile | |||
@@ -24,7 +24,7 @@ acpi-y += nvs.o | |||
24 | # Power management related files | 24 | # Power management related files |
25 | acpi-y += wakeup.o | 25 | acpi-y += wakeup.o |
26 | acpi-y += sleep.o | 26 | acpi-y += sleep.o |
27 | acpi-$(CONFIG_PM) += device_pm.o | 27 | acpi-y += device_pm.o |
28 | acpi-$(CONFIG_ACPI_SLEEP) += proc.o | 28 | acpi-$(CONFIG_ACPI_SLEEP) += proc.o |
29 | 29 | ||
30 | 30 | ||
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index 96de787e6104..bc493aa3af19 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c | |||
@@ -37,68 +37,6 @@ | |||
37 | #define _COMPONENT ACPI_POWER_COMPONENT | 37 | #define _COMPONENT ACPI_POWER_COMPONENT |
38 | ACPI_MODULE_NAME("device_pm"); | 38 | ACPI_MODULE_NAME("device_pm"); |
39 | 39 | ||
40 | static DEFINE_MUTEX(acpi_pm_notifier_lock); | ||
41 | |||
42 | /** | ||
43 | * acpi_add_pm_notifier - Register PM notifier for given ACPI device. | ||
44 | * @adev: ACPI device to add the notifier for. | ||
45 | * @context: Context information to pass to the notifier routine. | ||
46 | * | ||
47 | * NOTE: @adev need not be a run-wake or wakeup device to be a valid source of | ||
48 | * PM wakeup events. For example, wakeup events may be generated for bridges | ||
49 | * if one of the devices below the bridge is signaling wakeup, even if the | ||
50 | * bridge itself doesn't have a wakeup GPE associated with it. | ||
51 | */ | ||
52 | acpi_status acpi_add_pm_notifier(struct acpi_device *adev, | ||
53 | acpi_notify_handler handler, void *context) | ||
54 | { | ||
55 | acpi_status status = AE_ALREADY_EXISTS; | ||
56 | |||
57 | mutex_lock(&acpi_pm_notifier_lock); | ||
58 | |||
59 | if (adev->wakeup.flags.notifier_present) | ||
60 | goto out; | ||
61 | |||
62 | status = acpi_install_notify_handler(adev->handle, | ||
63 | ACPI_SYSTEM_NOTIFY, | ||
64 | handler, context); | ||
65 | if (ACPI_FAILURE(status)) | ||
66 | goto out; | ||
67 | |||
68 | adev->wakeup.flags.notifier_present = true; | ||
69 | |||
70 | out: | ||
71 | mutex_unlock(&acpi_pm_notifier_lock); | ||
72 | return status; | ||
73 | } | ||
74 | |||
75 | /** | ||
76 | * acpi_remove_pm_notifier - Unregister PM notifier from given ACPI device. | ||
77 | * @adev: ACPI device to remove the notifier from. | ||
78 | */ | ||
79 | acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | ||
80 | acpi_notify_handler handler) | ||
81 | { | ||
82 | acpi_status status = AE_BAD_PARAMETER; | ||
83 | |||
84 | mutex_lock(&acpi_pm_notifier_lock); | ||
85 | |||
86 | if (!adev->wakeup.flags.notifier_present) | ||
87 | goto out; | ||
88 | |||
89 | status = acpi_remove_notify_handler(adev->handle, | ||
90 | ACPI_SYSTEM_NOTIFY, | ||
91 | handler); | ||
92 | if (ACPI_FAILURE(status)) | ||
93 | goto out; | ||
94 | |||
95 | adev->wakeup.flags.notifier_present = false; | ||
96 | |||
97 | out: | ||
98 | mutex_unlock(&acpi_pm_notifier_lock); | ||
99 | return status; | ||
100 | } | ||
101 | |||
102 | /** | 40 | /** |
103 | * acpi_power_state_string - String representation of ACPI device power state. | 41 | * acpi_power_state_string - String representation of ACPI device power state. |
104 | * @state: ACPI device power state to return the string representation of. | 42 | * @state: ACPI device power state to return the string representation of. |
@@ -385,6 +323,69 @@ bool acpi_bus_power_manageable(acpi_handle handle) | |||
385 | } | 323 | } |
386 | EXPORT_SYMBOL(acpi_bus_power_manageable); | 324 | EXPORT_SYMBOL(acpi_bus_power_manageable); |
387 | 325 | ||
326 | #ifdef CONFIG_PM | ||
327 | static DEFINE_MUTEX(acpi_pm_notifier_lock); | ||
328 | |||
329 | /** | ||
330 | * acpi_add_pm_notifier - Register PM notifier for given ACPI device. | ||
331 | * @adev: ACPI device to add the notifier for. | ||
332 | * @context: Context information to pass to the notifier routine. | ||
333 | * | ||
334 | * NOTE: @adev need not be a run-wake or wakeup device to be a valid source of | ||
335 | * PM wakeup events. For example, wakeup events may be generated for bridges | ||
336 | * if one of the devices below the bridge is signaling wakeup, even if the | ||
337 | * bridge itself doesn't have a wakeup GPE associated with it. | ||
338 | */ | ||
339 | acpi_status acpi_add_pm_notifier(struct acpi_device *adev, | ||
340 | acpi_notify_handler handler, void *context) | ||
341 | { | ||
342 | acpi_status status = AE_ALREADY_EXISTS; | ||
343 | |||
344 | mutex_lock(&acpi_pm_notifier_lock); | ||
345 | |||
346 | if (adev->wakeup.flags.notifier_present) | ||
347 | goto out; | ||
348 | |||
349 | status = acpi_install_notify_handler(adev->handle, | ||
350 | ACPI_SYSTEM_NOTIFY, | ||
351 | handler, context); | ||
352 | if (ACPI_FAILURE(status)) | ||
353 | goto out; | ||
354 | |||
355 | adev->wakeup.flags.notifier_present = true; | ||
356 | |||
357 | out: | ||
358 | mutex_unlock(&acpi_pm_notifier_lock); | ||
359 | return status; | ||
360 | } | ||
361 | |||
362 | /** | ||
363 | * acpi_remove_pm_notifier - Unregister PM notifier from given ACPI device. | ||
364 | * @adev: ACPI device to remove the notifier from. | ||
365 | */ | ||
366 | acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | ||
367 | acpi_notify_handler handler) | ||
368 | { | ||
369 | acpi_status status = AE_BAD_PARAMETER; | ||
370 | |||
371 | mutex_lock(&acpi_pm_notifier_lock); | ||
372 | |||
373 | if (!adev->wakeup.flags.notifier_present) | ||
374 | goto out; | ||
375 | |||
376 | status = acpi_remove_notify_handler(adev->handle, | ||
377 | ACPI_SYSTEM_NOTIFY, | ||
378 | handler); | ||
379 | if (ACPI_FAILURE(status)) | ||
380 | goto out; | ||
381 | |||
382 | adev->wakeup.flags.notifier_present = false; | ||
383 | |||
384 | out: | ||
385 | mutex_unlock(&acpi_pm_notifier_lock); | ||
386 | return status; | ||
387 | } | ||
388 | |||
388 | bool acpi_bus_can_wakeup(acpi_handle handle) | 389 | bool acpi_bus_can_wakeup(acpi_handle handle) |
389 | { | 390 | { |
390 | struct acpi_device *device; | 391 | struct acpi_device *device; |
@@ -1023,3 +1024,4 @@ void acpi_dev_pm_remove_dependent(acpi_handle handle, struct device *depdev) | |||
1023 | mutex_unlock(&adev->physical_node_lock); | 1024 | mutex_unlock(&adev->physical_node_lock); |
1024 | } | 1025 | } |
1025 | EXPORT_SYMBOL_GPL(acpi_dev_pm_remove_dependent); | 1026 | EXPORT_SYMBOL_GPL(acpi_dev_pm_remove_dependent); |
1027 | #endif /* CONFIG_PM */ | ||
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 66f67626f02e..e6bd910bc6ed 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c | |||
@@ -161,6 +161,14 @@ static struct dmi_system_id video_detect_dmi_table[] = { | |||
161 | DMI_MATCH(DMI_PRODUCT_NAME, "UL30VT"), | 161 | DMI_MATCH(DMI_PRODUCT_NAME, "UL30VT"), |
162 | }, | 162 | }, |
163 | }, | 163 | }, |
164 | { | ||
165 | .callback = video_detect_force_vendor, | ||
166 | .ident = "Asus UL30A", | ||
167 | .matches = { | ||
168 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."), | ||
169 | DMI_MATCH(DMI_PRODUCT_NAME, "UL30A"), | ||
170 | }, | ||
171 | }, | ||
164 | { }, | 172 | { }, |
165 | }; | 173 | }; |
166 | 174 | ||