diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-16 14:22:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-16 14:22:06 -0400 |
commit | 5fe4990a97ef340046117aceb02bcad01644ebc2 (patch) | |
tree | 26052f15d409cbc9ab189b7ce80817562c403721 /drivers | |
parent | 1406de8e11eb043681297adf86d6892ff8efc27a (diff) | |
parent | 4e3507f7189111b0cb66c30def3423c6aba8f85a (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPI: Idle C-states disabled by max_cstate should not disable the TSC
ACPI: idle: fix init-time TSC check regression
ACPI processor: reset the throttling state once it's invalid
ACPI processor: introduce module parameter processor.ignore_tpc
ACPI, i915: build fix
ACPI: suspend: restore BM_RLD on resume
ACPI: resume: re-enable SCI-enable workaround
thermal: fix off-by-1 error in trip point trigger condition
eeepc-laptop: unregister_rfkill_notifier on failure
asus-laptop: fix input keycode
eeepc-laptop: support for super hybrid engine (SHE)
eeepc-laptop: Work around rfkill firmware bug
eeepc-laptop: report brightness control events via the input layer
eeepc-laptop: fix wlan rfkill state change during init
ACPI: suspend: don't let device _PS3 failure prevent suspend
ACPI: power: update error message
ACPI: video: DMI workaround another broken Acer BIOS enabling display brightness
ACPICA: use acpi.* modparam namespace
ACPI video: dmi check for broken _BQC on Acer Aspire 5720
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/acpica/Makefile | 27 | ||||
-rw-r--r-- | drivers/acpi/acpica/aclocal.h | 7 | ||||
-rw-r--r-- | drivers/acpi/bus.c | 2 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 42 | ||||
-rw-r--r-- | drivers/acpi/processor_throttling.c | 25 | ||||
-rw-r--r-- | drivers/acpi/video.c | 38 | ||||
-rw-r--r-- | drivers/gpu/drm/Kconfig | 6 | ||||
-rw-r--r-- | drivers/platform/x86/asus-laptop.c | 6 | ||||
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 47 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 8 | ||||
-rw-r--r-- | drivers/thermal/thermal_sys.c | 8 |
11 files changed, 174 insertions, 42 deletions
diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile index 17e50824a6f1..72ac28da14e3 100644 --- a/drivers/acpi/acpica/Makefile +++ b/drivers/acpi/acpica/Makefile | |||
@@ -5,40 +5,43 @@ | |||
5 | ccflags-y := -Os | 5 | ccflags-y := -Os |
6 | ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT | 6 | ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT |
7 | 7 | ||
8 | obj-y := dsfield.o dsmthdat.o dsopcode.o dswexec.o dswscope.o \ | 8 | # use acpi.o to put all files here into acpi.o modparam namespace |
9 | obj-y += acpi.o | ||
10 | |||
11 | acpi-y := dsfield.o dsmthdat.o dsopcode.o dswexec.o dswscope.o \ | ||
9 | dsmethod.o dsobject.o dsutils.o dswload.o dswstate.o \ | 12 | dsmethod.o dsobject.o dsutils.o dswload.o dswstate.o \ |
10 | dsinit.o | 13 | dsinit.o |
11 | 14 | ||
12 | obj-y += evevent.o evregion.o evsci.o evxfevnt.o \ | 15 | acpi-y += evevent.o evregion.o evsci.o evxfevnt.o \ |
13 | evmisc.o evrgnini.o evxface.o evxfregn.o \ | 16 | evmisc.o evrgnini.o evxface.o evxfregn.o \ |
14 | evgpe.o evgpeblk.o | 17 | evgpe.o evgpeblk.o |
15 | 18 | ||
16 | obj-y += exconfig.o exfield.o exnames.o exoparg6.o exresolv.o exstorob.o\ | 19 | acpi-y += exconfig.o exfield.o exnames.o exoparg6.o exresolv.o exstorob.o\ |
17 | exconvrt.o exfldio.o exoparg1.o exprep.o exresop.o exsystem.o\ | 20 | exconvrt.o exfldio.o exoparg1.o exprep.o exresop.o exsystem.o\ |
18 | excreate.o exmisc.o exoparg2.o exregion.o exstore.o exutils.o \ | 21 | excreate.o exmisc.o exoparg2.o exregion.o exstore.o exutils.o \ |
19 | exdump.o exmutex.o exoparg3.o exresnte.o exstoren.o | 22 | exdump.o exmutex.o exoparg3.o exresnte.o exstoren.o |
20 | 23 | ||
21 | obj-y += hwacpi.o hwgpe.o hwregs.o hwsleep.o hwxface.o hwvalid.o | 24 | acpi-y += hwacpi.o hwgpe.o hwregs.o hwsleep.o hwxface.o hwvalid.o |
22 | 25 | ||
23 | obj-$(ACPI_FUTURE_USAGE) += hwtimer.o | 26 | acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o |
24 | 27 | ||
25 | obj-y += nsaccess.o nsload.o nssearch.o nsxfeval.o \ | 28 | acpi-y += nsaccess.o nsload.o nssearch.o nsxfeval.o \ |
26 | nsalloc.o nseval.o nsnames.o nsutils.o nsxfname.o \ | 29 | nsalloc.o nseval.o nsnames.o nsutils.o nsxfname.o \ |
27 | nsdump.o nsinit.o nsobject.o nswalk.o nsxfobj.o \ | 30 | nsdump.o nsinit.o nsobject.o nswalk.o nsxfobj.o \ |
28 | nsparse.o nspredef.o | 31 | nsparse.o nspredef.o |
29 | 32 | ||
30 | obj-$(ACPI_FUTURE_USAGE) += nsdumpdv.o | 33 | acpi-$(ACPI_FUTURE_USAGE) += nsdumpdv.o |
31 | 34 | ||
32 | obj-y += psargs.o psparse.o psloop.o pstree.o pswalk.o \ | 35 | acpi-y += psargs.o psparse.o psloop.o pstree.o pswalk.o \ |
33 | psopcode.o psscope.o psutils.o psxface.o | 36 | psopcode.o psscope.o psutils.o psxface.o |
34 | 37 | ||
35 | obj-y += rsaddr.o rscreate.o rsinfo.o rsio.o rslist.o rsmisc.o rsxface.o \ | 38 | acpi-y += rsaddr.o rscreate.o rsinfo.o rsio.o rslist.o rsmisc.o rsxface.o \ |
36 | rscalc.o rsirq.o rsmemory.o rsutils.o | 39 | rscalc.o rsirq.o rsmemory.o rsutils.o |
37 | 40 | ||
38 | obj-$(ACPI_FUTURE_USAGE) += rsdump.o | 41 | acpi-$(ACPI_FUTURE_USAGE) += rsdump.o |
39 | 42 | ||
40 | obj-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o | 43 | acpi-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o |
41 | 44 | ||
42 | obj-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \ | 45 | acpi-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \ |
43 | utcopy.o utdelete.o utglobal.o utmath.o utobject.o \ | 46 | utcopy.o utdelete.o utglobal.o utmath.o utobject.o \ |
44 | utstate.o utmutex.o utobject.o utresrc.o utlock.o | 47 | utstate.o utmutex.o utobject.o utresrc.o utlock.o |
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index 772ee5c4ccca..2ec394a328e9 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h | |||
@@ -787,7 +787,12 @@ struct acpi_bit_register_info { | |||
787 | 787 | ||
788 | /* For control registers, both ignored and reserved bits must be preserved */ | 788 | /* For control registers, both ignored and reserved bits must be preserved */ |
789 | 789 | ||
790 | #define ACPI_PM1_CONTROL_IGNORED_BITS 0x0201 /* Bits 9, 0(SCI_EN) */ | 790 | /* |
791 | * The ACPI spec says to ignore PM1_CTL.SCI_EN (bit 0) | ||
792 | * but we need to be able to write ACPI_BITREG_SCI_ENABLE directly | ||
793 | * as a BIOS workaround on some machines. | ||
794 | */ | ||
795 | #define ACPI_PM1_CONTROL_IGNORED_BITS 0x0200 /* Bits 9 */ | ||
791 | #define ACPI_PM1_CONTROL_RESERVED_BITS 0xC1F8 /* Bits 14-15, 3-8 */ | 796 | #define ACPI_PM1_CONTROL_RESERVED_BITS 0xC1F8 /* Bits 14-15, 3-8 */ |
792 | #define ACPI_PM1_CONTROL_PRESERVED_BITS \ | 797 | #define ACPI_PM1_CONTROL_PRESERVED_BITS \ |
793 | (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS) | 798 | (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS) |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index e8f7b64e92da..ae862f1798dc 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -312,7 +312,7 @@ int acpi_bus_set_power(acpi_handle handle, int state) | |||
312 | end: | 312 | end: |
313 | if (result) | 313 | if (result) |
314 | printk(KERN_WARNING PREFIX | 314 | printk(KERN_WARNING PREFIX |
315 | "Transitioning device [%s] to D%d\n", | 315 | "Device [%s] failed to transition to D%d\n", |
316 | device->pnp.bus_id, state); | 316 | device->pnp.bus_id, state); |
317 | else { | 317 | else { |
318 | device->power.state = state; | 318 | device->power.state = state; |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index f7ca8c55956b..72069ba5f1ed 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -202,21 +202,44 @@ static void acpi_state_timer_broadcast(struct acpi_processor *pr, | |||
202 | * Suspend / resume control | 202 | * Suspend / resume control |
203 | */ | 203 | */ |
204 | static int acpi_idle_suspend; | 204 | static int acpi_idle_suspend; |
205 | static u32 saved_bm_rld; | ||
206 | |||
207 | static void acpi_idle_bm_rld_save(void) | ||
208 | { | ||
209 | acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &saved_bm_rld); | ||
210 | } | ||
211 | static void acpi_idle_bm_rld_restore(void) | ||
212 | { | ||
213 | u32 resumed_bm_rld; | ||
214 | |||
215 | acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &resumed_bm_rld); | ||
216 | |||
217 | if (resumed_bm_rld != saved_bm_rld) | ||
218 | acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, saved_bm_rld); | ||
219 | } | ||
205 | 220 | ||
206 | int acpi_processor_suspend(struct acpi_device * device, pm_message_t state) | 221 | int acpi_processor_suspend(struct acpi_device * device, pm_message_t state) |
207 | { | 222 | { |
223 | if (acpi_idle_suspend == 1) | ||
224 | return 0; | ||
225 | |||
226 | acpi_idle_bm_rld_save(); | ||
208 | acpi_idle_suspend = 1; | 227 | acpi_idle_suspend = 1; |
209 | return 0; | 228 | return 0; |
210 | } | 229 | } |
211 | 230 | ||
212 | int acpi_processor_resume(struct acpi_device * device) | 231 | int acpi_processor_resume(struct acpi_device * device) |
213 | { | 232 | { |
233 | if (acpi_idle_suspend == 0) | ||
234 | return 0; | ||
235 | |||
236 | acpi_idle_bm_rld_restore(); | ||
214 | acpi_idle_suspend = 0; | 237 | acpi_idle_suspend = 0; |
215 | return 0; | 238 | return 0; |
216 | } | 239 | } |
217 | 240 | ||
218 | #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86) | 241 | #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86) |
219 | static int tsc_halts_in_c(int state) | 242 | static void tsc_check_state(int state) |
220 | { | 243 | { |
221 | switch (boot_cpu_data.x86_vendor) { | 244 | switch (boot_cpu_data.x86_vendor) { |
222 | case X86_VENDOR_AMD: | 245 | case X86_VENDOR_AMD: |
@@ -226,13 +249,17 @@ static int tsc_halts_in_c(int state) | |||
226 | * C/P/S0/S1 states when this bit is set. | 249 | * C/P/S0/S1 states when this bit is set. |
227 | */ | 250 | */ |
228 | if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) | 251 | if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) |
229 | return 0; | 252 | return; |
230 | 253 | ||
231 | /*FALL THROUGH*/ | 254 | /*FALL THROUGH*/ |
232 | default: | 255 | default: |
233 | return state > ACPI_STATE_C1; | 256 | /* TSC could halt in idle, so notify users */ |
257 | if (state > ACPI_STATE_C1) | ||
258 | mark_tsc_unstable("TSC halts in idle"); | ||
234 | } | 259 | } |
235 | } | 260 | } |
261 | #else | ||
262 | static void tsc_check_state(int state) { return; } | ||
236 | #endif | 263 | #endif |
237 | 264 | ||
238 | static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | 265 | static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) |
@@ -578,14 +605,9 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) | |||
578 | 605 | ||
579 | pr->power.timer_broadcast_on_state = INT_MAX; | 606 | pr->power.timer_broadcast_on_state = INT_MAX; |
580 | 607 | ||
581 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { | 608 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { |
582 | struct acpi_processor_cx *cx = &pr->power.states[i]; | 609 | struct acpi_processor_cx *cx = &pr->power.states[i]; |
583 | 610 | ||
584 | #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86) | ||
585 | /* TSC could halt in idle, so notify users */ | ||
586 | if (tsc_halts_in_c(cx->type)) | ||
587 | mark_tsc_unstable("TSC halts in idle");; | ||
588 | #endif | ||
589 | switch (cx->type) { | 611 | switch (cx->type) { |
590 | case ACPI_STATE_C1: | 612 | case ACPI_STATE_C1: |
591 | cx->valid = 1; | 613 | cx->valid = 1; |
@@ -603,6 +625,8 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) | |||
603 | acpi_timer_check_state(i, pr, cx); | 625 | acpi_timer_check_state(i, pr, cx); |
604 | break; | 626 | break; |
605 | } | 627 | } |
628 | if (cx->valid) | ||
629 | tsc_check_state(cx->type); | ||
606 | 630 | ||
607 | if (cx->valid) | 631 | if (cx->valid) |
608 | working++; | 632 | working++; |
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index d0d1f4d50434..7f16f5f8e7d3 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c | |||
@@ -45,6 +45,14 @@ | |||
45 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT | 45 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT |
46 | ACPI_MODULE_NAME("processor_throttling"); | 46 | ACPI_MODULE_NAME("processor_throttling"); |
47 | 47 | ||
48 | /* ignore_tpc: | ||
49 | * 0 -> acpi processor driver doesn't ignore _TPC values | ||
50 | * 1 -> acpi processor driver ignores _TPC values | ||
51 | */ | ||
52 | static int ignore_tpc; | ||
53 | module_param(ignore_tpc, int, 0644); | ||
54 | MODULE_PARM_DESC(ignore_tpc, "Disable broken BIOS _TPC throttling support"); | ||
55 | |||
48 | struct throttling_tstate { | 56 | struct throttling_tstate { |
49 | unsigned int cpu; /* cpu nr */ | 57 | unsigned int cpu; /* cpu nr */ |
50 | int target_state; /* target T-state */ | 58 | int target_state; /* target T-state */ |
@@ -283,6 +291,10 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr) | |||
283 | 291 | ||
284 | if (!pr) | 292 | if (!pr) |
285 | return -EINVAL; | 293 | return -EINVAL; |
294 | |||
295 | if (ignore_tpc) | ||
296 | goto end; | ||
297 | |||
286 | status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc); | 298 | status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc); |
287 | if (ACPI_FAILURE(status)) { | 299 | if (ACPI_FAILURE(status)) { |
288 | if (status != AE_NOT_FOUND) { | 300 | if (status != AE_NOT_FOUND) { |
@@ -290,6 +302,8 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr) | |||
290 | } | 302 | } |
291 | return -ENODEV; | 303 | return -ENODEV; |
292 | } | 304 | } |
305 | |||
306 | end: | ||
293 | pr->throttling_platform_limit = (int)tpc; | 307 | pr->throttling_platform_limit = (int)tpc; |
294 | return 0; | 308 | return 0; |
295 | } | 309 | } |
@@ -302,6 +316,9 @@ int acpi_processor_tstate_has_changed(struct acpi_processor *pr) | |||
302 | struct acpi_processor_limit *limit; | 316 | struct acpi_processor_limit *limit; |
303 | int target_state; | 317 | int target_state; |
304 | 318 | ||
319 | if (ignore_tpc) | ||
320 | return 0; | ||
321 | |||
305 | result = acpi_processor_get_platform_limit(pr); | 322 | result = acpi_processor_get_platform_limit(pr); |
306 | if (result) { | 323 | if (result) { |
307 | /* Throttling Limit is unsupported */ | 324 | /* Throttling Limit is unsupported */ |
@@ -821,6 +838,14 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr) | |||
821 | ret = acpi_read_throttling_status(pr, &value); | 838 | ret = acpi_read_throttling_status(pr, &value); |
822 | if (ret >= 0) { | 839 | if (ret >= 0) { |
823 | state = acpi_get_throttling_state(pr, value); | 840 | state = acpi_get_throttling_state(pr, value); |
841 | if (state == -1) { | ||
842 | ACPI_WARNING((AE_INFO, | ||
843 | "Invalid throttling state, reset\n")); | ||
844 | state = 0; | ||
845 | ret = acpi_processor_set_throttling(pr, state); | ||
846 | if (ret) | ||
847 | return ret; | ||
848 | } | ||
824 | pr->throttling.state = state; | 849 | pr->throttling.state = state; |
825 | } | 850 | } |
826 | 851 | ||
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index d7ff61c0d571..810cca90ca7f 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -538,6 +538,41 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level) | |||
538 | return -EINVAL; | 538 | return -EINVAL; |
539 | } | 539 | } |
540 | 540 | ||
541 | /* | ||
542 | * For some buggy _BQC methods, we need to add a constant value to | ||
543 | * the _BQC return value to get the actual current brightness level | ||
544 | */ | ||
545 | |||
546 | static int bqc_offset_aml_bug_workaround; | ||
547 | static int __init video_set_bqc_offset(const struct dmi_system_id *d) | ||
548 | { | ||
549 | bqc_offset_aml_bug_workaround = 9; | ||
550 | return 0; | ||
551 | } | ||
552 | |||
553 | static struct dmi_system_id video_dmi_table[] __initdata = { | ||
554 | /* | ||
555 | * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121 | ||
556 | */ | ||
557 | { | ||
558 | .callback = video_set_bqc_offset, | ||
559 | .ident = "Acer Aspire 5720", | ||
560 | .matches = { | ||
561 | DMI_MATCH(DMI_BOARD_VENDOR, "Acer"), | ||
562 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5720"), | ||
563 | }, | ||
564 | }, | ||
565 | { | ||
566 | .callback = video_set_bqc_offset, | ||
567 | .ident = "Acer Aspire 5710Z", | ||
568 | .matches = { | ||
569 | DMI_MATCH(DMI_BOARD_VENDOR, "Acer"), | ||
570 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5710Z"), | ||
571 | }, | ||
572 | }, | ||
573 | {} | ||
574 | }; | ||
575 | |||
541 | static int | 576 | static int |
542 | acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, | 577 | acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, |
543 | unsigned long long *level) | 578 | unsigned long long *level) |
@@ -557,6 +592,7 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, | |||
557 | *level = device->brightness->levels[*level + 2]; | 592 | *level = device->brightness->levels[*level + 2]; |
558 | 593 | ||
559 | } | 594 | } |
595 | *level += bqc_offset_aml_bug_workaround; | ||
560 | device->brightness->curr = *level; | 596 | device->brightness->curr = *level; |
561 | return 0; | 597 | return 0; |
562 | } else { | 598 | } else { |
@@ -2290,6 +2326,8 @@ EXPORT_SYMBOL(acpi_video_register); | |||
2290 | 2326 | ||
2291 | static int __init acpi_video_init(void) | 2327 | static int __init acpi_video_init(void) |
2292 | { | 2328 | { |
2329 | dmi_check_system(video_dmi_table); | ||
2330 | |||
2293 | if (intel_opregion_present()) | 2331 | if (intel_opregion_present()) |
2294 | return 0; | 2332 | return 0; |
2295 | 2333 | ||
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 17b24c580c09..4cd35d8fd799 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig | |||
@@ -84,6 +84,12 @@ config DRM_I915 | |||
84 | config DRM_I915_KMS | 84 | config DRM_I915_KMS |
85 | bool "Enable modesetting on intel by default" | 85 | bool "Enable modesetting on intel by default" |
86 | depends on DRM_I915 | 86 | depends on DRM_I915 |
87 | # i915 KMS depends on ACPI_VIDEO when ACPI is enabled | ||
88 | # but for select to work, need to select ACPI_VIDEO's dependencies, ick | ||
89 | select VIDEO_OUTPUT_CONTROL if ACPI | ||
90 | select BACKLIGHT_CLASS_DEVICE if ACPI | ||
91 | select INPUT if ACPI | ||
92 | select ACPI_VIDEO if ACPI | ||
87 | help | 93 | help |
88 | Choose this option if you want kernel modesetting enabled by default, | 94 | Choose this option if you want kernel modesetting enabled by default, |
89 | and you have a new enough userspace to support this. Running old | 95 | and you have a new enough userspace to support this. Running old |
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index eeafc6c0160d..bfc1a8892a32 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c | |||
@@ -269,16 +269,16 @@ static struct key_entry asus_keymap[] = { | |||
269 | {KE_KEY, 0x34, KEY_SWITCHVIDEOMODE}, | 269 | {KE_KEY, 0x34, KEY_SWITCHVIDEOMODE}, |
270 | {KE_KEY, 0x40, KEY_PREVIOUSSONG}, | 270 | {KE_KEY, 0x40, KEY_PREVIOUSSONG}, |
271 | {KE_KEY, 0x41, KEY_NEXTSONG}, | 271 | {KE_KEY, 0x41, KEY_NEXTSONG}, |
272 | {KE_KEY, 0x43, KEY_STOP}, | 272 | {KE_KEY, 0x43, KEY_STOPCD}, |
273 | {KE_KEY, 0x45, KEY_PLAYPAUSE}, | 273 | {KE_KEY, 0x45, KEY_PLAYPAUSE}, |
274 | {KE_KEY, 0x50, KEY_EMAIL}, | 274 | {KE_KEY, 0x50, KEY_EMAIL}, |
275 | {KE_KEY, 0x51, KEY_WWW}, | 275 | {KE_KEY, 0x51, KEY_WWW}, |
276 | {KE_KEY, 0x5C, BTN_EXTRA}, /* Performance */ | 276 | {KE_KEY, 0x5C, KEY_SCREENLOCK}, /* Screenlock */ |
277 | {KE_KEY, 0x5D, KEY_WLAN}, | 277 | {KE_KEY, 0x5D, KEY_WLAN}, |
278 | {KE_KEY, 0x61, KEY_SWITCHVIDEOMODE}, | 278 | {KE_KEY, 0x61, KEY_SWITCHVIDEOMODE}, |
279 | {KE_KEY, 0x6B, BTN_TOUCH}, /* Lock Mouse */ | 279 | {KE_KEY, 0x6B, BTN_TOUCH}, /* Lock Mouse */ |
280 | {KE_KEY, 0x82, KEY_CAMERA}, | 280 | {KE_KEY, 0x82, KEY_CAMERA}, |
281 | {KE_KEY, 0x8A, KEY_TV}, | 281 | {KE_KEY, 0x8A, KEY_PROG1}, |
282 | {KE_KEY, 0x95, KEY_MEDIA}, | 282 | {KE_KEY, 0x95, KEY_MEDIA}, |
283 | {KE_KEY, 0x99, KEY_PHONE}, | 283 | {KE_KEY, 0x99, KEY_PHONE}, |
284 | {KE_END, 0}, | 284 | {KE_END, 0}, |
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 6f54fd1757cd..353a898c3693 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -158,6 +158,7 @@ enum { KE_KEY, KE_END }; | |||
158 | static struct key_entry eeepc_keymap[] = { | 158 | static struct key_entry eeepc_keymap[] = { |
159 | /* Sleep already handled via generic ACPI code */ | 159 | /* Sleep already handled via generic ACPI code */ |
160 | {KE_KEY, 0x10, KEY_WLAN }, | 160 | {KE_KEY, 0x10, KEY_WLAN }, |
161 | {KE_KEY, 0x11, KEY_WLAN }, | ||
161 | {KE_KEY, 0x12, KEY_PROG1 }, | 162 | {KE_KEY, 0x12, KEY_PROG1 }, |
162 | {KE_KEY, 0x13, KEY_MUTE }, | 163 | {KE_KEY, 0x13, KEY_MUTE }, |
163 | {KE_KEY, 0x14, KEY_VOLUMEDOWN }, | 164 | {KE_KEY, 0x14, KEY_VOLUMEDOWN }, |
@@ -166,6 +167,8 @@ static struct key_entry eeepc_keymap[] = { | |||
166 | {KE_KEY, 0x1b, KEY_ZOOM }, | 167 | {KE_KEY, 0x1b, KEY_ZOOM }, |
167 | {KE_KEY, 0x1c, KEY_PROG2 }, | 168 | {KE_KEY, 0x1c, KEY_PROG2 }, |
168 | {KE_KEY, 0x1d, KEY_PROG3 }, | 169 | {KE_KEY, 0x1d, KEY_PROG3 }, |
170 | {KE_KEY, NOTIFY_BRN_MIN, KEY_BRIGHTNESSDOWN }, | ||
171 | {KE_KEY, NOTIFY_BRN_MIN + 2, KEY_BRIGHTNESSUP }, | ||
169 | {KE_KEY, 0x30, KEY_SWITCHVIDEOMODE }, | 172 | {KE_KEY, 0x30, KEY_SWITCHVIDEOMODE }, |
170 | {KE_KEY, 0x31, KEY_SWITCHVIDEOMODE }, | 173 | {KE_KEY, 0x31, KEY_SWITCHVIDEOMODE }, |
171 | {KE_KEY, 0x32, KEY_SWITCHVIDEOMODE }, | 174 | {KE_KEY, 0x32, KEY_SWITCHVIDEOMODE }, |
@@ -381,11 +384,13 @@ static ssize_t show_sys_acpi(int cm, char *buf) | |||
381 | EEEPC_CREATE_DEVICE_ATTR(camera, CM_ASL_CAMERA); | 384 | EEEPC_CREATE_DEVICE_ATTR(camera, CM_ASL_CAMERA); |
382 | EEEPC_CREATE_DEVICE_ATTR(cardr, CM_ASL_CARDREADER); | 385 | EEEPC_CREATE_DEVICE_ATTR(cardr, CM_ASL_CARDREADER); |
383 | EEEPC_CREATE_DEVICE_ATTR(disp, CM_ASL_DISPLAYSWITCH); | 386 | EEEPC_CREATE_DEVICE_ATTR(disp, CM_ASL_DISPLAYSWITCH); |
387 | EEEPC_CREATE_DEVICE_ATTR(cpufv, CM_ASL_CPUFV); | ||
384 | 388 | ||
385 | static struct attribute *platform_attributes[] = { | 389 | static struct attribute *platform_attributes[] = { |
386 | &dev_attr_camera.attr, | 390 | &dev_attr_camera.attr, |
387 | &dev_attr_cardr.attr, | 391 | &dev_attr_cardr.attr, |
388 | &dev_attr_disp.attr, | 392 | &dev_attr_disp.attr, |
393 | &dev_attr_cpufv.attr, | ||
389 | NULL | 394 | NULL |
390 | }; | 395 | }; |
391 | 396 | ||
@@ -512,15 +517,21 @@ static int eeepc_hotk_check(void) | |||
512 | return 0; | 517 | return 0; |
513 | } | 518 | } |
514 | 519 | ||
515 | static void notify_brn(void) | 520 | static int notify_brn(void) |
516 | { | 521 | { |
522 | /* returns the *previous* brightness, or -1 */ | ||
517 | struct backlight_device *bd = eeepc_backlight_device; | 523 | struct backlight_device *bd = eeepc_backlight_device; |
518 | if (bd) | 524 | if (bd) { |
525 | int old = bd->props.brightness; | ||
519 | bd->props.brightness = read_brightness(bd); | 526 | bd->props.brightness = read_brightness(bd); |
527 | return old; | ||
528 | } | ||
529 | return -1; | ||
520 | } | 530 | } |
521 | 531 | ||
522 | static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) | 532 | static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) |
523 | { | 533 | { |
534 | enum rfkill_state state; | ||
524 | struct pci_dev *dev; | 535 | struct pci_dev *dev; |
525 | struct pci_bus *bus = pci_find_bus(0, 1); | 536 | struct pci_bus *bus = pci_find_bus(0, 1); |
526 | 537 | ||
@@ -532,7 +543,9 @@ static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) | |||
532 | return; | 543 | return; |
533 | } | 544 | } |
534 | 545 | ||
535 | if (get_acpi(CM_ASL_WLAN) == 1) { | 546 | eeepc_wlan_rfkill_state(ehotk->eeepc_wlan_rfkill, &state); |
547 | |||
548 | if (state == RFKILL_STATE_UNBLOCKED) { | ||
536 | dev = pci_get_slot(bus, 0); | 549 | dev = pci_get_slot(bus, 0); |
537 | if (dev) { | 550 | if (dev) { |
538 | /* Device already present */ | 551 | /* Device already present */ |
@@ -552,23 +565,41 @@ static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) | |||
552 | pci_dev_put(dev); | 565 | pci_dev_put(dev); |
553 | } | 566 | } |
554 | } | 567 | } |
568 | |||
569 | rfkill_force_state(ehotk->eeepc_wlan_rfkill, state); | ||
555 | } | 570 | } |
556 | 571 | ||
557 | static void eeepc_hotk_notify(acpi_handle handle, u32 event, void *data) | 572 | static void eeepc_hotk_notify(acpi_handle handle, u32 event, void *data) |
558 | { | 573 | { |
559 | static struct key_entry *key; | 574 | static struct key_entry *key; |
560 | u16 count; | 575 | u16 count; |
576 | int brn = -ENODEV; | ||
561 | 577 | ||
562 | if (!ehotk) | 578 | if (!ehotk) |
563 | return; | 579 | return; |
564 | if (event >= NOTIFY_BRN_MIN && event <= NOTIFY_BRN_MAX) | 580 | if (event >= NOTIFY_BRN_MIN && event <= NOTIFY_BRN_MAX) |
565 | notify_brn(); | 581 | brn = notify_brn(); |
566 | count = ehotk->event_count[event % 128]++; | 582 | count = ehotk->event_count[event % 128]++; |
567 | acpi_bus_generate_proc_event(ehotk->device, event, count); | 583 | acpi_bus_generate_proc_event(ehotk->device, event, count); |
568 | acpi_bus_generate_netlink_event(ehotk->device->pnp.device_class, | 584 | acpi_bus_generate_netlink_event(ehotk->device->pnp.device_class, |
569 | dev_name(&ehotk->device->dev), event, | 585 | dev_name(&ehotk->device->dev), event, |
570 | count); | 586 | count); |
571 | if (ehotk->inputdev) { | 587 | if (ehotk->inputdev) { |
588 | if (brn != -ENODEV) { | ||
589 | /* brightness-change events need special | ||
590 | * handling for conversion to key events | ||
591 | */ | ||
592 | if (brn < 0) | ||
593 | brn = event; | ||
594 | else | ||
595 | brn += NOTIFY_BRN_MIN; | ||
596 | if (event < brn) | ||
597 | event = NOTIFY_BRN_MIN; /* brightness down */ | ||
598 | else if (event > brn) | ||
599 | event = NOTIFY_BRN_MIN + 2; /* ... up */ | ||
600 | else | ||
601 | event = NOTIFY_BRN_MIN + 1; /* ... unchanged */ | ||
602 | } | ||
572 | key = eepc_get_entry_by_scancode(event); | 603 | key = eepc_get_entry_by_scancode(event); |
573 | if (key) { | 604 | if (key) { |
574 | switch (key->type) { | 605 | switch (key->type) { |
@@ -649,6 +680,9 @@ static int eeepc_hotk_add(struct acpi_device *device) | |||
649 | if (ACPI_FAILURE(status)) | 680 | if (ACPI_FAILURE(status)) |
650 | printk(EEEPC_ERR "Error installing notify handler\n"); | 681 | printk(EEEPC_ERR "Error installing notify handler\n"); |
651 | 682 | ||
683 | eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6"); | ||
684 | eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7"); | ||
685 | |||
652 | if (get_acpi(CM_ASL_WLAN) != -1) { | 686 | if (get_acpi(CM_ASL_WLAN) != -1) { |
653 | ehotk->eeepc_wlan_rfkill = rfkill_allocate(&device->dev, | 687 | ehotk->eeepc_wlan_rfkill = rfkill_allocate(&device->dev, |
654 | RFKILL_TYPE_WLAN); | 688 | RFKILL_TYPE_WLAN); |
@@ -704,9 +738,6 @@ static int eeepc_hotk_add(struct acpi_device *device) | |||
704 | goto bluetooth_fail; | 738 | goto bluetooth_fail; |
705 | } | 739 | } |
706 | 740 | ||
707 | eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6"); | ||
708 | eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7"); | ||
709 | |||
710 | return 0; | 741 | return 0; |
711 | 742 | ||
712 | bluetooth_fail: | 743 | bluetooth_fail: |
@@ -717,6 +748,8 @@ static int eeepc_hotk_add(struct acpi_device *device) | |||
717 | wlan_fail: | 748 | wlan_fail: |
718 | if (ehotk->eeepc_wlan_rfkill) | 749 | if (ehotk->eeepc_wlan_rfkill) |
719 | rfkill_free(ehotk->eeepc_wlan_rfkill); | 750 | rfkill_free(ehotk->eeepc_wlan_rfkill); |
751 | eeepc_unregister_rfkill_notifier("\\_SB.PCI0.P0P6"); | ||
752 | eeepc_unregister_rfkill_notifier("\\_SB.PCI0.P0P7"); | ||
720 | ehotk_fail: | 753 | ehotk_fail: |
721 | kfree(ehotk); | 754 | kfree(ehotk); |
722 | ehotk = NULL; | 755 | ehotk = NULL; |
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 9a3a682c6981..9496494f340e 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -110,11 +110,9 @@ static int pnpacpi_disable_resources(struct pnp_dev *dev) | |||
110 | 110 | ||
111 | /* acpi_unregister_gsi(pnp_irq(dev, 0)); */ | 111 | /* acpi_unregister_gsi(pnp_irq(dev, 0)); */ |
112 | ret = 0; | 112 | ret = 0; |
113 | if (acpi_bus_power_manageable(handle)) { | 113 | if (acpi_bus_power_manageable(handle)) |
114 | ret = acpi_bus_set_power(handle, ACPI_STATE_D3); | 114 | acpi_bus_set_power(handle, ACPI_STATE_D3); |
115 | if (ret) | 115 | /* continue even if acpi_bus_set_power() fails */ |
116 | return ret; | ||
117 | } | ||
118 | if (ACPI_FAILURE(acpi_evaluate_object(handle, "_DIS", NULL, NULL))) | 116 | if (ACPI_FAILURE(acpi_evaluate_object(handle, "_DIS", NULL, NULL))) |
119 | ret = -ENODEV; | 117 | ret = -ENODEV; |
120 | return ret; | 118 | return ret; |
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index d0b093b66adc..5e38ba10a3a9 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c | |||
@@ -961,7 +961,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) | |||
961 | 961 | ||
962 | switch (trip_type) { | 962 | switch (trip_type) { |
963 | case THERMAL_TRIP_CRITICAL: | 963 | case THERMAL_TRIP_CRITICAL: |
964 | if (temp > trip_temp) { | 964 | if (temp >= trip_temp) { |
965 | if (tz->ops->notify) | 965 | if (tz->ops->notify) |
966 | ret = tz->ops->notify(tz, count, | 966 | ret = tz->ops->notify(tz, count, |
967 | trip_type); | 967 | trip_type); |
@@ -974,7 +974,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) | |||
974 | } | 974 | } |
975 | break; | 975 | break; |
976 | case THERMAL_TRIP_HOT: | 976 | case THERMAL_TRIP_HOT: |
977 | if (temp > trip_temp) | 977 | if (temp >= trip_temp) |
978 | if (tz->ops->notify) | 978 | if (tz->ops->notify) |
979 | tz->ops->notify(tz, count, trip_type); | 979 | tz->ops->notify(tz, count, trip_type); |
980 | break; | 980 | break; |
@@ -986,14 +986,14 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) | |||
986 | 986 | ||
987 | cdev = instance->cdev; | 987 | cdev = instance->cdev; |
988 | 988 | ||
989 | if (temp > trip_temp) | 989 | if (temp >= trip_temp) |
990 | cdev->ops->set_cur_state(cdev, 1); | 990 | cdev->ops->set_cur_state(cdev, 1); |
991 | else | 991 | else |
992 | cdev->ops->set_cur_state(cdev, 0); | 992 | cdev->ops->set_cur_state(cdev, 0); |
993 | } | 993 | } |
994 | break; | 994 | break; |
995 | case THERMAL_TRIP_PASSIVE: | 995 | case THERMAL_TRIP_PASSIVE: |
996 | if (temp > trip_temp || tz->passive) | 996 | if (temp >= trip_temp || tz->passive) |
997 | thermal_zone_device_passive(tz, temp, | 997 | thermal_zone_device_passive(tz, temp, |
998 | trip_temp, count); | 998 | trip_temp, count); |
999 | break; | 999 | break; |