/kern_2.6.32/Documentation/hwmon/lis3lv02d

http://omnia2droid.googlecode.com/ · #! · 71 lines · 55 code · 16 blank · 0 comment · 0 complexity · e2be0e0df45313aa388f04b328888d72 MD5 · raw file

  1. Kernel driver lis3lv02d
  2. =======================
  3. Supported chips:
  4. * STMicroelectronics LIS3LV02DL and LIS3LV02DQ
  5. Authors:
  6. Yan Burman <burman.yan@gmail.com>
  7. Eric Piel <eric.piel@tremplin-utc.net>
  8. Description
  9. -----------
  10. This driver provides support for the accelerometer found in various HP
  11. laptops sporting the feature officially called "HP Mobile Data
  12. Protection System 3D" or "HP 3D DriveGuard". It detects automatically
  13. laptops with this sensor. Known models (for now the HP 2133, nc6420,
  14. nc2510, nc8510, nc84x0, nw9440 and nx9420) will have their axis
  15. automatically oriented on standard way (eg: you can directly play
  16. neverball). The accelerometer data is readable via
  17. /sys/devices/platform/lis3lv02d.
  18. Sysfs attributes under /sys/devices/platform/lis3lv02d/:
  19. position - 3D position that the accelerometer reports. Format: "(x,y,z)"
  20. calibrate - read: values (x, y, z) that are used as the base for input
  21. class device operation.
  22. write: forces the base to be recalibrated with the current
  23. position.
  24. rate - reports the sampling rate of the accelerometer device in HZ
  25. This driver also provides an absolute input class device, allowing
  26. the laptop to act as a pinball machine-esque joystick.
  27. Another feature of the driver is misc device called "freefall" that
  28. acts similar to /dev/rtc and reacts on free-fall interrupts received
  29. from the device. It supports blocking operations, poll/select and
  30. fasync operation modes. You must read 1 bytes from the device. The
  31. result is number of free-fall interrupts since the last successful
  32. read (or 255 if number of interrupts would not fit).
  33. Axes orientation
  34. ----------------
  35. For better compatibility between the various laptops. The values reported by
  36. the accelerometer are converted into a "standard" organisation of the axes
  37. (aka "can play neverball out of the box"):
  38. * When the laptop is horizontal the position reported is about 0 for X and Y
  39. and a positive value for Z
  40. * If the left side is elevated, X increases (becomes positive)
  41. * If the front side (where the touchpad is) is elevated, Y decreases
  42. (becomes negative)
  43. * If the laptop is put upside-down, Z becomes negative
  44. If your laptop model is not recognized (cf "dmesg"), you can send an
  45. email to the authors to add it to the database. When reporting a new
  46. laptop, please include the output of "dmidecode" plus the value of
  47. /sys/devices/platform/lis3lv02d/position in these four cases.
  48. Q&A
  49. ---
  50. Q: How do I safely simulate freefall? I have an HP "portable
  51. workstation" which has about 3.5kg and a plastic case, so letting it
  52. fall to the ground is out of question...
  53. A: The sensor is pretty sensitive, so your hands can do it. Lift it
  54. into free space, follow the fall with your hands for like 10
  55. centimeters. That should be enough to trigger the detection.