On 15/04/10 01:05, Neil Brown wrote: : > > The Openmoko Freerunner has as lis302D which is an SPI version of a very > similar device, so making the one driver work on that was well would be nice > if possible. Definitely! > > The lis302d can detect threshold crossings and taps as well as simple > orientation and I found it useful to include support for those in the driver > as well. > In particular: > 1/ I allowed the 'data_rate' that was programmed to be any number (including > fractions and 0) and the driver would report at that rate, using a timer > for rates below 50Hz. > When the app is only interested in long-term change, this can > significantly reduce the amount of data that has to be handled by > userspace. Samu (from Nokia) has started to had such idea via the patch lis3-setup-poll-interval-limits.patch which in now in the -mm tree. It allows to specify the polling rate via the input interface (/sys/devices/platform/lis3lv02d/input/input8/poll). But for now I don't think the actual refresh rate is updated automatically, it would be a nice addition. > > 2/ I allowed a 'threshold' to be set so that changes bigger than that get > notified promptly even if that is faster than the requested data rate It could be interesting too... but what interface are you using for the userspace to specify this threshold? A sysfs file? > > 3/ I allowed taps to be detected and reported as BTN_X BTN_Y and BTN_Z > input events. This one should now be working with Samu's patch lis3-interrupt-handlers-for-8bit-wakeup-and-click-events.patch also in the -mm tree. > > Would it be sensible to include that support in this driver? The > LIS331DL seem to have the same threshold and tap support. So all in all, if you could have a look at what changes are necessary to get the lis3lv02d driver work with your hardware, it would be great. (I suspect it should be quite little.) See you, Eric -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html