]> git.baikalelectronics.ru Git - kernel.git/commit
lis3: add click function
authorDaniel Mack <daniel@caiaq.de>
Tue, 16 Jun 2009 22:34:17 +0000 (15:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 02:47:57 +0000 (19:47 -0700)
commit6d4c60d12535c1b18fca80c3ef6d34e3c3205058
treecb3c1e9df2da5e4817acfeb75284e8d7b92eae33
parent4da1b377844bc2747fc5722d22697886f5398307
lis3: add click function

The LIS302DL accelerometer chip has a 'click' feature which can be used to
detect sudden motion on any of the three axis.  Configuration data is
passed via spi platform_data and no action is taken if that's not
specified, so it won't harm any existing platform.

To make the configuration effective, the IRQ lines need to be set up
appropriately.  This patch also adds a way to do that from board support
code.

The DD_* definitions were factored out to an own enum because they are
specific to LIS3LV02D devices.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-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>
drivers/hwmon/lis3lv02d.c
drivers/hwmon/lis3lv02d.h
drivers/hwmon/lis3lv02d_spi.c
include/linux/lis3lv02d.h [new file with mode: 0644]