diff options
Diffstat (limited to 'Documentation/hwmon/lis3lv02d')
-rw-r--r-- | Documentation/hwmon/lis3lv02d | 55 |
1 files changed, 38 insertions, 17 deletions
diff --git a/Documentation/hwmon/lis3lv02d b/Documentation/hwmon/lis3lv02d index effe949a728..06534f25e64 100644 --- a/Documentation/hwmon/lis3lv02d +++ b/Documentation/hwmon/lis3lv02d | |||
@@ -3,7 +3,8 @@ Kernel driver lis3lv02d | |||
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | 5 | ||
6 | * STMicroelectronics LIS3LV02DL and LIS3LV02DQ | 6 | * STMicroelectronics LIS3LV02DL, LIS3LV02DQ (12 bits precision) |
7 | * STMicroelectronics LIS302DL, LIS3L02DQ, LIS331DL (8 bits) | ||
7 | 8 | ||
8 | Authors: | 9 | Authors: |
9 | Yan Burman <burman.yan@gmail.com> | 10 | Yan Burman <burman.yan@gmail.com> |
@@ -13,32 +14,52 @@ Authors: | |||
13 | Description | 14 | Description |
14 | ----------- | 15 | ----------- |
15 | 16 | ||
16 | This driver provides support for the accelerometer found in various HP | 17 | This driver provides support for the accelerometer found in various HP laptops |
17 | laptops sporting the feature officially called "HP Mobile Data | 18 | sporting the feature officially called "HP Mobile Data Protection System 3D" or |
18 | Protection System 3D" or "HP 3D DriveGuard". It detects automatically | 19 | "HP 3D DriveGuard". It detects automatically laptops with this sensor. Known |
19 | laptops with this sensor. Known models (for now the HP 2133, nc6420, | 20 | models (full list can be found in drivers/hwmon/hp_accel.c) will have their |
20 | nc2510, nc8510, nc84x0, nw9440 and nx9420) will have their axis | 21 | axis automatically oriented on standard way (eg: you can directly play |
21 | automatically oriented on standard way (eg: you can directly play | 22 | neverball). The accelerometer data is readable via |
22 | neverball). The accelerometer data is readable via | 23 | /sys/devices/platform/lis3lv02d. Reported values are scaled |
23 | /sys/devices/platform/lis3lv02d. | 24 | to mg values (1/1000th of earth gravity). |
24 | 25 | ||
25 | Sysfs attributes under /sys/devices/platform/lis3lv02d/: | 26 | Sysfs attributes under /sys/devices/platform/lis3lv02d/: |
26 | position - 3D position that the accelerometer reports. Format: "(x,y,z)" | 27 | position - 3D position that the accelerometer reports. Format: "(x,y,z)" |
27 | calibrate - read: values (x, y, z) that are used as the base for input | 28 | rate - read reports the sampling rate of the accelerometer device in HZ. |
28 | class device operation. | 29 | write changes sampling rate of the accelerometer device. |
29 | write: forces the base to be recalibrated with the current | 30 | Only values which are supported by HW are accepted. |
30 | position. | 31 | selftest - performs selftest for the chip as specified by chip manufacturer. |
31 | rate - reports the sampling rate of the accelerometer device in HZ | ||
32 | 32 | ||
33 | This driver also provides an absolute input class device, allowing | 33 | This driver also provides an absolute input class device, allowing |
34 | the laptop to act as a pinball machine-esque joystick. | 34 | the laptop to act as a pinball machine-esque joystick. Joystick device can be |
35 | calibrated. Joystick device can be in two different modes. | ||
36 | By default output values are scaled between -32768 .. 32767. In joystick raw | ||
37 | mode, joystick and sysfs position entry have the same scale. There can be | ||
38 | small difference due to input system fuzziness feature. | ||
39 | Events are also available as input event device. | ||
40 | |||
41 | Selftest is meant only for hardware diagnostic purposes. It is not meant to be | ||
42 | used during normal operations. Position data is not corrupted during selftest | ||
43 | but interrupt behaviour is not guaranteed to work reliably. In test mode, the | ||
44 | sensing element is internally moved little bit. Selftest measures difference | ||
45 | between normal mode and test mode. Chip specifications tell the acceptance | ||
46 | limit for each type of the chip. Limits are provided via platform data | ||
47 | to allow adjustment of the limits without a change to the actual driver. | ||
48 | Seltest returns either "OK x y z" or "FAIL x y z" where x, y and z are | ||
49 | measured difference between modes. Axes are not remapped in selftest mode. | ||
50 | Measurement values are provided to help HW diagnostic applications to make | ||
51 | final decision. | ||
52 | |||
53 | On HP laptops, if the led infrastructure is activated, support for a led | ||
54 | indicating disk protection will be provided as /sys/class/leds/hp::hddprotect. | ||
35 | 55 | ||
36 | Another feature of the driver is misc device called "freefall" that | 56 | Another feature of the driver is misc device called "freefall" that |
37 | acts similar to /dev/rtc and reacts on free-fall interrupts received | 57 | acts similar to /dev/rtc and reacts on free-fall interrupts received |
38 | from the device. It supports blocking operations, poll/select and | 58 | from the device. It supports blocking operations, poll/select and |
39 | fasync operation modes. You must read 1 bytes from the device. The | 59 | fasync operation modes. You must read 1 bytes from the device. The |
40 | result is number of free-fall interrupts since the last successful | 60 | result is number of free-fall interrupts since the last successful |
41 | read (or 255 if number of interrupts would not fit). | 61 | read (or 255 if number of interrupts would not fit). See the hpfall.c |
62 | file for an example on using the device. | ||
42 | 63 | ||
43 | 64 | ||
44 | Axes orientation | 65 | Axes orientation |
@@ -55,7 +76,7 @@ the accelerometer are converted into a "standard" organisation of the axes | |||
55 | * If the laptop is put upside-down, Z becomes negative | 76 | * If the laptop is put upside-down, Z becomes negative |
56 | 77 | ||
57 | If your laptop model is not recognized (cf "dmesg"), you can send an | 78 | If your laptop model is not recognized (cf "dmesg"), you can send an |
58 | email to the authors to add it to the database. When reporting a new | 79 | email to the maintainer to add it to the database. When reporting a new |
59 | laptop, please include the output of "dmidecode" plus the value of | 80 | laptop, please include the output of "dmidecode" plus the value of |
60 | /sys/devices/platform/lis3lv02d/position in these four cases. | 81 | /sys/devices/platform/lis3lv02d/position in these four cases. |
61 | 82 | ||