Back to home page

OSCL-LXR

 
 

    


0001 ====================================
0002 Toshiba HDD Active Protection Sensor
0003 ====================================
0004 
0005 Kernel driver: toshiba_haps
0006 
0007 Author: Azael Avalos <coproscefalo@gmail.com>
0008 
0009 
0010 .. 0. Contents
0011 
0012    1. Description
0013    2. Interface
0014    3. Accelerometer axes
0015    4. Supported devices
0016    5. Usage
0017 
0018 
0019 1. Description
0020 --------------
0021 
0022 This driver provides support for the accelerometer found in various Toshiba
0023 laptops, being called "Toshiba HDD Protection - Shock Sensor" officially,
0024 and detects laptops automatically with this device.
0025 On Windows, Toshiba provided software monitors this device and provides
0026 automatic HDD protection (head unload) on sudden moves or harsh vibrations,
0027 however, this driver only provides a notification via a sysfs file to let
0028 userspace tools or daemons act accordingly, as well as providing a sysfs
0029 file to set the desired protection level or sensor sensibility.
0030 
0031 
0032 2. Interface
0033 ------------
0034 
0035 This device comes with 3 methods:
0036 
0037 ====    =====================================================================
0038 _STA    Checks existence of the device, returning Zero if the device does not
0039         exists or is not supported.
0040 PTLV    Sets the desired protection level.
0041 RSSS    Shuts down the HDD protection interface for a few seconds,
0042         then restores normal operation.
0043 ====    =====================================================================
0044 
0045 Note:
0046   The presence of Solid State Drives (SSD) can make this driver to fail loading,
0047   given the fact that such drives have no movable parts, and thus, not requiring
0048   any "protection" as well as failing during the evaluation of the _STA method
0049   found under this device.
0050 
0051 
0052 3. Accelerometer axes
0053 ---------------------
0054 
0055 This device does not report any axes, however, to query the sensor position
0056 a couple HCI (Hardware Configuration Interface) calls (0x6D and 0xA6) are
0057 provided to query such information, handled by the kernel module toshiba_acpi
0058 since kernel version 3.15.
0059 
0060 
0061 4. Supported devices
0062 --------------------
0063 
0064 This driver binds itself to the ACPI device TOS620A, and any Toshiba laptop
0065 with this device is supported, given the fact that they have the presence of
0066 conventional HDD and not only SSD, or a combination of both HDD and SSD.
0067 
0068 
0069 5. Usage
0070 --------
0071 
0072 The sysfs files under /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS620A:00/ are:
0073 
0074 ================   ============================================================
0075 protection_level   The protection_level is readable and writeable, and
0076                    provides a way to let userspace query the current protection
0077                    level, as well as set the desired protection level, the
0078                    available protection levels are::
0079 
0080                      ============   =======   ==========   ========
0081                      0 - Disabled   1 - Low   2 - Medium   3 - High
0082                      ============   =======   ==========   ========
0083 
0084 reset_protection   The reset_protection entry is writeable only, being "1"
0085                    the only parameter it accepts, it is used to trigger
0086                    a reset of the protection interface.
0087 ================   ============================================================