Commit Graph

647 Commits

Author SHA1 Message Date
jmcneill
b0fb7abfad Switch to ACPICA 20090730, and update for API changes. 2009-08-18 16:41:02 +00:00
christos
833455e99c spic has moved. 2009-08-09 19:36:28 +00:00
christos
a401f72096 - pass unsigned char to toupper
- set snprintf did not bother to uppercase the name. Simplify and fix.
2009-08-09 17:42:48 +00:00
jmcneill
bb3158c0b1 Reading the fan speed is expensive, so set the undocumented SME_POLL_ONLY
flag on this sensor to ensure that the data is only refreshed on demand.
2009-08-04 23:23:39 +00:00
jmcneill
5baf678bf3 remove extra semicolon, spotted by snj 2009-08-04 17:06:10 +00:00
jmcneill
f5e82b659b add hw.wake.* sysctl subtree for toggling which devices are allowed to
restore the system from sleep. set/clear wake GPEs as specified before
entering sleep.

by default, the following devices are enabled for wake:
 - sleep/power buttons
 - lid switch
 - pc kbd controller

reviewed by: joerg
2009-08-04 14:20:40 +00:00
jmcneill
52624b6009 don't call asus_sysctl_setup from asus_init because that is called from
the resume handler, instead call it directly from asus_attach
2009-08-03 16:33:55 +00:00
jmcneill
bd96ad5f60 add missing return, silences 'failed to add sysctl nodes. (0)' message when
setup was successful
2009-08-03 12:43:46 +00:00
jmcneill
dd4c27f39b - add experimental cpu fan/voltage switching support (sysctl hw.asus0.*)
- add fan sensor
- rename asus_softc_t -> struct asus_softc
- add detach method
- update copyright for 2009
2009-08-03 10:30:29 +00:00
kiyohara
f68c771081 com@acpi supports memory space.
It tested on HP zx6000(ia64).
2009-07-13 12:57:04 +00:00
kiyohara
e14284f196 ACPI resource supports Extended IRQ From FreeBSD. 2009-07-13 12:55:21 +00:00
joerg
ac7c4cf146 Ignore breakpoints in the DSDT even if DDB is present.
A new option ACPI_BREAKPOINT reenables them.
2009-07-06 12:36:31 +00:00
alc
3fb1b3bc21 Add a pmf(9) shutdown hook to acpiec(4) to use polling on shutdown.
This fixes DIAGNOSTIC's assertion failure:

cpu_switchto(): switching above IPL_SCHED

during ACPI shutdown.

OK'd by joerg@
2009-07-06 00:54:00 +00:00
pgoyette
de4ed96bf9 Use a macro to define the conversion between ACPI temperatures and those
used by sysmon_envsys(4).

No functional change.
2009-07-04 13:36:49 +00:00
pgoyette
caff4fea85 Remove an unused mutex. This was left-over from two years ago when
driver was updated to sysmon_envsys V2;  a simple_lock was turned into
a mutex.  But the only code that ever used the simple_lock was removed
so the mutex can also be removed.

Noticed by njoly@
2009-07-03 21:18:40 +00:00
pgoyette
2d29649a47 Properly convert ACPI zone values to uKelvins.
Patch from njoly@
2009-07-03 15:34:10 +00:00
pgoyette
5de2729099 Change acpi_tz sensor behavior as follows:
1. ENVSYS_WARNOVER event is generated whenever any active cooling level
   is exceeded.

2. ENVSYS_CRITOVER event is generated whenever _HOT limit is exceeded;
   if the _HOT limit is not defined, then ENVSYS_CRITOVER will be
   generated when the _CRT limit is exceeded.

3. For Passive Cooling Only mode, there will be no change in behavior.

Additionally, since there are specific actions taken at each of the Active
Cooling Levels (powering parts of a zone on or off), and the limits are not
user-programmable,

4. The {warn,crit}{min,max} threshold levels will be specified only
   by the device itself;  event reporting thresholds may not be set
   from userland.

No comments received for two weeks after proposing these changes on both
current-users@ and tech-kern@
2009-06-30 16:14:49 +00:00
pgoyette
7c25ce0d52 Explicitly set sensor's units to ENVSYS_STEMP rather than having
it work only because ENVSYS_STEMP is #defined to 0
2009-06-03 22:34:18 +00:00
pgoyette
5a84f3060e Since we no longer have individual events for each sensor value limit,
we don't need individual flag bits.  Clean up extra bit definitions.
Bump kernel version - welcome to 5.99.13
2009-06-01 20:08:44 +00:00
cegger
93dfc06da9 struct device * -> device_t, no functional changes intended. 2009-05-12 09:50:28 +00:00
cegger
e5339e11d4 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 09:29:46 +00:00
joerg
892f4bbba1 sprintf -> snprintf 2009-04-08 12:39:27 +00:00
dyoung
222f7adf37 Refactor slightly to create acpi_rescan(), a hook for rescanning the
devices that attach at acpi(4).

Begin deriving an acpi(4) device-detachment hook, acpi_detach(), from
acpi_attach().  The code between #if 0 and #endif still needs to be
turned to the opposite calls (enables to disables, maps to unmaps,
attaches to detaches), which should be run in the opposite order.
Somebody with deep ACPI knowledge can probably finish this off without
too much trouble.
2009-04-08 00:23:30 +00:00
dyoung
5b0576e7eb Add acpitimer_detach() to eventually support acpi(4) detachment. 2009-04-08 00:15:45 +00:00
dyoung
1fb1e79dd5 During shutdown, detach attimer at acpi. 2009-04-07 17:59:18 +00:00
drochner
0785c6f16e avoid tsleep also during shutdown (and in particular ACPI poweroff),
should fix PR kern/39141 by Takahiro Kambe and PR port-i386/41110
by Reinoud Zandijk
2009-03-31 17:17:47 +00:00
cegger
f7d20361b0 ansify function definitions 2009-03-15 15:40:33 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
jmcneill
8cf7d77c2c Don't assume ACPI == x86, from kiyohara@kk.iij4u.or.jp 2009-03-14 13:56:41 +00:00
jmcneill
74dd0aeee0 Change a confusing attach message; if the embedded controller was attached
via ECDT, we would print:
  acpiec0 at acpi0 (EC, PHP0C09-0): ACPI Embedded Controller (disabled)
The embedded controller isn't actually disabled, but instead this driver
instance, so change the message to read:
  acpiec0 at acpi0 (EC, PHP0C09-0): using acpiecdt0
2009-02-28 19:40:23 +00:00
jmcneill
c315121ad0 Cut the amount of spam from acpi devices in roughly half by printing
resources on the same line as autoconf messages. Things like:
  pcppi1 at acpi0 (SPKR, PNP0800)
  pcppi1: io 0x61
become:
  pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
2009-02-17 12:46:01 +00:00
jmcneill
3c220ee07d Use aprint_debug 2009-02-17 12:30:31 +00:00
jmcneill
0cc9fff237 PR# kern/38817: regression in acpi sleep on lifebook S6510
Switch to polling mode after the acpi(4) device has been suspended as
interrupts will be disabled later on and we may still need to execute
AML that tries to sleep or wait on a semaphore.
2009-01-30 12:51:03 +00:00
christos
d2ebfa6451 PR/40471: Pierre Pronchery: ASUS CUR-DLS board found on HP NetServer E800 box
has broken ACPI BIOS. Disable it.
2009-01-25 02:26:30 +00:00
jnemeth
45ff970e0f add a comment explaining how to regenerate acpidevs_data.h 2009-01-21 14:15:43 +00:00
yamt
b1fea83762 remove extra semicolons. 2009-01-03 03:43:21 +00:00
mlelstv
1f5b658b8a Handle printing of _STR attribute with non-string data type gracefully. 2008-12-07 10:53:57 +00:00
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