toshiba_haps.rst 3.0 KB

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