Commit Graph

917 Commits

Author SHA1 Message Date
Jonathan McDowell 3af9bfcb43 eeepc-laptop: enable Bluetooth ACPI details
Although rfkill support for the EEE bluetooth device has been added to
2.6.28-rc the appropriate ACPI accessor definitions were not added, so
the support was non functional. The patch below adds the get and set
accessors and has been verified to work on an EEE 901.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Acked-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-16 14:32:18 -05:00
Henrique de Moraes Holschuh aa2fbcec07 ACPI: thinkpad-acpi: bump up version to 0.22
It is about time to bump up the version.

Features added since 0.21:  fan suspend/resume support, preserve radio
state across power off (for some radio types), built-in UWB radio
rfkill support and thermal alarm events support.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:48:24 -05:00
Henrique de Moraes Holschuh 54926ce8d2 ACPI: thinkpad-acpi: handle HKEY event 6030
HKEY event 0x6030 is a helper for Lenovo's Advanced Thermal Management
Windows driver, which is, of course, completely undocumented.

Silence any warnings about it being an unknown alarm, and report it
unmodified for userspace.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:48:03 -05:00
Henrique de Moraes Holschuh 1c2ece758a ACPI: thinkpad-acpi: clean-up fan subdriver quirk
Better document the Unitialized HFSP quirk, and modularize it a bit.
This makes the code flow easier to read and reduces LOC.

Apply the Unitialized HFSP closer to the source (i.e. inside the
get_fan_status()), this fixes a harmless buglet where at driver init
with the quirk active, the user could set the hwmon pwm1 attribute and
switch out of pwm1_mode=2 to pwm1_mode=0 without changing pwm1_mode
directly.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Tino Keitel <tino.keitel@tikei.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:47:14 -05:00
Henrique de Moraes Holschuh cb42935898 ACPI: thinkpad-acpi: start the event hunt season
Ask users to tell us about any unhandled events they find.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:46:27 -05:00
Henrique de Moraes Holschuh 106b4e6657 ACPI: thinkpad-acpi: handle HKEY thermal and battery alarms
Handle some HKEY events that are actually firmware alarms.  For
now, we do the simple thing: log specific messages to the log and let
the thinkpad-specific event pass to userspace.

In the future, these events will be migrated to generic notifications
and subsystems.

These alarms are NOT available on all ThinkPads.  E.g. the T43 only
issues 0x6011 and 0x6012.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:45:46 -05:00
Henrique de Moraes Holschuh 3827e7a3fd ACPI: thinkpad-acpi: clean up hotkey_notify()
Clean up the hotkey_notify() handler, which handles the HKEY notifications
from the ACPI firmware.  It was getting too long and deep.

No functional changes.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:40:02 -05:00
Henrique de Moraes Holschuh 7646ea88af ACPI: thinkpad-acpi: use killable instead of interruptible mutexes
Unfortunately, POSIX in all of its braindamage, do not state that userspace has
to deal with EINTR in read/write and friends... so, lesser code just doesn't.

Switch from *_interruptible to *_killable on the sysfs- and procfs-related
mutexes.  This closes this possible can of worms.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:39:35 -05:00
Henrique de Moraes Holschuh 0045c0aa7d ACPI: thinkpad-acpi: add UWB radio support
Add rfkill support for USB UWB radio devices on very recent ThinkPad
laptop models.

The new subdriver is moslty a trimmed down copy of the wwan subdriver.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:36:51 -05:00
Henrique de Moraes Holschuh 90d9d3c79c ACPI: thinkpad-acpi: preserve radio state across shutdown
Store in firmware NVRAM the radio state on machine shutdown for WWAN and
bluetooth.  Also, try to set the initial boot state of these radios as the
rfkill default state for their respective classes.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:36:25 -05:00
Henrique de Moraes Holschuh 153f82207c ACPI: thinkpad-acpi: resume with radios disabled
Instruct the firmware to not enable the radios when resuming.  This
is safer, and the rfkill core will take care to manually enable any
radios that need to be enabled.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:30:29 -05:00
Henrique de Moraes Holschuh a73f30916e ACPI: thinkpad-acpi: debug facility to emulate the rf switches
This code is required to keep the thinkpad-acpi maintainer sane, and
it is disabled by default.

Add a debug facility to simulate an rfkill hardware rocker switch, a
bluetooth rfkill soft-switch, a WWAN rfkill soft-switch on thinkpads.

The simulated switches obviously do not kill any radios in hardware or
firmware (unlike the real one).  They also don't issue deprecated proc
events.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:29:21 -05:00
Kay Sievers e0b36fc5ef ACPI: thinkpad-acpi: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-15 13:28:26 -05:00
Larry Finger fe8e4e039d hp-wmi: handle rfkill_register() failure
Compilation of the HP WMI hotkeys code results in the following:

  CC [M]  drivers/platform/x86/hp-wmi.o
drivers/platform/x86/hp-wmi.c: In function hp_wmi_bios_setup:
drivers/platform/x86/hp-wmi.c:431: warning: ignoring return value of rfkill_register,
	 declared with attribute warn_unused_result
drivers/platform/x86/hp-wmi.c:441: warning: ignoring return value of rfkill_register,
	 declared with attribute warn_unused_result
drivers/platform/x86/hp-wmi.c:450: warning: ignoring return value of rfkill_register,
	 declared with attribute warn_unused_result

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-09 16:54:41 -08:00
Len Brown d97c0defba Merge branch 'drivers-platform' into release
Conflicts:
	drivers/misc/Kconfig

Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-09 04:56:56 -05:00
Len Brown b4f9fe1215 ACPI: move wmi, asus_acpi, toshiba_acpi to drivers/platform/x86
These are platform specific drivers that happen to use ACPI,
while drivers/acpi/ is for code that implements ACPI itself.

Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-19 04:42:33 -05:00
Len Brown 41b16dce39 create drivers/platform/x86/ from drivers/misc/
Move x86 platform specific drivers from drivers/misc/
to a new home under drivers/platform/x86/.

The community has been maintaining x86 vendor-specific
platform specific drivers under /drivers/misc/ for a few years.
The oldest ones started life under drivers/acpi.
They moved out of drivers/acpi/ because they don't actually
implement the ACPI specification, but either simply
use ACPI, or implement vendor-specific ACPI extensions.

In the future we anticipate...
drivers/misc/ will go away.
other architectures will create drivers/platform/<arch>

Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-19 04:42:32 -05:00