[lkml]   [2009]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] lis3: add click function
Op 12-06-09 12:37, Daniel Mack schreef:
> The LIS3 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 removed because I couldn't find any reference
> of them in the datasheet and the overlapped with the CLICK_ register
> space.
It's not so simple. The driver supports both LIS302xx and LIS3LV02xx.
The LIS302xx (whoami == 0x3A) has CLICK_* registers, and the LIS3LV02xx
(whoami == 0x3B) has DD_* registers. So first of all, you should not
remove the references to DD_*, just add the CLICK_* definitions after
them. Moreover, the usage of those registers should therefore be
conditioned to whoami == 0x3A.

Also, I did not follow all the black magic happening with platform_data.
Could you explain how much would be needed to have the same feature in
the ACPI side?

Also, it seems to only set up the "click" feature, without ever using
it. How do you access this information from userspace? Is it specific to
SPI? Maybe it could also generate button events in the joystick interface?

See you,

 \ /
  Last update: 2009-06-12 13:47    [W:0.069 / U:13.580 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site