Commit Graph

100 Commits

Author SHA1 Message Date
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
Nate Lawson
bb05b80cf5 Mute the main audio during reboot/shutdown. This prevents a burst of static
on the speakers of my Panasonic Y4.  It might make sense to do this in the
mixer rc.d script as well.
2007-06-02 19:37:27 +00:00
Markus Brueffer
9cf7411649 Utilize led_create_state in order to preserve the status of the ThinkLight
on driver attach.

PR:		kern/112044
Submitted by:	Henrik Brix Andersen <henrik@brixandersen.dk>
Approved by:	emax (mentor) (earlier version)
2007-04-24 23:09:37 +00:00
Jung-uk Kim
2be4e4713a Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
Takanori Watanabe
7687221959 Prevent freeing wild pointer when bailing out. 2006-11-06 12:14:27 +00:00
Kevin Lo
c0348f2e02 Document the cdp for controlling CD power.
Approved by: cognet
2006-11-01 03:45:24 +00:00
John Baldwin
223eee05e4 Remove unused softc pointer variable from the probe routine.
CID:		1560
Found by:	Coverity Prevent (tm)
2006-10-31 16:13:38 +00:00
Takanori Watanabe
e4ab9f19d7 Driver for some ASUS desktop motherboard extras.
Though it is named after overclocking tool for ASUS motherboards,
it is not capable to change clock ratio or CPU core voltage.

This driver exports Templature, Power output voltage, Fan RPM under
dev.acpi_aiboost.0.*.

Descriptions for these values are set to sysctl describe, which can be
get by sysctl -d.
2006-10-30 05:38:48 +00:00
Takanori Watanabe
b98a0eca16 Improve exception string format.
PR:100671
MFC after: 3 days
2006-08-14 18:38:56 +00:00
Takanori Watanabe
924ede2031 Remove debug messages on notify handler.
PR:100671
2006-08-14 18:24:22 +00:00
Yoshihiro Takahashi
d6da5e88de Use the acpi_event_sleep_button_sleep() function instead of
the acpi_SetSleepState().

Submitted by:	njl
2006-06-06 15:20:06 +00:00
Yoshihiro Takahashi
14ecccda0e Add Fn+F7 hotkey (suspend) support.
Tested by:	nork
2006-06-05 11:55:20 +00:00
Philip Paeps
e13d42014a Add support for Asus W5A laptops.
Submitted by:	Pavel Martynenko <mpv -at- ip.net.ua>
X-MFC after:	3 days (or so)
2006-04-09 15:22:25 +00:00
Philip Paeps
f50bf4010f Add support for Asus A4D laptops. Currently without display switching
support.  Which reminds me that I'm not even sure if this works on _any_
laptop at all. :-o

PR:		kern/90607
Submitted by:	"Wojciech A. Koszek" <dunstan -at- freebsd.czest.pl>
MFC after:	3 days
2006-01-29 23:59:43 +00:00
Philip Paeps
e691fe45a2 Add support for Asus A6VM laptops.
Submitted by:	Sashi Asokarajan <mail -at- sashi.de>
MFC after:	3 days
2006-01-29 23:54:32 +00:00
Philip Paeps
b9abb62d05 Allow non-P laptops to make use of this module.
Other major changes (from the author):

 o Individual method probing
 o Finally figured out what the RBLL, RVOL, GHKS, GSIF are:
   - RBLL - lcd_brightness radix
   - RVOL - volume radix
   - GHKS - Currently activated hotkey (internal)
   - GSIF - Hotkey mask (internal)

Submitted by:	Anish Mistry <mistry.7 -at- osu.edu>
MFC after:	3 days
2006-01-29 23:52:02 +00:00
Markus Brueffer
f93120994e - Add support for setting the fan control mode to manual or automatic
- Add support for adjusting the fan speed if the fan control mode is manual

Documentation for the relevant embedded controller register was obtained from
http://www.thinkwiki.org/wiki/Patch_for_controlling_fan_speed

Tested on:	R51  by Fabian Keil
		T41p by markus
Requested by:	many
Approved by:	philip
MFC after:	1 week
2006-01-14 00:39:10 +00:00
David E. O'Brien
2a191126de Canonize the include of acpi.h. 2005-09-11 18:39:03 +00:00
Markus Brueffer
0873506fc0 Don't lock when holding led_mtx, instead use AcpiOsQueueForExecution to defer
the locking.

Idea taken from: acpi_asus(4)

Approved by:	philip
Reported by:	avatar
		Gordon Bergling <gbergling@0xfce3.net>
MFC after:	1 week
2005-08-04 22:48:36 +00:00
Martin Cracauer
c1204267ca Add the ID of my Thinkpad R40. Makes the module detect and with the
exception of fans everything seems to work fine.  No ill effects
observed.
Reviewed by:	Nate Lawson (on acpi list)
Approved by:	re (Ken Smith)
2005-06-17 17:10:16 +00:00
Markus Brueffer
4aea1563d6 - Only create the led(4) interface, if setting the thinklight is possible
- Initialize val_ec with the content of the volume EC register
  for ACPI_IBM_METHOD_VOLUME and ACPI_IBM_METHOD_MUTE in acpi_ibm_sysctl_set()
  if there is no CMOS handle present. This fixes setting volume and mute on
  such models.

Submitted by:	ru
Approved by:	philip
2005-06-10 11:56:18 +00:00
Markus Brueffer
a4bfd6388f Import a mostly rewritten and extended version of acpi_ibm:
- Restructured for easier extensibility and maintainability
- To be more uniform with the other ACPI extras drivers and to better reflect
  their actual meaning, some sysctls were moved:
    o brightness -> lcd_brightness
    o keylight   -> thinklight
    o enable     -> events
    o misckey    -> hotkey
    o avail_mask -> availmask
    o key_mask   -> eventmask
- New "initialmask" sysctl, which holds the initial eventmask
- The "wlan" sysctl is now read-only, since writing to it didn't have
  any effect
- The "version" sysctl was removed, since it seems to be the same (0x100)
  on all models I have seen
- Support for more hotkeys by the "hotkey" sysctl
- Improved support of ACPI events. Disabled by default, since it unexpectedly
  changes the behaviour of some keys. (on my T41p there are now 24 different
  keypress events that get reported)
- write support for: volume, mute, lcd_brightness and thinklight
- led(4) interface for the thinklight [1]
- New sysctls "fan" and "fan_speed" to support reading of fan status and speed
- New sysctl "thermal" to support reading of up to 8 thermal sensors

Reviewed by:	philip
Approved by:	philip
Submitted by:	simon [1]
Inspired by:	The Linux ibm_acpi driver by Borislav Deianov
		  http://ibm-acpi.sourceforge.net/
		The ThinkPad Button program (tpb) by Markus Braun
		  http://www.nongnu.org/tpb/
Thanks to:	brueffer, dvl, njl, philip, simon, takawata and the many
		testers from freebsd-acpi@ and freebsd-mobile@
2005-06-09 20:17:32 +00:00