Commit Graph

64 Commits

Author SHA1 Message Date
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
Yoshihiro Takahashi
914ee8ba4b Fix my copyright. 2005-05-14 10:51:16 +00:00
Philip Paeps
18d92cd86c Sync with Linux acpi4asus, adding support for loads of new models.
MFC after:	3 days
2005-05-09 12:51:48 +00:00
Philip Paeps
caac49960b Add support for Asus V6V[1] and W1N notebooks.
Submitted by:	Jean-Sébastien Pédron <jspedron@club-internet.fr> [1]
MFC after:	3 days
2005-05-09 08:43:49 +00:00
Philip Paeps
b308de8beb Fix a small locking error.
Submitted by:	Anish Mistry <mistry.7@osu.edu>
2005-04-04 10:21:20 +00:00
Philip Paeps
4d2743aec5 Use a taskqueue for led-handling to prevent a potential panic.
Submitted by:	pjd
2005-03-30 15:06:11 +00:00
Pawel Jakub Dawidek
0440fc940a Use device_set_desc_copy() for non-constant strings.
Approved by:	njl
2005-03-24 21:07:55 +00:00
John Baldwin
3da063baf7 Add another HID for the Toshiba SPA40 laptop.
Submitted by:	Chris Reece car at crank dot org dot uk
MFC after:	1 week
2005-03-24 19:02:13 +00:00
Philip Paeps
4b0eb6a716 Make sure status variable is always initialized. Why didn't this show up in
my testing?  *grmbl*
2005-03-21 18:11:50 +00:00
Philip Paeps
d8e0b9e1c0 Simplify sysctl handling by consolidating various get/set functions into
generic functions, use a table for hooking up sysctls nodes rather than doing
it manually.  While here, clean up some style bugs.

Glanced at by:	njl
2005-03-20 23:36:36 +00:00
Philip Paeps
9a8b554fc2 Add acpi_fujitsu for handling acpi-controlled buttons on Fujitsu laptops.
Submitted by:	Anish Mistry <mistry.7 -at- osu.edu>
Reviewed by:	njl
X-MFC after:	5.4-RELEASE
2005-03-18 08:48:10 +00:00
David E. O'Brien
dad97fee58 Fix SCM ID's. 2005-03-02 09:22:34 +00:00
Nate Lawson
276cd9216d Unify ACPI_DEBUG support for all OEM drivers under ACPI_OEM. Since more than
one will never be supported on the same platform, this does not hurt
debugging.

MFC after:	3 days
2004-12-13 23:31:46 +00:00
Scott Long
82d4da0f73 Allow the acpi_ibm module to be built with ACPI_DEBUG. 2004-12-13 03:22:11 +00:00
Takanori Watanabe
06064893b3 Add IBM Laptop extra device driver.
This depends on ACPI and RTC registers.

Reviewed by: njl
2004-12-09 13:54:29 +00:00
Warner Losh
669f5ef94f Attach the device at acpi_sony instead of acpi_snc. Rename some
internal variables as well to reflect the change.
2004-11-29 16:40:30 +00:00
Warner Losh
2451114ab1 Remove more debugging 2004-11-15 20:08:44 +00:00
Warner Losh
b42dda8abf Merge 1.3 from acpi_snc.c: don't use return_VALUE() macro
Improve style(9) compliance.
2004-11-15 05:12:17 +00:00
Warner Losh
f454a309d3 Kill ACPI_FUNCTION_TRACE. It is killing the tinderbox build, and it
isn't worth adding to the modules lists that we have to hard code for
this to work.  Since we print PID right away, we have a trace point
already.

Minor knf while I'm here.
2004-11-13 23:39:56 +00:00
Philip Paeps
078080c965 o Change the strcmp() to a strncmp() to allow us to attach to 'E'
models of laptops, which are essentially the same as the normal
   ones, as far as acpi_asus is concerned[1]

 o Use the above as an excuse to reshuffle the mess I made of the
   probe function when I originally wrote it.

Reported by:	    Soeren Larsen <soeren@whiteswan.dk>
2004-11-12 23:21:19 +00:00
Philip Paeps
03cbfbc51a Minor whitespace nitpicking to reduce my diffs of Real Changes[tm] 2004-11-12 23:06:13 +00:00
Warner Losh
dbacb6c44d Commit takawata-san's Sony Notebook Controller driver, integrated into
the tree.  Small tweaks were made by myself to eliminate unnecessary
includes and some other minor issues.  Last time I asked takawata-san
about this driver, he suggested I commit it.

Submitted by: takawata
2004-11-11 22:54:58 +00:00
Philip Paeps
9923cf221b Add support for gadgets on Asus L4R and M6R notebooks. 2004-11-08 16:54:26 +00:00
Nate Lawson
f3118682aa Add power profile support so that the LCD changes brightness levels based
on the AC line state.

Submitted by:	OGAWA Takaya <t-ogawa@triaez.kaisei.org>
MFC after:	1 week
2004-11-07 23:18:23 +00:00
Philip Paeps
706bd68cca Fix support for the Asus-compatible gadgets in Samsung P30/P35 laptops.
PR:		73380
Submitted by:	Sebastian Schulze Struchtrup <seb@struchtrup.com>
2004-11-05 07:24:11 +00:00
Philip Paeps
17520557d3 Add support for Asus M6N laptops
Submitted by:	Andreas Dieling <snow@quantentunnel.de>
2004-11-02 13:02:22 +00:00
Nate Lawson
9f65aa0340 Be sure to always unlock the sx lock when exiting the sysctl function.
MFC after:	3 days
2004-08-24 17:53:25 +00:00
Nate Lawson
8781a7852f MPSAFE locking
* Serialize access to the sysctl routines and the notify handler
* Assert that the sx lock is held in any functions they call.
* Note that recursively calling to re-enable the hotkeys is sub-optimal.
2004-08-13 06:22:35 +00:00
Nate Lawson
e8a162f4f3 MPSAFE locking
* Serialize access to the sysctl routines and the notify handler
* Assert that the sx lock is held in any functions they call.
2004-08-13 06:22:31 +00:00
Nate Lawson
1051a7c2da MPSAFE locking
* Serialize access to the sysctl routines and the notify handler.
2004-08-13 06:22:29 +00:00
Philip Paeps
09003ac33f Unbreak LINT by making sure that method is always defined.
Submitted by:	roam
Pointy hat to:	philip
2004-08-04 14:29:22 +00:00
Philip Paeps
f5296c9302 Further cleanup: merge the three led toggling functions
into a single general function to handle all leds.

Approved by:	njl
2004-08-03 22:37:09 +00:00
Nate Lawson
8390cfe8a6 Use the acpi_{Get,Set}Integer functions instead of rolling custom ones.
Clean up return path of each function to have a single exit point.  This
reduces diffs against the MPSAFE tree.
2004-08-03 21:17:36 +00:00
Nate Lawson
be22348065 Whitespace cleanup and move static variables together. 2004-07-24 20:40:02 +00:00
Nate Lawson
b4cb140233 Remove unneeded parens and fix whitespace. 2004-07-24 20:39:25 +00:00
Yoshihiro Takahashi
ee6020c993 Add the ACPI Panasonic extras driver.
Submitted by:	OGAWA Takaya <t-ogawa@triaez.kaisei.org> and nyan
2004-07-21 14:47:54 +00:00
Nate Lawson
3ed1dfa11d Update for acpi_id_probe() 2004-06-29 19:05:20 +00:00