Skip to content

Commit

Permalink
ACPI: thinkpad-acpi: add bluetooth and WWAN rfkill support
Browse files Browse the repository at this point in the history
Add a read/write rfkill interface to the bluetooth radio switch on the
bluetooth submodule, and one for the wireless wan radio switch to the wan
submodule.

Since rfkill does care for when a switch changes state, use WLSW
notifications to also check if the WWAN or Bluetooth switches did not
change state (due to them being slaves of WLSW in firmware/hardware, but
that reality not being always properly exported by the thinkpad firmware).

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Henrique de Moraes Holschuh committed Jul 21, 2008
1 parent 133ec3b commit 0e74dc2
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 32 deletions.
22 changes: 16 additions & 6 deletions Documentation/laptops/thinkpad-acpi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,8 @@ Bluetooth
---------

procfs: /proc/acpi/ibm/bluetooth
sysfs device attribute: bluetooth_enable
sysfs device attribute: bluetooth_enable (deprecated)
sysfs rfkill class: switch "tpacpi_bluetooth_sw"

This feature shows the presence and current state of a ThinkPad
Bluetooth device in the internal ThinkPad CDC slot.
Expand All @@ -643,8 +644,12 @@ Sysfs notes:
0: disables Bluetooth / Bluetooth is disabled
1: enables Bluetooth / Bluetooth is enabled.

Note: this interface will be probably be superseded by the
generic rfkill class, so it is NOT to be considered stable yet.
Note: this interface has been superseded by the generic rfkill
class. It has been deprecated, and it will be removed in year
2010.

rfkill controller switch "tpacpi_bluetooth_sw": refer to
Documentation/rfkill.txt for details.

Video output control -- /proc/acpi/ibm/video
--------------------------------------------
Expand Down Expand Up @@ -1374,7 +1379,8 @@ EXPERIMENTAL: WAN
-----------------

procfs: /proc/acpi/ibm/wan
sysfs device attribute: wwan_enable
sysfs device attribute: wwan_enable (deprecated)
sysfs rfkill class: switch "tpacpi_wwan_sw"

This feature is marked EXPERIMENTAL because the implementation
directly accesses hardware registers and may not work as expected. USE
Expand Down Expand Up @@ -1404,8 +1410,12 @@ Sysfs notes:
0: disables WWAN card / WWAN card is disabled
1: enables WWAN card / WWAN card is enabled.

Note: this interface will be probably be superseded by the
generic rfkill class, so it is NOT to be considered stable yet.
Note: this interface has been superseded by the generic rfkill
class. It has been deprecated, and it will be removed in year
2010.

rfkill controller switch "tpacpi_wwan_sw": refer to
Documentation/rfkill.txt for details.

Multiple Commands, Module Parameters
------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions drivers/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ config THINKPAD_ACPI
select INPUT
select NEW_LEDS
select LEDS_CLASS
select NET
select RFKILL
---help---
This is a driver for the IBM and Lenovo ThinkPad laptops. It adds
support for Fn-Fx key combinations, Bluetooth control, video
Expand Down
Loading

0 comments on commit 0e74dc2

Please sign in to comment.