LIS3LV02Dx Accelerometer driver

This adds a driver to the accelerometer sensor found in several HP
laptops (under the commercial names of "HP Mobile Data Protection System
3D" and "HP 3D driveguard").  It tries to have more or less the same
interfaces as the hdaps and other accelerometer drivers: in sysfs and as
a joystick.

This driver was first written by Yan Burman.  Eric Piel has updated it
and slimed it up (including the removal of an interface to access to the
free-fall feature of the sensor because it is not reliable enough for
now).  Pavel Machek removed few more features and switched locking from
semaphore to mutex.

Several people have contributed to the database of the axes.

[eric.piel@tremplin-utc.net: LIS3LV02D: Conform to the new ACPI API]
Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: Pavel Machek <pavel@suse.cz>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 6de1e0f..1c44f5c 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -825,6 +825,25 @@
 	  Say Y here if you have an applicable laptop and want to experience
 	  the awesome power of hdaps.
 
+config SENSORS_LIS3LV02D
+	tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer"
+	depends on ACPI && INPUT
+	default n
+	help
+	  This driver provides support for the LIS3LV02Dx accelerometer. In
+	  particular, it can be found in a number of HP laptops, which have the
+	  "Mobile Data Protection System 3D" or "3D DriveGuard" feature. On such
+	  systems the driver should load automatically (via ACPI). The
+	  accelerometer might also be found in other systems, connected via SPI
+	  or I2C.  The accelerometer data is readable via
+	  /sys/devices/platform/lis3lv02d.
+
+	  This driver also provides an absolute input class device, allowing
+	  the laptop to act as a pinball machine-esque joystick.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called lis3lv02d.
+
 config SENSORS_APPLESMC
 	tristate "Apple SMC (Motion sensor, light sensor, keyboard backlight)"
 	depends on INPUT && X86