Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 605f884d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86

Pull x86 platform driver updates from Matthew Garrett:
 "A moderate number of changes, but nothing awfully significant.

  A lot of const cleanups, some reworking and additions to the rfkill
  quirks in the asus driver, a new driver for generating falling laptop
  events on Toshibas and some misc fixes.

  Maybe vendors have stopped inventing things"

* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: (41 commits)
  platform/x86: Enable build support for toshiba_haps
  Documentation: Add file about toshiba_haps module
  platform/x86: Toshiba HDD Active Protection Sensor
  asus-nb-wmi: Add wapf4 quirk for the U32U
  alienware-wmi: make hdmi_mux enabled on case-by-case basis
  ideapad-laptop: Constify DMI table and other r/o variables
  asus-nb-wmi.c: Rename x401u quirk to wapf4
  compal-laptop: correct invalid hwmon name
  toshiba_acpi: Add Qosmio X75-A to the alt keymap dmi list
  toshiba_acpi: Add extra check to backlight code
  Fix log message about future removal of interface
  ideapad-laptop: Disable touchpad interface on Yoga models
  asus-nb-wmi: Add wapf4 quirk for the X550CC
  intel_ips: Make ips_mcp_limits variables static
  thinkpad_acpi: Mark volume_alsa_control_{vol,mute} as __initdata
  fujitsu-laptop: Mark fujitsu_dmi_table[] DMI table as __initconst
  hp-wmi: Add missing __init annotations to initialization code
  hp_accel: Constify ACPI and DMI tables
  fujitsu-tablet: Mark DMI callbacks as __init code
  dell-laptop: Mark dell_quirks[] DMI table as __initconst
  ...
parents 49899007 186e4e89
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -18,3 +18,5 @@ sonypi.txt
	- info on Linux Sony Programmable I/O Device support.
thinkpad-acpi.txt
	- information on the (IBM and Lenovo) ThinkPad ACPI Extras driver.
toshiba_haps.txt
	- information on the Toshiba HDD Active Protection Sensor driver.
+76 −0
Original line number Diff line number Diff line
Kernel driver toshiba_haps
Toshiba HDD Active Protection Sensor
====================================

Author: Azael Avalos <coproscefalo@gmail.com>


0. Contents
-----------

1. Description
2. Interface
3. Accelerometer axes
4. Supported devices
5. Usage


1. Description
--------------

This driver provides support for the accelerometer found in various Toshiba
laptops, being called "Toshiba HDD Protection - Shock Sensor" officialy,
and detects laptops automatically with this device.
On Windows, Toshiba provided software monitors this device and provides
automatic HDD protection (head unload) on sudden moves or harsh vibrations,
however, this driver only provides a notification via a sysfs file to let
userspace tools or daemons act accordingly, as well as providing a sysfs
file to set the desired protection level or sensor sensibility.


2. Interface
------------

This device comes with 3 methods:
_STA -  Checks existence of the device, returning Zero if the device does not
	exists or is not supported.
PTLV -  Sets the desired protection level.
RSSS -  Shuts down the HDD protection interface for a few seconds,
	then restores normal operation.

Note:
The presence of Solid State Drives (SSD) can make this driver to fail loading,
given the fact that such drives have no movable parts, and thus, not requiring
any "protection" as well as failing during the evaluation of the _STA method
found under this device.


3. Accelerometer axes
---------------------

This device does not report any axes, however, to query the sensor position
a couple HCI (Hardware Configuration Interface) calls (0x6D and 0xA6) are
provided to query such information, handled by the kernel module toshiba_acpi
since kernel version 3.15.


4. Supported devices
--------------------

This driver binds itself to the ACPI device TOS620A, and any Toshiba laptop
with this device is supported, given the fact that they have the presence of
conventional HDD and not only SSD, or a combination of both HDD and SSD.


5. Usage
--------

The sysfs files under /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS620A:00/ are:
protection_level - The protection_level is readable and writeable, and
		   provides a way to let userspace query the current protection
		   level, as well as set the desired protection level, the
		   available protection levels are:
		   0 - Disabled | 1 - Low | 2 - Medium | 3 - High
reset_protection - The reset_protection entry is writeable only, being "1"
		   the only parameter it accepts, it is used to trigger
		   a reset of the protection interface.
+1 −1
Original line number Diff line number Diff line
@@ -10017,7 +10017,7 @@ F: arch/x86/
X86 PLATFORM DRIVERS
M:	Matthew Garrett <matthew.garrett@nebula.com>
L:	platform-driver-x86@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86.git
T:	git git://cavan.codon.org.uk/platform-drivers-x86.git
S:	Maintained
F:	drivers/platform/x86/

+19 −0
Original line number Diff line number Diff line
@@ -652,6 +652,25 @@ config TOSHIBA_BT_RFKILL
	  If you have a modern Toshiba laptop with a Bluetooth and an
	  RFKill switch (such as the Portege R500), say Y.

config TOSHIBA_HAPS
	tristate "Toshiba HDD Active Protection Sensor"
	depends on ACPI
	---help---
	  This driver adds support for the built-in accelerometer
	  found on recent Toshiba laptops equiped with HID TOS620A
	  device.

	  This driver receives ACPI notify events 0x80 when the sensor
	  detects a sudden move or a harsh vibration, as well as an
	  ACPI notify event 0x81 whenever the movement or vibration has
	  been stabilized.

	  Also provides sysfs entries to get/set the desired protection
	  level and reseting the HDD protection interface.

	  If you have a recent Toshiba laptop with a built-in accelerometer
	  device, say Y.

config ACPI_CMPC
	tristate "CMPC Laptop Extras"
	depends on X86 && ACPI
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ obj-$(CONFIG_TOPSTAR_LAPTOP) += topstar-laptop.o
obj-$(CONFIG_ACPI_TOSHIBA)	+= toshiba_acpi.o

obj-$(CONFIG_TOSHIBA_BT_RFKILL)	+= toshiba_bluetooth.o
obj-$(CONFIG_TOSHIBA_HAPS)	+= toshiba_haps.o
obj-$(CONFIG_INTEL_SCU_IPC)	+= intel_scu_ipc.o
obj-$(CONFIG_INTEL_SCU_IPC_UTIL) += intel_scu_ipcutil.o
obj-$(CONFIG_INTEL_MFLD_THERMAL) += intel_mid_thermal.o
Loading