Commit Graph

638 Commits

Author SHA1 Message Date
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
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