Merge branch 'hugepage-fallbacks' (hugepatch patches from David Rientjes)
[linux-block.git] / Documentation / admin-guide / laptops / toshiba_haps.rst
CommitLineData
b02f1651 1====================================
f369aa6d
AA
2Toshiba HDD Active Protection Sensor
3====================================
4
b02f1651
MCC
5Kernel driver: toshiba_haps
6
f369aa6d
AA
7Author: Azael Avalos <coproscefalo@gmail.com>
8
9
b02f1651 10.. 0. Contents
f369aa6d 11
b02f1651
MCC
12 1. Description
13 2. Interface
14 3. Accelerometer axes
15 4. Supported devices
16 5. Usage
f369aa6d
AA
17
18
191. Description
20--------------
21
22This driver provides support for the accelerometer found in various Toshiba
2b4f4f3d 23laptops, being called "Toshiba HDD Protection - Shock Sensor" officially,
f369aa6d
AA
24and detects laptops automatically with this device.
25On Windows, Toshiba provided software monitors this device and provides
26automatic HDD protection (head unload) on sudden moves or harsh vibrations,
27however, this driver only provides a notification via a sysfs file to let
28userspace tools or daemons act accordingly, as well as providing a sysfs
29file to set the desired protection level or sensor sensibility.
30
31
322. Interface
33------------
34
35This device comes with 3 methods:
b02f1651
MCC
36
37==== =====================================================================
38_STA Checks existence of the device, returning Zero if the device does not
f369aa6d 39 exists or is not supported.
b02f1651
MCC
40PTLV Sets the desired protection level.
41RSSS Shuts down the HDD protection interface for a few seconds,
f369aa6d 42 then restores normal operation.
b02f1651 43==== =====================================================================
f369aa6d
AA
44
45Note:
b02f1651
MCC
46 The presence of Solid State Drives (SSD) can make this driver to fail loading,
47 given the fact that such drives have no movable parts, and thus, not requiring
48 any "protection" as well as failing during the evaluation of the _STA method
49 found under this device.
f369aa6d
AA
50
51
523. Accelerometer axes
53---------------------
54
55This device does not report any axes, however, to query the sensor position
56a couple HCI (Hardware Configuration Interface) calls (0x6D and 0xA6) are
57provided to query such information, handled by the kernel module toshiba_acpi
58since kernel version 3.15.
59
60
614. Supported devices
62--------------------
63
64This driver binds itself to the ACPI device TOS620A, and any Toshiba laptop
65with this device is supported, given the fact that they have the presence of
66conventional HDD and not only SSD, or a combination of both HDD and SSD.
67
68
695. Usage
70--------
71
72The sysfs files under /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS620A:00/ are:
b02f1651
MCC
73
74================ ============================================================
75protection_level The protection_level is readable and writeable, and
f369aa6d
AA
76 provides a way to let userspace query the current protection
77 level, as well as set the desired protection level, the
eddeed12 78 available protection levels are::
b02f1651 79
eddeed12
MCC
80 ============ ======= ========== ========
81 0 - Disabled 1 - Low 2 - Medium 3 - High
82 ============ ======= ========== ========
b02f1651
MCC
83
84reset_protection The reset_protection entry is writeable only, being "1"
f369aa6d
AA
85 the only parameter it accepts, it is used to trigger
86 a reset of the protection interface.
b02f1651 87================ ============================================================