[PATCH V6 0/2] iio: input: ti_am335x_adc: Add continuous sampling support

2013-08-25 Thread Zubair Lutfullah
multiple tiny patches. Zubair Lutfullah (2): input: ti_am335x_tsc: Enable shared IRQ for TSC iio: ti_am335x_adc: Add continuous sampling support drivers/iio/adc/ti_am335x_adc.c | 254 ++--- drivers/input/touchscreen/ti_am335x_tsc.c | 24 ++- include/linux/mfd

[PATCH 1/2] input: ti_am335x_tsc: Enable shared IRQ for TSC

2013-08-25 Thread Zubair Lutfullah
written with the required mask every time. Rachna Patil (TI) laid ground work for shared IRQ. Signed-off-by: Zubair Lutfullah --- drivers/input/touchscreen/ti_am335x_tsc.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen

[PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-08-25 Thread Zubair Lutfullah
channels can be read simultaneously and pushed to userspace. Restructured the driver to fit IIO ABI. And added trigger support. Signed-off-by: Zubair Lutfullah Acked-by: Greg Kroah-Hartman Signed-off-by: Russ Dill --- drivers/iio/adc/ti_am335x_adc.c | 254

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-08-28 Thread Zubair Lutfullah :
On Wed, Aug 28, 2013 at 06:43:08PM +0200, Sebastian Andrzej Siewior wrote: > * Zubair Lutfullah | 2013-08-25 23:45:24 [+0100]: > > >diff --git a/drivers/iio/adc/ti_am335x_adc.c > >b/drivers/iio/adc/ti_am335x_adc.c > >index a952538..ae2202b 100644 > >--- a/drivers/ii

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-08-28 Thread Zubair Lutfullah :
On Wed, Aug 28, 2013 at 04:18:35PM +0200, Sebastian Andrzej Siewior wrote: > * Zubair Lutfullah | 2013-08-25 23:45:24 [+0100]: > > >diff --git a/drivers/iio/adc/ti_am335x_adc.c > >b/drivers/iio/adc/ti_am335x_adc.c > >index a952538..ae2202b 100644 > >--- a/drivers/ii

Re: [PATCH] iio: am335x-iio-adc: select triggered buffer

2013-08-28 Thread Zubair Lutfullah :
On Wed, Aug 28, 2013 at 12:31:34PM +0200, Sebastian Andrzej Siewior wrote: > "triggered buffer" isn't selected so we end up with: > |ERROR: "iio_triggered_buffer_setup" [drivers/iio/adc/ti_am335x_adc.ko] > undefined! > > Signed-off-by: Sebastian Andrzej Siewior > --- > Please merge this into _th

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-08-28 Thread Zubair Lutfullah :
On Wed, Aug 28, 2013 at 03:01:24PM +0200, Sebastian Andrzej Siewior wrote: > * Zubair Lutfullah | 2013-08-25 23:45:24 [+0100]: > > I am mostly happy with it. There are just two things I pointed out. > Besides that, it looks good from my side. Sign-off? > >+static irqreturn_t

Re: [PATCH 1/2] input: ti_am335x_tsc: Enable shared IRQ for TSC

2013-08-28 Thread Zubair Lutfullah :
On Wed, Aug 28, 2013 at 12:42:11PM +0200, Sebastian Andrzej Siewior wrote: > * Zubair Lutfullah | 2013-08-25 23:45:23 [+0100]: > > >diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c > >b/drivers/input/touchscreen/ti_am335x_tsc.c > >index e1c5300..4124e580 10064

[PATCH V9 0/2] iio: input: ti_am335x_adc: Add continuous sampling support

2013-09-17 Thread Zubair Lutfullah
to the driver that was irrelevant to the continuous sampling patch. Cleanup will be done separately once this goes through. Hope these patches meet the mighty kernel standards :) Zubair Zubair Lutfullah (2): input: ti_am335x_tsc: Enable shared IRQ for TSC iio: ti_am335x_adc: Add continuous

[PATCH 1/2] input: ti_am335x_tsc: Enable shared IRQ for TSC

2013-09-17 Thread Zubair Lutfullah
written with the required mask every time. Rachna Patil (TI) laid ground work for shared IRQ. Signed-off-by: Zubair Lutfullah Acked-by: Dmitry Torokhov --- drivers/input/touchscreen/ti_am335x_tsc.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/input

[PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-17 Thread Zubair Lutfullah
mode. Signed-off-by: Zubair Lutfullah Acked-by: Greg Kroah-Hartman Signed-off-by: Russ Dill Acked-by: Lee Jones Acked-by: Sebastian Andrzej Siewior --- drivers/iio/adc/ti_am335x_adc.c | 222 +- include/linux/mfd/ti_am335x_tscadc.h |9 ++ 2 files

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-17 Thread Zubair Lutfullah :
On Tue, Sep 17, 2013 at 09:27:27PM -0700, Dmitry Torokhov wrote: > Hi Zubair, > > On Tue, Sep 17, 2013 at 09:44:07AM +0500, Zubair Lutfullah wrote: > > + > > + ret = devm_request_threaded_irq(indio_dev->dev.parent, > > + irq, > > +

[PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Zubair Lutfullah
mode. Signed-off-by: Zubair Lutfullah Acked-by: Greg Kroah-Hartman Signed-off-by: Russ Dill Acked-by: Lee Jones Acked-by: Sebastian Andrzej Siewior --- drivers/iio/adc/ti_am335x_adc.c | 216 +- include/linux/mfd/ti_am335x_tscadc.h |9 ++ 2 files

[PATCH 1/2] input: ti_am335x_tsc: Enable shared IRQ for TSC

2013-09-18 Thread Zubair Lutfullah
written with the required mask every time. Rachna Patil (TI) laid ground work for shared IRQ. Signed-off-by: Zubair Lutfullah Acked-by: Dmitry Torokhov --- drivers/input/touchscreen/ti_am335x_tsc.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/input

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Zubair Lutfullah :
On Wed, Sep 18, 2013 at 10:39:42AM +0100, Jonathan Cameron wrote: > "Zubair Lutfullah :" wrote: > >On Tue, Sep 17, 2013 at 09:27:27PM -0700, Dmitry Torokhov wrote: > >> Hi Zubair, > >> > >> On Tue, Sep 17, 2013 at 09:44:07AM +0500, Zubair

[PATCH V10 0/2] iio: input: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Zubair Lutfullah
to iio/userspace. - Removed some of the patchwork to the driver that was irrelevant to the continuous sampling patch. Cleanup will be done separately once this goes through. Hope these patches meet the mighty kernel standards :) Zubair Zubair Lutfullah (2): input: ti_am335x_tsc: Enable shared

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Zubair Lutfullah :
On Wed, Sep 18, 2013 at 06:05:12PM +0100, Jonathan Cameron wrote: > > >> >However in this case such conversion us dangerous. With all but IRQ > >> >resource managed by the traditional methods they will be released > >first > >> >with IRQ handler deregistered very last. Therefore if device is not >

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Zubair Lutfullah :
On Wed, Sep 18, 2013 at 02:58:47PM +0100, Jonathan Cameron wrote: > On 18/09/13 12:23, Zubair Lutfullah wrote: > >Previously the driver had only one-shot reading functionality. > >This patch adds continuous sampling support to the driver. > > ... > > Very very nearly t

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Zubair Lutfullah :
On Thu, Sep 19, 2013 at 06:41:22AM +0100, Jonathan Cameron wrote: > > > >... > >> > > >> > struct tiadc_device { > >> > struct ti_tscadc_dev *mfd_tscadc; > >> > int channels; > >> > u8 channel_line[8]; > >> > u8 channel_step[8]; > >> >+ int buffer_en_ch_steps;

[PATCH 1/3] input: ti_am335x_tsc: Enable shared IRQ for TSC

2013-09-18 Thread Zubair Lutfullah
written with the required mask every time. Rachna Patil (TI) laid ground work for shared IRQ. Signed-off-by: Zubair Lutfullah Acked-by: Dmitry Torokhov --- drivers/input/touchscreen/ti_am335x_tsc.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/input

[PATCH 3/3] iio: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Zubair Lutfullah
mode. Signed-off-by: Zubair Lutfullah Acked-by: Greg Kroah-Hartman Signed-off-by: Russ Dill Acked-by: Lee Jones Acked-by: Sebastian Andrzej Siewior --- drivers/iio/adc/ti_am335x_adc.c | 213 +- include/linux/mfd/ti_am335x_tscadc.h |9 ++ 2 files

[PATCH V11 0/3] iio: input: ti_am335x_adc: Add continuous sampling support

2013-09-18 Thread Zubair Lutfullah
patches meet the mighty kernel standards :) Zubair Zubair Lutfullah (3): input: ti_am335x_tsc: Enable shared IRQ for TSC iio: ti_am335x_adc: optimize memory usage. iio: ti_am335x_adc: Add continuous sampling support drivers/iio/adc/ti_am335x_adc.c | 217

[PATCH 2/3] iio: ti_am335x_adc: optimize memory usage

2013-09-18 Thread Zubair Lutfullah
12 bit ADC data is stored in 32 bits of storage. Change from u32 to u16 to reduce wasted memory. Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-11 Thread Zubair Lutfullah :
On Sun, Sep 08, 2013 at 02:42:51PM +0100, Jonathan Cameron wrote: > On 09/01/13 12:17, Zubair Lutfullah wrote: Thanks for the review. Fitting this driver in the usual trigger ABI is a bad workaround indeed. I am still a bit unclear regarding the implementation. Questions and replies inline.

Re: [PATCH 1/2] input: ti_am335x_tsc: Enable shared IRQ for TSC

2013-09-11 Thread Zubair Lutfullah :
On Mon, Sep 09, 2013 at 09:12:30AM -0700, Dmitry Torokhov wrote: > On Sun, Sep 08, 2013 at 12:29:26PM +0100, Jonathan Cameron wrote: > > On 09/01/13 12:17, Zubair Lutfullah wrote: > > > Enable shared IRQ to allow ADC to share IRQ line from > > > parent MFD core. Only

Re: Testing ti_am335x_adc continuous mode (WAS: Re: [PATCH 2/2]

2013-10-07 Thread Zubair Lutfullah :
On Mon, Oct 07, 2013 at 01:53:17PM +0200, Sebastian Andrzej Siewior wrote: > Hi Zubair, > > I have here am335x-evm board. The output of voltage4 (via `cat > /sys/bus/iio/devices/iio\:device0/in_voltage4_raw´) returns values in > the range 570…580. I tested the continuous sampling mdoe by executing

[PATCH V7 0/2] iio: input: ti_am335x_tscadc: Add continuous sampling support to adc

2013-09-01 Thread Zubair Lutfullah
based on wierd ack system. not required. removed. each irq handler deals with its own stuff *only* Thanks for all the input Regards Zubair Lutfullah Kakakhel Zubair Lutfullah (2): input: ti_am335x_tsc: Enable shared IRQ for TSC iio: ti_am335x_adc: Add continuous sampling support drivers/iio

[PATCH 1/2] input: ti_am335x_tsc: Enable shared IRQ for TSC

2013-09-01 Thread Zubair Lutfullah
written with the required mask every time. Rachna Patil (TI) laid ground work for shared IRQ. Signed-off-by: Zubair Lutfullah --- drivers/input/touchscreen/ti_am335x_tsc.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b

[PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-01 Thread Zubair Lutfullah
channels can be read simultaneously and pushed to userspace. Restructured the driver to fit IIO ABI. And added trigger support. Signed-off-by: Zubair Lutfullah Acked-by: Greg Kroah-Hartman Signed-off-by: Russ Dill Acked-by: Lee Jones Acked-by: Sebastian Andrzej Siewior --- drivers/iio/adc/Kconfig

[PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling support

2013-09-01 Thread Zubair Lutfullah
channels can be read simultaneously and pushed to userspace. Restructured the driver to fit IIO ABI. And added trigger support. Signed-off-by: Zubair Lutfullah Acked-by: Greg Kroah-Hartman Signed-off-by: Russ Dill Acked-by: Lee Jones Acked-by: Sebastian Andrzej Siewior --- drivers/iio/adc/Kconfig

[PATCH 1/2] input: ti_am335x_tsc: Enable shared IRQ for TSC

2013-09-01 Thread Zubair Lutfullah
written with the required mask every time. Rachna Patil (TI) laid ground work for shared IRQ. Signed-off-by: Zubair Lutfullah --- drivers/input/touchscreen/ti_am335x_tsc.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b

[PATCH V8 0/2] iio: input: ti_am335x_tscadc: Add continuous sampling support to adc

2013-09-01 Thread Zubair Lutfullah
buffer support. added - TSC/ADC IRQ handling was based on wierd ack system. not required. removed. each irq handler deals with its own stuff *only* Thanks for all the input Regards Zubair Lutfullah Kakakhel Zubair Lutfullah (2): input: ti_am335x_tsc: Enable shared IRQ for TSC iio: ti_am335x_adc

Re: [PATCH 1/3] iio: ti_am335x_adc: fix static in function header

2013-09-26 Thread Zubair Lutfullah :
On Sun, Sep 22, 2013 at 07:03:53PM +0100, Jonathan Cameron wrote: > On 09/22/13 09:20, Zubair Lutfullah wrote: > > Static is missing in function header. Corrected. > > > > Signed-off-by: Zubair Lutfullah > Applied to the togreg branch of iio.git > > As you've

Re: [PATCH V11 0/3] iio: input: ti_am335x_adc: Add continuous sampling support

2013-09-21 Thread Zubair Lutfullah :
kernel.org/pub/scm/linux/kernel/git/jic23/iio.git Thank-you very much for the quick feedbacks and accepting these patches! :) Zubair > > On 09/19/13 07:24, Zubair Lutfullah wrote: > > Hi, > > > > These apply to the togreg branch in iio. > > > > Round 11 >

Re: [PATCH 3/3] iio: ti_am335x_adc: Add continuous sampling support

2013-09-21 Thread Zubair Lutfullah :
On Sat, Sep 21, 2013 at 07:28:32PM +0100, Jonathan Cameron wrote: > On 09/19/13 07:24, Zubair Lutfullah wrote: > > Previously the driver had only one-shot reading functionality. > > This patch adds continuous sampling support to the driver. ... > I've added a SELECT

[PATCH 2/3] iio: ti_am335x_adc: cleanup trigger related code

2013-09-22 Thread Zubair Lutfullah
Trigger related headers and variables are not needed as driver is now based on INDIO_BUFFER_HARDWARE mode Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc

[PATCH 1/3] iio: ti_am335x_adc: fix static in function header

2013-09-22 Thread Zubair Lutfullah
Static is missing in function header. Corrected. Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index 5287bff..91dce1f 100644 --- a

[PATCH 3/3] iio: ti_am335x_adc: cleanup error case

2013-09-22 Thread Zubair Lutfullah
Driver is functional without this error case. Cleaned up. Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index 4eb63eb..8fb5429 100644 --- a

[PATCH 0/3] iio: ti_am335x_adc: small fix and cleanup

2013-09-22 Thread Zubair Lutfullah
. ADC works without it. Thanks Zubair Zubair Lutfullah (3): iio: ti_am335x_adc: fix static in function header iio: ti_am335x_adc: cleanup trigger related code iio: ti_am335x_adc: cleanup error case drivers/iio/adc/ti_am335x_adc.c | 16 +--- 1 file changed, 1 insertion(+), 15

Re: [PATCH 4/4] iio: ti_am335x_adc: Add continuous sampling and trigger support

2013-08-16 Thread Zubair Lutfullah :
On Fri, Aug 16, 2013 at 04:59:49PM +0200, Sebastian Andrzej Siewior wrote: > * Zubair Lutfullah | 2013-08-13 21:05:03 [+0100]: > > >diff --git a/drivers/iio/adc/ti_am335x_adc.c > >b/drivers/iio/adc/ti_am335x_adc.c > >index 3ceac3e..0d7e313 100644 > >--- a/drivers/ii

Re: [PATCH 4/4] iio: ti_am335x_adc: Add continuous sampling and trigger support

2013-08-16 Thread Zubair Lutfullah :
On Fri, Aug 16, 2013 at 03:25:49PM +0200, Sebastian Andrzej Siewior wrote: > * Zubair Lutfullah | 2013-08-13 21:05:03 [+0100]: > > >diff --git a/drivers/iio/adc/ti_am335x_adc.c > >b/drivers/iio/adc/ti_am335x_adc.c > >index 3ceac3e..0d7e313 100644 > >--- a/drivers/ii

Re: [PATCH 4/4] iio: ti_am335x_adc: Add continuous sampling and trigger support

2013-08-16 Thread Zubair Lutfullah :
On Fri, Aug 16, 2013 at 12:46:31PM +0200, Sebastian Andrzej Siewior wrote: > On 08/16/2013 01:33 PM, Jonathan Cameron wrote: > > Ah, fixes-togreg is for this cycle, whereas new stuff like this needs > > to go on the togreg branch. Hence please rebase on the togreg branch > > instead. > > But he n

Re: [PATCH 0/4] iio: input: ti_am335x_adc: Add continuous sampling support round 5

2013-08-16 Thread Zubair Lutfullah :
rsion. Noted. I actually had round 4/5 at the end of the subjects.. Thanks Zubair > > Thanks, > > Jonathan > > On 08/13/13 21:04, Zubair Lutfullah wrote: > > Round 5 updates. Fixed the define order in the header as guided by Lee. > > > > Round 4 updates

Re: [PATCH 4/4] iio: ti_am335x_adc: Add continuous sampling and trigger support

2013-08-16 Thread Zubair Lutfullah :
On Fri, Aug 16, 2013 at 02:53:40PM +0200, Sebastian Andrzej Siewior wrote: > * Zubair Lutfullah | 2013-08-13 21:05:03 [+0100]: > > >diff --git a/drivers/iio/adc/ti_am335x_adc.c > >b/drivers/iio/adc/ti_am335x_adc.c > >index 3ceac3e..0d7e313 100644 > >--- a/drivers/ii

Re: [PATCH 3/4] input: ti_tsc: Enable shared IRQ for TSC and add overrun, underflow checks

2013-08-16 Thread Zubair Lutfullah :
On Fri, Aug 16, 2013 at 11:14:09AM +0200, Sebastian Andrzej Siewior wrote: > * Zubair Lutfullah | 2013-08-13 17:48:18 [+0100]: > >+if ((status & IRQENB_FIFO0OVRRUN) || > >+(status & IRQENB_FIFO0UNDRFLW)) { > >+ > >+co

Re: [PATCH 1/4] input: ti_am335x_tsc: correct step mask update after IRQ

2013-08-16 Thread Zubair Lutfullah :
On Fri, Aug 16, 2013 at 10:53:50AM +0200, Sebastian Andrzej Siewior wrote: > * Zubair Lutfullah | 2013-08-13 17:48:16 [+0100]: > > >@@ -316,7 +318,7 @@ static irqreturn_t titsc_irq(int irq, void *dev) > > > > if (irqclr) { > > titsc_writel

Re: [PATCH 4/4] iio: ti_am335x_adc: Add continuous sampling and trigger support

2013-08-17 Thread Zubair Lutfullah :
On Thu, Aug 15, 2013 at 12:43:02PM +0100, Jonathan Cameron wrote: > Note I'd also like a much more detailed description in the patch header. > > I would also expect an option for the trigger to be supplied from the > chip itself based on fifo watershead interrupts. Thus the adc could be > operate

[PATCH] typo fixes (coordiante -> coordinate) in am335x

2013-07-15 Thread Zubair Lutfullah
Did a grep for coordiante and replaced them all with coordinate. This applies to the mfd-next tree. Signed-off-by: Zubair Lutfullah --- .../bindings/input/touchscreen/ti-tsc-adc.txt |4 ++-- arch/arm/boot/dts/am335x-evm.dts |2 +- drivers/input/touchscreen

[PATCH 20/21] input: ti_am335x_tsc.c fix checkpatch.pl issues

2013-07-17 Thread Zubair Lutfullah
code formatting fixes Signed-off-by: Zubair Lutfullah --- drivers/input/touchscreen/ti_am335x_tsc.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index

[PATCH 05/21] iio: input: am335x_adc: Add continuous mode to adc

2013-07-17 Thread Zubair Lutfullah
Main patch. Adds continuous sampling support for the driver The IRQs are changed in the TSC drivers as they are shared with the ADC IRQ lines. This patch is based on work in the 3.2 tree by TI Original Author is Patil Rachna Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c

[PATCH 21/21] mfd: ti_am335x_tscadc.c fix checkpatch.pl issues

2013-07-17 Thread Zubair Lutfullah
code formatting corrected. Signed-off-by: Zubair Lutfullah --- drivers/mfd/ti_am335x_tscadc.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index e7314e4..b8d7dfb 100644 --- a/drivers/mfd

[PATCH 19/21] iio: ti_amss5x adc Fix check_patch.pl issues

2013-07-17 Thread Zubair Lutfullah
all clear. replaced printk with pr_info.. Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 375 --- 1 file changed, 188 insertions(+), 187 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index

[PATCH 00/21] iio: TI-am335x-adc continuous mode

2013-07-17 Thread Zubair Lutfullah
BLURB HERE *** Zubair Lutfullah (21): MFD: ti_tscadc: disable TSC control IIO: ADC: ti_adc: Fix 1st sample read iio: ti_am335x_adc: Added iio_voltageX_scale input: ti_tsc: Enable shared IRQ for TSC iio: input: am335x_adc: Add continuous mode to adc MFD: ti_tscadc: ADC Clock check not requ

[PATCH 17/21] Revert "IIO: ti_adc: Correct wrong samples received on 1st read in continuous mode"

2013-07-17 Thread Zubair Lutfullah
With a proper fix to this code, this is no longer neccessary. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |8 1 file changed, 8 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index

[PATCH 10/21] IIO: ti_adc: Handle overrun before threshold event

2013-07-17 Thread Zubair Lutfullah
If an overrun occurs, the threshold event is meaningless, handle the overrun event first. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers

[PATCH 13/21] IO: ti_adc: Reset and clear overrun status before capture.

2013-07-17 Thread Zubair Lutfullah
While not pulling out samples, the FIFO will fill up causing an overrun event. Before starting up another continuous sample, clear that event. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 24 +++- 1 file changed, 15

[PATCH 09/21] IIO: ti_adc: Handle set to clear IRQSTATUS register properly

2013-07-17 Thread Zubair Lutfullah
writing it back, the driver is clearing all pending events, not just the one indicated in the bitmask. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/iio

[PATCH 12/21] IIO: ti_adc: Also clear threshold event when clearing overrun event

2013-07-17 Thread Zubair Lutfullah
When an overrun occurs, the FIFO is cleared. If a FIFO threshold event was pending, the data is now gone. Clear the threshold event when handling an overrun (or underflow). Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |3 ++- 1 file changed

[PATCH 16/21] IIO: ti_adc: Fix allocation count of FIFO buffer.

2013-07-17 Thread Zubair Lutfullah
Allocating an extra byte is not necessary here. The driver will check that the allocation is large enough to satisfy the IIO subsystem. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 18/21] IIO: ti_adc: Fix capture operation during resume

2013-07-17 Thread Zubair Lutfullah
The ADC needs to go through a proper initialization sequence after resuming from suspend. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b

[PATCH 14/21] IIO: ti_adc: Properly handle out of memory situation.

2013-07-17 Thread Zubair Lutfullah
, the driver would stop capturing without any indication of error to the IIO subsystem or the user. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/iio/adc

[PATCH 15/21] IIO: ti_adc: Print error and handle short FIFO events

2013-07-17 Thread Zubair Lutfullah
close this just in case additional bugs in hardware or software exist. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c

[PATCH 11/21] iio: ti_adc: Avoid double threshold event

2013-07-17 Thread Zubair Lutfullah
event until the FIFO has actually been emptied, in the workqueue. The unmasking and masking of the interrupt remains unchanged. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a

[PATCH 07/21] iio: TI-am335x-adc: Cleanup

2013-07-17 Thread Zubair Lutfullah
Cleaned up the code a bit. Some formatting. Some error handling paths corrected This patch is based on work in the 3.2 tree by TI Original Author is Patil Rachna Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 33 + 1 file changed, 17

[PATCH 08/21] IIO: ti_adc: Handle set to clear IRQENABLE register properly.

2013-07-17 Thread Zubair Lutfullah
= Interrupt enabled. Write 1 = Enable interrupt. The current read/update/write method is currently not causing any problems, but could cause confusion in the future. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 14 ++ 1 file changed

[PATCH 02/21] IIO: ADC: ti_adc: Fix 1st sample read

2013-07-17 Thread Zubair Lutfullah
Previously we tried to read data form ADC even before ADC sequencer finished sampling. This led to wrong samples. We now wait on ADC status register idle bit to be set. This patch is based on work in the 3.2 tree by TI Original Author is Patil Rachna Signed-off-by: Zubair Lutfullah

[PATCH 04/21] input: ti_tsc: Enable shared IRQ for TSC

2013-07-17 Thread Zubair Lutfullah
work in the 3.2 tree by TI Original Author is Patil Rachna Signed-off-by: Zubair Lutfullah --- drivers/input/touchscreen/ti_am335x_tsc.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen

[PATCH 06/21] MFD: ti_tscadc: ADC Clock check not required

2013-07-17 Thread Zubair Lutfullah
to set the ADC frequency w.r.t the sys clock. Signed-off-by: Patil, Rachna Signed-off-by: Zubair Lutfullah --- drivers/mfd/ti_am335x_tscadc.c |6 +- include/linux/mfd/ti_am335x_tscadc.h |1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/mfd

[PATCH 01/21] MFD: ti_tscadc: disable TSC control

2013-07-17 Thread Zubair Lutfullah
Signed-off-by: Zubair Lutfullah --- drivers/mfd/ti_am335x_tscadc.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index b003a16..d72001c 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b

[PATCH 03/21] iio: ti_am335x_adc: Added iio_voltageX_scale

2013-07-17 Thread Zubair Lutfullah
in_voltageX_scale is supposed to give scaled voltages. This was missing in the driver and has been added. Current patch is fixed to scale for 1.8V AVDD. Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions

[PATCH] mfd: input: arm: dts: doc: ti_am335x: typo fixes (coordiante -> coordinate)

2013-07-26 Thread Zubair Lutfullah
Did a grep for 'coordiante' and replaced them all with 'coordinate' Signed-off-by: Zubair Lutfullah Acked-by: Lee Jones --- .../bindings/input/touchscreen/ti-tsc-adc.txt |4 ++-- arch/arm/boot/dts/am335x-evm.dts |2 +- drivers/input/touchsc

[PATCH] mfd: input: arm: dts: doc: ti_am335x: typo fix (coordiante -> coordinate)

2013-07-26 Thread Zubair Lutfullah
Small typo fix. Received ack from mfd already. Awaiting acks from all the rest. As Lee from mfd stated, we can remove these during staging now. or we'll have to leave typos as is later on. Zubair Lutfullah (1): mfd: input: arm: dts: doc: ti_am335x: typo fixes (coordiante -> co

[PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling and trigger support

2013-07-26 Thread Zubair Lutfullah
IRQs. I fixed channel scanning so multiple ADC channels can be read simultaneously and pushed to userspace. Restructured the driver to fit IIO ABI. And added trigger support. Signed-off-by: Zubair Lutfullah Acked-by: Greg Kroah-Hartman Signed-off-by: Russ Dill --- drivers/iio/adc

[PATCH 0/2] iio: input: ti_am335x_adc: Add continuous sampling and trigger support round 3

2013-07-26 Thread Zubair Lutfullah
running the am335x processor. The patches apply on the iio branch fixes-togreg. Patil, Rachna (1): input: ti_tsc: Enable shared IRQ for TSC Zubair Lutfullah (1): iio: ti_am335x_adc: Add continuous sampling and trigger support drivers/iio/adc/ti_am335x_adc.c | 334

[PATCH 1/2] input: ti_tsc: Enable shared IRQ for TSC

2013-07-26 Thread Zubair Lutfullah
n. Signed-off-by: Patil, Rachna Acked-by: Vaibhav Hiremath Signed-off-by: Zubair Lutfullah Acked-by: Greg Kroah-Hartman --- drivers/input/touchscreen/ti_am335x_tsc.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335

How to use GPIO triggers?

2013-08-01 Thread Zubair Lutfullah :
ect a gpio to trigger the driver. Is it some additional support to add to the driver? Or am I missing something very obvious.. Can someone spare a few minutes and point me in the right direction? Thank-you Zubair Lutfullah -- To unsubscribe from this list: send the line "unsubscribe linux

Re: [PATCH 2/2] iio: ti_am335x_adc: Add continuous sampling and trigger support

2013-08-04 Thread Zubair Lutfullah :
7;m still not sure on how to connect the gpio trigger driver by IIO. generic_buffer.c reads the samples with a simple sysfs trigger. So. Additional description in the git log only? I'll add following in log message. "Any IIO trigger can be used to trigger driver to read a buffer of s

Re: [PATCH 1/2] input: ti_tsc: Enable shared IRQ for TSC

2013-08-05 Thread Zubair Lutfullah :
they can be seen as signaled together. FIFO 1 used only by ADC and FIFO1THRES handler is inside the iio/adc driver FIFO 0 used only by TSC and FIFO0THRES handler is inside the input/touchscreen Note: These are level interrupts. I would like some input on how to handle such a situation. Thanks Zu

Re: [PATCH 4/4] iio: ti_am335x_adc: Add continuous sampling and trigger support

2013-08-20 Thread Zubair Lutfullah :
On Mon, Aug 19, 2013 at 07:12:38PM +0200, Sebastian Andrzej Siewior wrote: > * Zubair Lutfullah | 2013-08-13 21:05:03 [+0100]: > > >diff --git a/drivers/iio/adc/ti_am335x_adc.c > >b/drivers/iio/adc/ti_am335x_adc.c > >index 3ceac3e..0d7e313 100644 > >--- a/drivers/ii

[PATCH] mfd: ti_am335x_tscadc: fix spin lock and reg_cache

2013-08-05 Thread Zubair Lutfullah
mess. Patch fixes it by correcting the locks and updates the variable by reading the step enable register Signed-off-by: Zubair Lutfullah --- drivers/mfd/ti_am335x_tscadc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/ti_am335x_tscadc.c b/driver

Re: [PATCH 1/2] input: ti_tsc: Enable shared IRQ for TSC

2013-08-05 Thread Zubair Lutfullah :
quire a separate patch series. Is it possible to accept the current patches to add continuous mode to the ADC side as is before the next merge window? This issue doesn't disturb each side individually.. I'll look into fixing the IRQs after settling continuous mode. Thanks Zubair Lutfulla

[PATCH 15/15] iio: ti_am335x_adc: Properly handle out of memory situation.

2013-07-18 Thread Zubair Lutfullah
. Before this patch, the driver would stop capturing without any indication of error to the IIO subsystem or the user. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iio

[PATCH 13/15] iio: ti_am335x_adc: Fix capture operation during resume

2013-07-18 Thread Zubair Lutfullah
From: Russ Dill The ADC needs to go through a proper initialization sequence after resuming from suspend. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc

[PATCH 14/15] iio: ti_am335x_adc: Reset and clear overrun status before capture

2013-07-18 Thread Zubair Lutfullah
From: Russ Dill While not pulling out samples, the FIFO will fill up causing an overrun event. Before starting up another continuous sample, clear that event. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 21 +++-- 1 file

[PATCH 12/15] iio: ti_am335x_adc: Fix allocation count of FIFO buffer.

2013-07-18 Thread Zubair Lutfullah
From: Russ Dill Allocating an extra byte is not necessary here. The driver will check that the allocation is large enough to satisfy the IIO subsystem. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |2 +- 1 file changed, 1 insertion(+), 1

[PATCH 09/15] iio: ti_am335x_adc: Avoid double threshold event

2013-07-18 Thread Zubair Lutfullah
the event until the FIFO has actually been emptied, in the workqueue. The unmasking and masking of the interrupt remains unchanged. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 07/15] iio: ti_am335x_adc: Handle set to clear IRQSTATUS

2013-07-18 Thread Zubair Lutfullah
the status and writing it back, the driver is clearing all pending events, not just the one indicated in the bitmask. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a

[PATCH 02/15] iio: ti_am335x_adc: Fix wrong samples received on 1st read

2013-07-18 Thread Zubair Lutfullah
From: "Patil, Rachna" Previously we tried to read data form ADC even before ADC sequencer finished sampling. This led to wrong samples. We now wait on ADC status register idle bit to be set. Signed-off-by: Patil, Rachna Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am

[PATCH 10/15] iio: ti_am335x_adc: Also clear threshold event when clearing overrun event

2013-07-18 Thread Zubair Lutfullah
From: Russ Dill When an overrun occurs, the FIFO is cleared. If a FIFO threshold event was pending, the data is now gone. Clear the threshold event when handling an overrun (or underflow). Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |4

[PATCH 11/15] iio: ti_am335x_adc: Print error and handle short FIFO events

2013-07-18 Thread Zubair Lutfullah
a good idea to close this just in case additional bugs in hardware or software exist. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc

[PATCH 06/15] iio: ti_am335x_adc: Handle set to clear IRQENABLE

2013-07-18 Thread Zubair Lutfullah
). Read 1 = Interrupt enabled. Write 1 = Enable interrupt. The current read/update/write method is currently not causing any problems, but could cause confusion in the future. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 14 ++ 1

[PATCH 08/15] iio: ti_am335x_adc: Handle overrun before threshold event

2013-07-18 Thread Zubair Lutfullah
From: Russ Dill If an overrun occurs, the threshold event is meaningless, handle the overrun event first. Signed-off-by: Russ Dill Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff

[PATCH 05/15] MFD: ti_tscadc: ADC Clock check not required

2013-07-18 Thread Zubair Lutfullah
t uses the internal ADC clock divider to set the ADC frequency w.r.t the sys clock. Signed-off-by: Patil, Rachna Signed-off-by: Zubair Lutfullah --- drivers/mfd/ti_am335x_tscadc.c |6 +- include/linux/mfd/ti_am335x_tscadc.h |1 - 2 files changed, 1 insertion(+), 6 deletions(-) di

[PATCH 04/15] iio: mfd: input: ti_am335x_adc:Add support for continuous mode

2013-07-18 Thread Zubair Lutfullah
il, Rachna Signed-off-by: Zubair Lutfullah --- drivers/iio/adc/ti_am335x_adc.c | 350 + drivers/input/touchscreen/ti_am335x_tsc.c |9 +- drivers/mfd/ti_am335x_tscadc.c| 12 +- include/linux/mfd/ti_am335x_tscadc.h | 10 + 4 files ch

[PATCH 03/15] input: ti_tsc: Enable shared IRQ for TSC

2013-07-18 Thread Zubair Lutfullah
n. Signed-off-by: Patil, Rachna Acked-by: Vaibhav Hiremath Signed-off-by: Zubair Lutfullah --- drivers/input/touchscreen/ti_am335x_tsc.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/t

[PATCH 00/15] iio: ti_am335x_adc: Add continuous mode take 2

2013-07-18 Thread Zubair Lutfullah
Patches now give correct authorship. and checkpatch.pl issues are checked for each patch. I hope the actual code bashing can begin now. A series of patches that add continuous sampling support for the adc drivers for the am335x. These apply on top of mfd-next after the recent set of patches on

[PATCH 01/15] MFD: ti_tscadc: disable TSC config registers in adc mode

2013-07-18 Thread Zubair Lutfullah
From: "Patil, Rachna" AFE Pen Ctrl and TouchScreen transistors enabling is not required when only ADC mode is being used, so check for availability of TSC driver before accessing control register. Signed-off-by: Patil, Rachna Acked-by: Vaibhav Hiremath Signed-off-by: Zubair

Re: [PATCH 01/15] MFD: ti_tscadc: disable TSC config registers in adc mode

2013-07-19 Thread Zubair Lutfullah :
On Thu, Jul 18, 2013 at 03:45:55PM -0700, Greg KH wrote: > Did Rachna really sign off on this, and the other, patches? Or did they Authored and signed off on it in their TI tree. based on 3.2. I brought them forward to 3.11. I guess I'll remove their sign-offs. Can the code be reviewed as is or

Re: [PATCH 00/15] iio: ti_am335x_adc: Add continuous mode take 2

2013-07-20 Thread Zubair Lutfullah :
ory and all but I would much rather have something > that is easy to review, with appropriate comments or if people will give > them, sign offs to reflect the various contributions. > > Jonathan And then one patch for continuous mode with appropriate comments/sign-offs. Thank-you Zubair

[PATCH 0/4] mfd: iio: ti_am335x_tscadc: fixes adc sampling, TSC config and a typo

2013-07-20 Thread Zubair Lutfullah
n all relevant lists too. No response.. Patil, Rachna (3): iio: ti_am335x_adc: Fix wrong samples received on 1st read MFD: ti_tscadc: disable TSC config registers in adc mode MFD: ti_tscadc: ADC Clock check not required Zubair Lutfullah (1): mfd: input: arm: dts: doc: ti_am335x: typo

  1   2   3   4   5   >