Commit Graph

121 Commits

Author SHA1 Message Date
Alexander Motin
461a98a279 Add acpi_asus_wmi(4) -- driver for random extras found on WMI-compatible
Asus laptops. It is alike to acpi_asus(4), but uses WMI interface instead
of separate ACPI device.

On Asus EeePC T101MT netbook it allows to handle hotkeys and on/off WLAN,
Bluetooth, LCD backlight, camera, cardreader and touchpad.

On Asus UX31A ultrabook it allows to handle hotkeys, on/off WLAN, Bluetooth,
Wireless LED, control keyboard backlight brightness, monitor temperature
and fan speed. LCD brightness control doesn't work now for unknown reason,
possibly requiring some video card initialization.

Sponsored by:	iXsystems, Inc.
2012-07-02 08:31:29 +00:00
Mitsuru IWASAKI
ae2f080bc4 Add in-driver event handler.
MFC after:	3 days
2012-06-23 18:43:54 +00:00
Kevin Lo
bbdf953e9b Add missing MODULE_DEPEND() so that acpi.ko and aibs.ko can be
loaded dynamically.
2012-02-28 15:12:26 +00:00
Marius Strobl
4b7ec27007 - There's no need to overwrite the default device method with the default
one. Interestingly, these are actually the default for quite some time
  (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
  since r52045) but even recently added device drivers do this unnecessarily.
  Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
  Discussed with: jhb
- Also while at it, use __FBSDID.
2011-11-22 21:28:20 +00:00
Jaakko Heinonen
885c97af51 Append unit number to the WMI status device name to allow attaching
multiple acpi_wmi(4) instances.

PR:		kern/162491
Reviewed by:	avg
2011-11-22 16:44:50 +00:00
Ed Schouten
d745c852be Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.
This means that their use is restricted to a single C file.
2011-11-07 06:44:47 +00:00
Matthew D Fleming
f4f04709ac Fix a few more SYSCTL_PROC() that were missing a CTLFLAG type specifier. 2011-01-19 00:57:58 +00:00
Matthew D Fleming
6dc7dc9a3e sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
Commit the rest of the devices.
2011-01-12 19:53:56 +00:00
Andriy Gapon
c82eedb465 acpi_fujitsu: update for P8010
PR:		kern/121102
Submitted by:	Anish Mistry <amistry@am-productions.biz>
MFC after:	3 weeks
2010-12-11 10:55:18 +00:00
Jung-uk Kim
01b36cb089 Remove an unnecessary hack from ACPICA 20100915 (r212761). 2010-09-16 20:11:40 +00:00
Andriy Gapon
f5aadc99a6 make acpi_hp device a child of acpi_wmi
to properly reflect dependency between the devices/drivers

PR:		kern/147858
Suggested by:	jhb
Tested by:	Maciej Suszko <maciej@suszko.eu>
MFC after:	1 week
2010-09-11 08:09:14 +00:00
Andriy Gapon
9fa1edb882 acpi_hp: fix bus attachment code
- add identify method to create driver's own device_t
- successfully probe only driver's own device_t instead of any device_t
- (ab)use device order to hopefully be probed/attached after acpi_wmi

PR:		kern/147858
Tested by:	Maciej Suszko <maciej@suszko.eu>
MFC after:	1 week
2010-09-06 07:34:32 +00:00
Rui Paulo
daef39e7ae Remove the acpi_aiboost driver. It has been replaced by aibs(4). 2010-07-25 17:55:57 +00:00
Rui Paulo
bbe4a97d41 Import the acpi_aibs(4) driver written by Constantine A. Murenin.
It has more features than acpi_aiboost(4) and it will eventually replace
acpi_aiboost(4).

Submitted by:	Constantine A. Murenin <cnst at FreeBSD.org>
Reviewed by:	freebsd-acpi, imp
MFC after:	1 month
2010-06-25 15:32:46 +00:00
Jung-uk Kim
7b2d603ef0 Fix one more case where a string is passed via format argument instead.
Found by:	clang
2010-06-11 20:08:20 +00:00
Jung-uk Kim
30363a9a9e Remove unused assignment.
Found by:	clang static analyzer
Found by:	Coverity Prevent[tm] (CID 4537, 4538, 4539)
2010-06-11 19:53:42 +00:00
Jung-uk Kim
80fba82198 Fix a possible dereference of null pointer.
Found by:	clang static analyzer
Found by:	Coverity Prevent[tm] (CID 3423)
2010-06-11 18:19:23 +00:00
Jung-uk Kim
f67f8ffd43 Prefer correct and simpler backlight control methods for ASUS G2K laptop. 2010-02-13 02:30:43 +00:00
Gavin Atkinson
b31b20fa02 Add support for a few more Sony-specific ACPI features (default display
brightness, wired LAN power and bass gain), and update the description of
one previously unknown feature (display contrast).  While here, expand on
a comment and remove two defines left over from an old version of the code.

Also update man page to document the above changes, and correct grammar.

PR:		kern/127581
2010-02-07 18:36:30 +00:00
Jung-uk Kim
9a179dd8be Merge ACPICA 20100121. 2010-01-21 21:14:28 +00:00
Mitsuru IWASAKI
a50f74cc3a Update acpi_ibm syctl nodes on resume.
This should fix some Thinkpad specific problems such as
connecting to a headphone jack is not functional on X41.

Reviewed by:	takawata
MFC after:	1 week
2010-01-05 20:29:30 +00:00
John Baldwin
62ec4c19c4 - Numerous whitespace and style fixes.
- More descriptive error messages when failing to parse components during
  attach.
2009-10-29 18:03:16 +00:00
John Baldwin
08bfbfaa08 Remove unnecessary locking from attach(). This fixes a LOR between the
acpi_ibm lock and the sysctl lock.

MFC after:	3 days
2009-09-24 16:51:56 +00:00
John Baldwin
fd0a5b2f1e The elements in the component arrays may be direct Package objects rather
than references to objects.  In that case, simply use the Package directly.

I think a recent change to ACPI-CA is causing the interpreter to
automatically expand these references.

Reported by:	Olivier Smedts  olivier gid0 org
MFC after:	3 days
2009-09-22 18:34:23 +00:00
John Baldwin
5c84347532 Re-remove the IBM0057 ID used for PS/2 mouse controllers. The asl for the
61p includes the hotkey device as IBM0068 and the mouse as IBM0057 similar
to other systems.

Submitted by:	marius
MFC after:	3 days
2009-09-20 13:28:19 +00:00
Rui Paulo
9e760f2578 acpi_hp.c:
- sysctl dev.acpi_hp.0.verbose to toggle debug output
- A modification so this can deal with different array lengths
  when reading the CMI BIOS - now it works ok on HP Compaq nx7300
  as well.
- Change behaviour to query only max_instance-1 CMI BIOS instances,
  because all HPs seen so far are broken in that respect
  (or there is a fundamental misunderstanding on my side, possible
  as well). This way a disturbing ACPI Error Field exceeds Buffer
  message is avoided.
- New bit to set on dev.acpi_hp.0.cmi_detail (0x8) to
  also query the highest guid instance of CMI bios

acpi_hp.4:
- Document dev.acpi_hp.0.verbose sysctl in man page
- Document new bit for dev.acpi_hp.0.cmi_detail
- Add a section to manpage about hardware that has been reported
  to work ok

Submitted by:	Michael Gmelin <freebsdusb at bindone.de>
Approved by:	re (kib)
MFC after:	2 weeks
2009-07-03 21:12:37 +00:00
Rui Paulo
0f73b657a9 acpi_wmi_if:
- Document different semantics for ACPI_WMI_PROVIDES_GUID_STRING_METHOD

acpi_wmi.c:
- Modify acpi_wmi_provides_guid_string_method to return absolut number of
  instances known for the given GUID.

acpi_hp.c:
- sysctl dev.acpi_hp.0.verbose to toggle debug output
- A modification so this can deal with different array lengths
  when reading the CMI BIOS - now it works ok on HP Compaq nx7300
  as well.
- Change behaviour to query only max_instance-1 CMI BIOS instances,
  because all HPs seen so far are broken in that respect
  (or there is a fundamental misunderstanding on my side, possible
  as well). This way a disturbing ACPI Error Field exceeds Buffer
  message is avoided.
- New bit to set on dev.acpi_hp.0.cmi_detail (0x8) to
  also query the highest guid instance of CMI bios

acpi_hp.4:
- Document dev.acpi_hp.0.verbose sysctl in man page
- Document new bit for dev.acpi_hp.0.cmi_detail
- Add a section to manpage about hardware that has been reported
  to work ok

Submitted by:	Michael Gmelin, freebsdusb at bindone.de
Approved by:	re (kib)
MFC after:	2 weeks
2009-06-30 09:51:41 +00:00
Rui Paulo
07bed1516d Fix build with ACPI_DEBUG.
MFC after:	2 weeks
2009-06-23 15:08:03 +00:00
Rui Paulo
df849145b5 * Driver for ACPI WMI (Windows Management Instrumentation)
* Driver for ACPI HP extra functionations, which required
  ACPI WMI driver.

Submitted by:	Michael <freebsdusb at bindone.de>
Approved by:	re
MFC after:	2 weeks
2009-06-23 13:17:25 +00:00
Jung-uk Kim
129d3046ef Import ACPICA 20090521. 2009-06-05 18:44:36 +00:00
Christian Brueffer
e831cd36d0 Remove unused variables.
Found with:	Coverity Prevent(tm)
CID:		544, 545
2009-05-12 23:22:58 +00:00
Attilio Rao
4060f1bbd0 - Add the support for the Asus A3F and A3E device
- Fix style for A3N and for a comment

Submitted by:	Akira Funahashi <funa@funa.org>
Tested by:	Marcin Nowak <marcin.nowak@simplusnet.pl>,
		Diego Sardina <diego.sardina@gmx.com>
PR:		kern/128634
2009-04-04 17:01:32 +00:00
Warner Losh
e3545bcc26 device_shutdown returns int. 2009-02-05 18:39:33 +00:00
Stanislav Sedov
d85f3935ec - Fix incorrect array declaration that was causing the stack overflow
on some (most?) Asus laptops.

Discussed with:	rpaulo
Approved by:	kib (mentor)
MFC after:	2 weeks
2008-12-27 20:48:11 +00:00
Rui Paulo
31fb990621 Add support for Asus A8Sr notebooks.
PR:		128553
Submitted by:	Eygene Ryabinkin <rea-fbsd at codelabs.ru>
Reviewed by:	philip
MFC after:	2 months
2008-11-04 11:52:50 +00:00
Ed Schouten
d172be1fd0 Fix a typo in a comment in the ACPI Fujitsu driver.
The word "hotkys" should read "hotkeys".

Submitted by:	Jille Timmermans <jille quis cx>
2008-09-08 06:29:24 +00:00
Rui Paulo
de32615879 Fix typo in comment. 2008-08-19 22:28:24 +00:00
Dag-Erling Smørgrav
2616144e43 Add sbuf_new_auto as a shortcut for the very common case of creating a
completely dynamic sbuf.

Obtained from:	Varnish
MFC after:	2 weeks
2008-08-09 11:14:05 +00:00
Rui Paulo
0fc34be4c7 Fix my previous commit. We actually should pass evaluation args in
AcpiEvaluateObject() calls, otherwise, we are not able to bring devices
back up (NULL means 0, hence always off).
While there add missing WLAN on/off support.

MFC after:	3 days
Pointy hat to:	rpaulo
2008-07-04 23:40:53 +00:00
Remko Lodder
aa219554e0 Style fix (space into tab).
Approved by:	imp (mentor, implicit)
2008-06-28 08:36:47 +00:00
Rui Paulo
aea6188719 Add the missing support for Asus Eee PC in acpi_asus(4).
This includes hotkeys support and sysctl variables to control camera
and card reader. These new sysctls don't have CTFLAG_ANYBODY set.

While there add entries to devd.conf related to the Eee volume keys.

Reviewed by:	phillip
MFC after:	1 week
Also tested by:	lme (previous version)
2008-06-27 12:04:36 +00:00
Pawel Jakub Dawidek
661812c066 Add ID for T61p, which is not IBM really, but well. 2008-05-20 12:26:45 +00:00
Kevin Lo
774ba0453e Add support for controlling the audio power
Tested on:	VGN-SZ79TN
2008-05-20 06:32:07 +00:00
Rui Paulo
059c9e5c61 style(9).
Noticed by:	jkim
2008-04-15 22:47:01 +00:00
Poul-Henning Kamp
36bff1ebfb Convert amd64 and i386 to share the atrtc device driver. 2008-04-14 08:00:00 +00:00
Rui Paulo
fea0f7cc21 Add support for Asus EeePC backlight control.
Submitted by:	Akira Funahashi <funa at funa.org>
MFC after:	1 week
2008-04-13 14:40:02 +00:00
Jung-uk Kim
824d24a83e - Add ASUS G2K laptop support.
- Add DLED and GLED found on newer ASUS laptops.
- Turn on BLED, TLED, and WLED by default as other OSes.

Reviewed by:	philip
MFC after:	3 days
2008-04-10 15:17:41 +00:00
John Baldwin
cc75dfe70b Don't attach to the "IBM0057" ID. This ID is used by IBM machines for
the PS/2 mouse controller.  Thus, when acpi_ibm(4) claimed the mouse
device, the mouse would stop working.  The one ACPI dump of an R40 that
I've looked at includes an HKEY device with the proper "IBM0068" ID, so
I'm not sure how the "IBM0057" ID could have helped at all.

MFC after:	1 week
Approved by:	njl
2007-10-25 17:30:18 +00:00
Matt Jacob
6eb9bbf329 Initialize key to zero. 2007-06-17 04:40:33 +00:00
Philip Paeps
18d725a04e Add support for Asus A3N laptops.
Submitted by:	Holger Jorra <holger_jorra -at- gmx.net>
MFC after:	1 day
2007-06-02 21:10:01 +00:00