[PATCH 4/5] Staging/iio/adc/touchscreen/MXS: add interrupt driven touch detection

2013-09-10 Thread Juergen Beisert
For battery driven systems it is a very bad idea to collect the touchscreen data within a kernel busy loop. This change uses the features of the hardware to delay and accumulate samples in hardware to avoid a high interrupt and CPU load. Note: this is only tested on a i.MX23 SoC yet.

[PATCH 4/5] Staging/iio/adc/touchscreen/MXS: add interrupt driven touch detection

2013-09-06 Thread Juergen Beisert
For battery driven systems it is a very bad idea to collect the touchscreen data within a kernel busy loop. This change uses the features of the hardware to delay and accumulate samples in hardware to avoid a high interrupt and CPU load. Note: this is only tested on a i.MX23 SoC yet.

Re: [PATCH 4/5] Staging/iio/adc/touchscreen/MXS: add interrupt driven touch detection

2013-09-06 Thread Dan Carpenter
On Fri, Sep 06, 2013 at 12:08:42PM +0200, Juergen Beisert wrote: +static int mxs_lradc_read_ts_channel(struct mxs_lradc *lradc) +{ + u32 reg; + int val; + + reg = readl(lradc-base + LRADC_CTRL1); + + /* only channels 3 to 5 are of interest here */ + if (reg

Re: [PATCH 4/5] Staging/iio/adc/touchscreen/MXS: add interrupt driven touch detection

2013-09-06 Thread Jürgen Beisert
On Friday 06 September 2013 14:26:11 Dan Carpenter wrote: On Fri, Sep 06, 2013 at 12:08:42PM +0200, Juergen Beisert wrote: +static int mxs_lradc_read_ts_channel(struct mxs_lradc *lradc) +{ + u32 reg; + int val; + + reg = readl(lradc-base + LRADC_CTRL1); + + /* only

Re: [PATCH 4/5] Staging/iio/adc/touchscreen/MXS: add interrupt driven touch detection

2013-09-06 Thread Marek Vasut
Dear Jürgen Beisert, On Friday 06 September 2013 14:26:11 Dan Carpenter wrote: On Fri, Sep 06, 2013 at 12:08:42PM +0200, Juergen Beisert wrote: +static int mxs_lradc_read_ts_channel(struct mxs_lradc *lradc) +{ + u32 reg; + int val; + + reg = readl(lradc-base + LRADC_CTRL1);