[PATCH 1/2]: export-irq-functionality.patch

Simon Kagstrom simon.kagstrom at gmail.com
Sat Nov 15 20:27:01 CET 2008


On Sat, 15 Nov 2008 18:37:56 +0000
Andy Green <andy at openmoko.com> wrote:

> | I don't know it if this could be usefull but there's been a
> | submission of an accelerometer driver (ST LIS3LV02Dx) for mainline
> | inclusion, see
> [1].
> 
> | [1] - http://lkml.org/lkml/2008/10/18/144
> 
> Thanks for the tip... I guess this explains why that driver doesn't
> have the difficulty around SPI IO in interrupt context...

Yep, good find!

> ''* Andrew Morton asked to investigate using interrupt-based sensor
> reading (instead of timer-based): it turns out not useful because the
> sensor generate interrupts even if the data has not changed, so we end
> up waking up at 40Hz''
> 
> I think it is useful alright to have a reliably constant period
> between samples, it just makes trouble for IO subsystem that can't
> operate in interrupt context; the threshold stuff can help with the
> absolute amount of samples.

Well, for the threshold stuff the driver needs to be interrupt driven.
It's good to see another driver, but I don't think it would be useful
for openmoko - it uses a kernel thread that wakes up every 50 ms and
reports data. That would not be good for battery life :-)

// Simon



More information about the openmoko-kernel mailing list