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