Commit Graph

610 Commits

Author SHA1 Message Date
joerg
a5be52d405 On resum-from-RAM explicitly restore PCI link device state before
reenabling interrupts. At least one BIOS doesn't do this automatically
as reported by Christoph Egger.
2008-11-17 23:29:49 +00:00
pgoyette
7355d18b97 Leave the task of displaying sensor states to envsys_sysmon() unless we
are in debug mode.
2008-11-09 13:54:06 +00:00
pgoyette
18913ef363 Temp sensor should report a critical-overtemp condition (ENVSYS_SCRITOVER)
not a simple critical (ENVSYS_SCRITICAL) condition.
2008-11-09 03:36:04 +00:00
hans
f8681c958c Initialize sc->sc_dev before using it, and use it as argument for the
interrupt handler. Makes this work again. OK by christos.
2008-11-01 20:31:26 +00:00
hans
f86fa4502c Make the driver work (except for setting display brightness) on older
machines by removing the check for the CMOS method from thinkpad_match.
OK by jmcneill.
2008-11-01 19:22:25 +00:00
apb
96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
jmcneill
e38f75f075 Add fan sensor support, from Thomas E. Spanjaard 2008-10-18 16:35:40 +00:00
jmcneill
c175112638 Remember previous display brightness across suspend/resume; now we don't
need X to restore the display for us.
2008-09-21 21:15:28 +00:00
jmcneill
13e32ea2ea Revert previous. 2008-09-19 11:15:50 +00:00
pgoyette
d17c220979 Add another touchpad device - this one found in my Acer2413WLCi laptop.
Tested by me.
OK garbled@
2008-09-16 11:24:55 +00:00
jmcneill
b1cb1c6dcb PR# 38683 - T61 cannot suspend with recent kernels
Don't restore spl until after AcpiLeaveSleepState.
2008-09-10 03:56:12 +00:00
jmcneill
25b0c73dd3 Clarify some printfs in error cases so we at least know what subsystem
reported them.
2008-07-28 12:20:35 +00:00
dyoung
2e4b9b5581 Make acpilid(4) detachable. 2008-07-15 16:19:37 +00:00
dyoung
03df89373a Introduce acpi_clear_wake_gpe() to undo acpi_set_wake_gpe().
Extract common code from acpi_clear_wake_gpe() and acpi_set_wake_gpe(),
creating acpi_wake_gpe_helper().
2008-07-15 16:15:28 +00:00
cegger
17dbee905c use device_lookup_private to get softc 2008-06-12 21:46:21 +00:00
jmcneill
976a12aad4 Fix a mis-tabbed brace, no functional change. 2008-06-04 21:37:03 +00:00
joerg
bd8a810c44 Before 1.46, the EC driver would try to send a command again to the EC
after a timeout. This was removed, but the loops remained, so fix them
up as well.
2008-06-03 15:12:39 +00:00
jmcneill
fc993c6a36 Reintroduce acpibat_refresh, only have it refresh battery status (not info,
we will get notified for changes there). Use SME_POLL_ONLY so applications
that use GTREDATA don't cause trouble, and don't use SME_INIT_REFRESH as it
appears to be completely broken.
2008-06-03 15:02:31 +00:00
jmcneill
edd4ea5b7d Refresh battery info/status on resume. 2008-06-03 12:16:34 +00:00
jmcneill
daaa85a781 Simplify SME usage within acpibat:
* No need for sme_refresh callback; GPE handler will tell us when the
    device status changed (otherwise we can refresh data up to once a second,
    and that can take time!)
  * Since sme_refresh callback is gone, mutex is no longer required to
    synchronize GPE handlers and refresh thread, so nuke it.
  * Don't do any more work in GPE handler than required; use AcpiOsExecute
    to clear battery status/information in the sysmon_task_queue along with
    the refresh.

With these changes running GNOME's battstat-applet-2 no longer causes
my mouse to stutter once a second, and significantly reduces its CPU usage.
2008-06-03 01:11:18 +00:00
jmcneill
7eba414472 Don't reload usageid on resume, this should never change. 2008-06-01 23:35:18 +00:00
joerg
42fe28f522 Fix compilation with ACPI_EXTRA_DEBUG. 2008-06-01 19:01:57 +00:00
jmcneill
9f877bc707 Don't use cv_timedwait_sig if (cold) 2008-05-31 21:38:02 +00:00
jmcneill
70b1702726 Remove powerhook_establish calls; this functionality has been broken since
4.99.42 and nobody has complained. Newer systems with ioapic shouldn't
need this, and older non-ioapic systems should properly restore PCI IRQ
routing within their PCI-ISA bridge drivers.
2008-05-31 15:31:05 +00:00
jmcneill
ce25e3c5e1 lpt(4): register NULL pmf handler. 2008-05-31 14:07:03 +00:00
jmcneill
10f75496ad MI implementation of AcpiAcquireGlobalLock and AcpiReleaseGlobalLock. 2008-05-24 22:16:20 +00:00
cegger
256cdaf669 correct wrong comment: envsys(4) wants uK 2008-05-20 14:46:31 +00:00
cegger
33e33b567c acpidalb(4): Driver for PNP0C32 Hotkeys aka "Direct Application Launch Buttons".
"awesome" jmcneill
2008-05-18 22:05:59 +00:00
jmcneill
86acf021ce For device nodes that we handle internally, do not bother calling
config_found_ia on the node to save a bunch of useless 'device NNN
not configured' messages at startup. While here, condense ACPI printfs
at attach time.
2008-05-17 15:42:25 +00:00
jmcneill
05f909b7fa Fix memory leak on attach/resume. 2008-05-14 12:15:47 +00:00
ad
bf21e0a741 Noisy printf. 2008-05-11 22:16:45 +00:00
jmcneill
729313d52c Use 2-clause license. 2008-05-05 00:12:49 +00:00
jmcneill
35033371fe Use M_ZERO instead of malloc+memset 2008-05-03 16:14:40 +00:00
simonb
96093a0d4f Sprinkle a teeny bit of KNF goodness.. 2008-05-02 01:53:33 +00:00
cegger
d9b775927c hpqlb(4): driver for HP Quick Launch buttons - found on HP Pavilion Notebooks 2008-05-01 20:18:18 +00:00
simonb
c3325defad Be consistent with #define<space-or-tab>. 2008-05-01 16:06:41 +00:00
martin
11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
jmcneill
da01aef3c1 Use isareg constants in thinkpad_brightness_read where possible 2008-04-26 01:19:15 +00:00
jmcneill
dd8d5fe840 Define ACPI_THREAD_ID as uintptr_t, and return curlwp instead of
curlwp->l_lid from AcpiOsGetThreadId(), as suggested by ad@
2008-04-24 21:42:05 +00:00
jmcneill
50629393a5 s/struct cfdata */cfdata_t/ 2008-04-23 11:19:09 +00:00
jmcneill
fd495c5ce3 AcpiOsGetThreadId should return lwpid, not pid -- otherwise we always return
the same value! Fixes the AE_AML_MUTEX_NOT_ACQUIRED issue when evaluating
_BST on ASUS Eee PC. Who knows what other mysterious bugs this has caused
over the years...
2008-04-22 02:02:50 +00:00
xtraeme
a7315e0fc1 Misc cleanups from Geoff Wing. 2008-04-21 14:25:48 +00:00
jmcneill
865860bc30 Improve error reporting when we fail to enter a sleep state, eg:
acpi0: entering state 1
  acpi0: ACPI S1 not available on this platform
2008-04-20 16:26:36 +00:00
xtraeme
2930df439c Make this work again, now that ACPI_TYPE_ANY returns NULL objects
after recent ACPICA update.

Applied patch from Geoff Wing on current-users@.
2008-04-17 19:57:27 +00:00
cegger
376411d2dd device_t / softc split. From Hans Rosenfeld. 2008-04-16 09:39:01 +00:00
cegger
b849cd90e5 device_t / softc split. From Hans Rosenfeld 2008-04-15 15:02:28 +00:00
jmcneill
76fcb78d00 Compatibility with ACPICA 20080321; from the release notes:
All Reference Objects returned via the AcpiEvaluateObject interface are now
marked as type "REFERENCE" instead of "ANY". The type ANY is now reserved for
NULL objects - either NULL package elements or unresolved named references.
2008-04-14 00:30:30 +00:00
jmcneill
75aae009fe Cosmetic aprintification fix, as noted by Thomas Klausner on current-users 2008-04-07 10:16:59 +00:00
cegger
335ec2beb5 use aprint_*_dev and device_xname 2008-04-05 21:44:50 +00:00