Commit Graph

60 Commits

Author SHA1 Message Date
dyoung
c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
jruoho
e5a9d901c0 Use acpi_eval_reference_handle() to simplify code. No functional change.
ok jmcneill@, pgoyette@
2010-01-18 18:36:49 +00:00
dyoung
cd6e1fbf91 Expand PMF_FN_* macros. 2010-01-08 19:53:10 +00:00
mlelstv
23ab96a36b Allow for 'options ACPI_DEBUG' by providing module declarations
and using memory allocation macros instead of calling AcpiOs* stubs
directly.
2009-09-16 10:47:54 +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
cegger
e5339e11d4 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 09:29:46 +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
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
dyoung
61ad1dd43b Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:35:40 +00:00
jmcneill
8761d09319 Don't be so aggressive in polling the EC when cold, port-i386/37790. 2008-01-18 01:03:24 +00:00
jmcneill
91a074d893 If we are in polling mode, do not try to spin forever in the state machine
waiting for a read or write to complete. Workaround an issue on my VAIO,
but we really need to figure out why it is failing in the first place.
2008-01-18 00:33:54 +00:00
jmcneill
f5210660c0 Add acpiec_bus_{read,write} and acpiec_get_handle, for use in other
device drivers.
2007-12-21 21:22:54 +00:00
joerg
bc8d3e534e It seems like ACPICA can't deal with GPEs being handled before the GPE
handler is called, so clear the GPE bit in the callout as well.
This fixes the EC issues on T42 models.
2007-12-19 20:48:56 +00:00
joerg
36cdfbe0db Don't retry to post a command if the EC doesn't answer for a second.
It seems to create more issues than it fixes. Try to defend against
lost/late GPEs by using a callout to kick the state machine regulary.
Add some notes about the purpose and working of the driver.
2007-12-15 09:30:59 +00:00
jmcneill
faa68cee64 Rename acpiec_gpe_state_maschine -> acpiec_gpe_state_machine 2007-12-12 12:57:48 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
ad
6874e511b7 lockmgr -> mutex 2007-12-05 07:58:29 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
jmcneill
7d42ba2288 Don't be quite so aggressive in EcWaitEvent; makes acpiec work on the
Sony VAIO VGN-N250E, and possibly others.
2007-06-26 22:36:16 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
dogcow
12d973491c gcc4: 'Data' may be used uninitialized in this function 2006-05-14 03:02:14 +00:00
kochi
6f20259365 use aprint_* 2006-02-20 12:17:49 +00:00
kochi
92d51ace0f prototypes don't need argument names 2006-02-16 06:19:26 +00:00
perry
93124077ae Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:27:29 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
kochi
a7c9d49c21 Merge changes for ACPI-CA 20050408 2005-05-02 14:53:04 +00:00
yamt
c1c70ffbb9 don't rely on the value of hz. 2004-06-25 11:15:15 +00:00
kochi
beb4a7fe16 specify static where appropriate. 2004-05-01 12:03:27 +00:00
yamt
4a3c33632a EcGpeHandler: in the case that the ec is EcLock'ed, always set
EC_F_PENDQUERY flag so that AcpiClearGpe() will be called later.
2004-04-24 09:07:50 +00:00
itojun
aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
kochi
d742fdc844 - don't evaluate _UID, reuse ACPI_DEVINFO
- move acpi_resources from acpi_ec_softc to stack
2004-04-11 15:41:50 +00:00
kochi
193c08b383 Clean up memory allocated during autoconfiguration 2004-04-11 10:36:35 +00:00
kochi
b547a6d28f change acpi_resource_parse API to support _PRS parsing as well as _CRS 2004-04-11 08:36:19 +00:00
kochi
2bde9b6026 return (x) -> return x
use consitent variable name for ACPI_STATUS
2004-04-11 06:48:25 +00:00
kochi
db7198d645 whitespace nit 2004-04-10 11:48:10 +00:00
kochi
bd130aba8f Add ACPI ECDT (Embedded Controller Description Table) support.
This will enable usage of EC in early stage of ACPI initialization.
2004-03-30 15:18:55 +00:00
kanaoka
b7bbe36649 Set sc->sc_glk,if acpi_eval_integer() evaluate _GLK in acpiec_attach. 2004-03-24 14:47:19 +00:00
kanaoka
5886bca6f0 Make it compile (int -> ACPI_INTEGER) 2004-03-24 11:26:46 +00:00
yamt
9a34eb3d5a - fix deadlocks due to using lock_status() from interrupt context.
- process pending queries in EcUnlock() to close a race window.
  now there's no need to do polling for EcQuery().
- reorder inline functions and other prototypes so that
  the formers can get needed prototypes.
- add missing prototypes.
2003-11-12 13:59:23 +00:00
yamt
5980449814 use snprintf("%X") instead of "%x" + strupr(). 2003-11-12 13:18:24 +00:00
mycroft
4ac0e3e5c6 More cleanup:
* Use ACPI_FAILURE() and ACPI_SUCCESS().
* Output exception strings in a few more places.
2003-11-03 18:07:10 +00:00
mycroft
72ae89b69a Fix locking protocol, and use _GLK appropriately. From kochi, with some
modifications.
2003-11-03 17:23:38 +00:00
kochi
84795bd3fd * now the size of ACPI_DEVICE_INFO is variable:
it can now accomodate multiple _CIDs
  sizeof(ACPI_DEVICE_INFO) should not be used
* make ad_devinfo member in acpi_devnode a pointer
* implement acpi_match_hid() to simplify matching devices;
  _CIDs are also taken into account now as well as _HID
2003-11-03 06:03:47 +00:00
mycroft
be8e41d93a sc_lockhandle is garbage. 2003-11-01 08:34:54 +00:00
mycroft
10e36668fc Remove an unnecessary call to AcpiGlearGpe(). 2003-11-01 08:27:37 +00:00
mycroft
b596969039 Correct arguments to AcpiClearGpe(). 2003-11-01 08:14:39 +00:00
mycroft
63bc27bf55 Correct arguments to AcpiInstallGpeHandler, as per Linux and FreeBSD. 2003-11-01 01:38:25 +00:00
mycroft
fec4c11f9e Catch up with ABI changes in ACPI-CA. Some additional changes to acpi_bat to
set the VALID bits correctly, so we don't report garbage for missing batteries.
2003-10-31 20:54:18 +00:00