Commit Graph

46 Commits

Author SHA1 Message Date
tnn ca5c2e9bf5 apm emulation needs envsys. From Jukka Salmi on the current-users list. 2007-08-23 10:04:07 +00:00
xtraeme ff1c414804 Split the ug(4) driver in three components:
* dev/ic/ug.c (main code shared by the attachments)
	* dev/isa/ug_isa.c (isa attachment)
	* dev/acpi/ug_acpi.c (acpi attachment)

That means that ug(4) can now be attached via ACPI.

Thanks to Mihai Chelaru for the good work.
2007-05-08 16:48:37 +00:00
xtraeme d57d6adf9b Rename acpi_aiboost to aiboost, suggested by cube. 2007-03-14 00:43:04 +00:00
xtraeme 9c83a552f8 ASUS AI Booster ACPI driver, ported from FreeBSD.
This driver will report values from the Super I/O chip via ACPI.
It should be possible to overclock the system with this driver, but
it's not implemented yet.

All newer ASUS motherboards probably will work with this driver
(device ATK0110).

[juan@nocturno][~]> envstat -r
CPU Temperature:     30.000 degC
 MB Temperature:     38.000 degC
  Vcore Voltage:      1.240 V
   +3.3 Voltage:      3.264 V
     +5 Voltage:      4.992 V
    +12 Voltage:     12.091 V
  CPU FAN Speed:       1454 RPM
[juan@nocturno][~]>
2007-03-13 04:01:51 +00:00
njoly 90b3c9e789 High Precision Event Timer driver, following Intel specifications.
Allow attachement at both ACPI (hpet@acpi) and AMD8111 LPC Controller
(hpet@amdpcib).

Requested by xtraeme, and tested by a few users.
2007-03-08 14:26:26 +00:00
cube 8c668f60b4 Add a lint-only value of "/dev/null" for ACPI_DSDT_FILE.
Bump required config(1) version.  Yes, it implies everybody will have to
rebuild config(1).  I can live with people hating me.
2007-01-09 13:41:30 +00:00
itohy cdb1835aff ACPI frontend for Yamaha OPL3-SA[23].
Derived from PR kern/33991 by jasper at pointless dot net.
2006-08-14 09:34:43 +00:00
christos 0fe2e6efc3 PR/34116: Takuya SHIOZAKI: acpiapm(4) misuses config(9)
acpiapm(4) always matches the first node of AML, which is unrelated
with acpiapm. Separate acpi(4)'s children into two individual interface
attributes.
2006-08-06 15:46:54 +00:00
christos 4998e59f23 Add acpi apm attachment based on sysmon hooks. 2006-07-08 20:23:53 +00:00
christos 01158ea892 Apply fvdl's acpi pci interrupt configuration code.
- MPACPI is no more.
- MPACPI_SCANPCI -> ACPI_SCANPCI
2006-07-04 00:30:21 +00:00
drochner c14d23ac86 First cut on an implementation of an ACPI power management counter
backend for timecounters.
Due to known bugs in some chipsets, always read until we get 3 successive
samples which are monotonic, as FreeBSD does in its "safe" variant.
This can be refined later, either by chipset quirks or by a test (as
FreeBSD does).
2006-06-21 17:47:23 +00:00
kochi 0cdeab4c58 remove ACPI_DISABLE_ON_POWEROFF option, which was there just for
compatibility of our old driver behavior, which is not necessary.
2006-01-31 09:30:06 +00:00
rpaulo e438cb4b93 * defflag ACPI_DSDT_OVERRIDE and defparam ACPI_DSDT_FILE.
* adjust comments to reality
2006-01-05 16:56:54 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
sekiya 0919f4d283 Rework the configuration scheme for PCI fixups:
* bus enumeration fixups are not PCIBIOS-specific, interrupt fixups are done
  by both PCIBIOS and ACPI.  The redundancy is very redundant.  Therefore,
  rename PCIBIOS_*_FIXUP to PCI_*_FIXUP, use PCI_INTR_FIXUP in place of
  ACPI_PCI_FIXUP, and change code refences to match.

* move the fixup defines from opt_pcibios.h to opt_pcifixup.h to reflect
  the above.

* fix up the PCI bus numbering in mainbus_attach(), right after we detect the
  configuration mode.  This probably renders the fixup in pcibios.c
  redundant -- but it should be harmless.

These changes make cardbus work in ACPI-only machines, when PCI_BUS_FIXUP
and PCI_INTR_FIXUP are defined.
2005-06-21 08:19:25 +00:00
cube 040e3b19e5 Add attimer(4) driver, with ISA and ACPI attachments.
attimer(4) is the new body of the part of pcppi(4) that mapped the TIMER1
register to set the pitch of the bell.  It was necessary to separate them
in order to have a working ACPI attachment (as the two appear as different
devices in the ACPI structures).
2005-03-25 23:06:19 +00:00
xtraeme 57218e5576 Add pcppi(4) ACPI attachment, which matches the "AT-style speaker
sound" ACPI device.

Reviewed by christos@.
2005-03-21 14:06:46 +00:00
xtraeme 76025558e1 Add ACPI joy(4) attachment, based on lpt_acpi.c by jmcneill@,
reviewed and ok'ed by cube@ and martin@.
2004-12-02 14:33:31 +00:00
xtraeme 347378fc9f Add ACPI mpu(4) attachment, based on lpt_acpi.c by jmcneill@,
reviewed by christos@, cube@ and martin@.

While here, remove a printf() in mpu_attach() (ic/mpu.c) to remove
an empty line in some frontends (mpu_isa.c, etc).
2004-12-02 09:50:41 +00:00
kochi 71dc5a9687 Add ACPI_DISABLE_ON_POWEROFF option.
Note: the default behavior is changed.  Now we don't disable the ACPI
subsystem on power off (halt -p) by default.
'options ACPI_DISABLE_ON_POWEROFF' in a kernel config file makes the kernel
behave the way we used to be.
2004-06-07 15:33:17 +00:00
kochi 951c6675f8 don't compile acpi_madt.c unless options MPACPI is specified. 2004-05-27 11:26:33 +00:00
kochi 2134725caf ThermalZone improvement work by lha at stacken.kth.se, inspired from
FreeBSD thermal zone code.  Minor style fixes and bugfixes by me.
2004-05-26 17:15:17 +00:00
kochi e48192f908 Add sysmon pswitch hook so that powerd(8) can monitor
AC adapter online/offline events.
2004-05-03 07:44:36 +00:00
tron d44cf8f504 Only call acpiec_early_attach() in "acpi.c" if the kernel is configured
to include the "acpiec" device.
2004-03-31 11:19:39 +00:00
jdolecek 5ecaa7ecee add dependency on isadma for atppc attachments
add atppc_isadma.c for atppc@isapnp and atppc@ofisa, too
2004-01-31 13:59:20 +00:00
jdolecek fea475b595 add ACPI atppc(4) attachment; probes properly, DMA and actual transfer
not tested yet
2004-01-25 11:46:49 +00:00
fvdl c0b6986667 Add quirk handling to ACPI. First quirk entry is "PTLTD " rev 0x06040000,
which gives problems with PCI bus finding; the object hierarchy doesn't
match the real world for some systems, most notably SuperMicro boards.
Linux has this one blacklisted as well.
2003-05-15 21:29:49 +00:00
thorpej 9dd2908b35 Use sysmon_taskq. 2003-04-20 20:21:29 +00:00
matt 062bcd3204 acpi.c needs sysmon_power too. 2003-04-17 20:56:29 +00:00
thorpej 59ea64b6f0 * Don't do the ACPI_PCI_FIXUP unless it is explicitly enabled in
the kernel config file.  That code makes a total mess of any
  system with multiple PCI busses.
* Rework the way buttons are handled; register them with sysmon,
  and let it take the appropriate action.  This lets us gracefully
  shut down when the power button is pressed.
2003-04-17 01:22:21 +00:00
christos 0f9b5cdd18 add some more flags used only in acpi.c 2003-01-12 01:15:50 +00:00
christos c601b2355e add ACPIVERBOSE; while I am there, fix the eval_string function so it does
not leak.
2003-01-05 22:33:21 +00:00
fvdl eff9b6d311 Add some code to deal with the MADT. 2003-01-05 01:03:44 +00:00
jmcneill 1e3dfcd74c Initial support for ACPI Thermal Zones. For now, we only export the zone
temperature to sysmon; in the near future we should be associating devices
in this thermal zone with this device so we can do active or passive
cooling on a zone-by-zone basis.
2003-01-04 05:36:03 +00:00
explorer 59e0238f99 add envsys support to acpi A/C adapter and batteries. This is still a work
in progress, much like the rest of ACPI.
2002-12-31 05:26:56 +00:00
jmcneill 18e5fbcc75 Add an fdc at acpi(4) attachment 2002-12-28 19:31:35 +00:00
matt 17fb086421 Add a pckbc acpi attachment (it compiles but it untested). 2002-12-28 08:45:31 +00:00
jmcneill 3b08a81ed6 Add an lpt attachment to acpi(4) 2002-12-28 08:04:28 +00:00
jmcneill 33ac82dfff Add 'com at acpi' and 'wss at acpi' glue. These are both working great on
my ThinkPad 600E.

XXX isa_dmainit isn't called early enough for the 'audio at wss' attachment
XXX to work, so I'm deferring the call to 'wssattach' until later on. This
XXX should be fixed soon.
2002-12-28 06:20:15 +00:00
christos 8bb4772dd8 move spic_acpi to arch/i386/acpi 2002-06-17 22:39:25 +00:00
augustss 5b899ef99d Attach the spic driver via ACPI. 2002-04-22 12:42:56 +00:00
sommerfeld b8de140e4e Prototype ACPI Control Method Battery driver.
ACPI defines two different battery device interfaces: "Control Method"
batteries, in which AML methods are defined in order to get battery
status and set battery alarm thresholds, and a "Smart Battery" device,
which is an SMbus device accessed through the ACPI Embedded Controller
device; this driver knows how to attach to the former sort of device.

As a total kludge, since we haven't wired things up to sysmon/envsys
yet, we report battery status through a once-per-minute kernel printf,
so don't use this driver yet if you want your disk to spin down.

Motivated by and tested on Sony PCG-R505TL laptop, which has
nonfunctional APM.

configure as:

acpibat* at acpi ?

Sample output:

acpibat0 at acpi0: ACPI Battery
acpibat0: Sony Corp. LION
acpibat0: Design 38480mWh, Predicted 38480mWh Warn 120mWh Low 0mWh
acpibat0: discharging: 15112mV cap 25480mWh (66%) rate 16849mW
...
acpibat0: discharging: 15224mV cap 25070mWh (65%) rate 18405mW
...
acpibat0: discharging: 15200mV cap 24310mWh (63%) rate 13771mW
...
acpibat0: charging: 15768mV cap 23330mWh (60%) rate 20388mW
2002-03-24 03:46:10 +00:00
lukem ecb81c3f6d - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
  "options FOO=xxx"). options that take a value were converted to
  defparam recently.
- minor whitespace & formatting cleanups
2001-11-28 10:21:10 +00:00
lukem 0fa231134c - replace "defopt" with "defparam" for options which must take a value,
as config(8) will warn for value-less defparam options
- minor whitespace/formatting cleanup
- consolidate opt_tcp_recvspace.h and opt_tcp_sendspace.h into opt_tcp_space.h
2001-11-20 14:34:18 +00:00
thorpej 533c169276 Build acpi_resource.c, add "acpiec" and "acpiacad". 2001-09-29 05:36:03 +00:00
thorpej 69f30a1104 Add some basic ACPI probing framework. This is far from complete,
it is merely a work in progress.
2001-09-28 02:09:22 +00:00