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

2013-08-04 Thread Zubair Lutfullah :
. 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 samples from enabled channels. Responses on comments on actual code is inline below. Thanks Zubair Lutfullah +++ b/drivers/iio/adc/ti_am335x_adc.c

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

2013-08-05 Thread Zubair Lutfullah :
. Thanks Zubair Lutfullah -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

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

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

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

2013-08-05 Thread Zubair Lutfullah :
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 Lutfullah -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

[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 zubair.lutful...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org --- .../bindings/input/touchscreen/ti-tsc-adc.txt |4 ++-- arch/arm/boot/dts/am335x-evm.dts |2

[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 - coordinate

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

2013-07-26 Thread Zubair Lutfullah
and 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 zubair.lutful...@gmail.com Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org Signed

[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
for touchscreen. Signed-off-by: Patil, Rachna rac...@ti.com Acked-by: Vaibhav Hiremath hvaib...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/input/touchscreen/ti_am335x_tsc.c | 18 ++ 1 file changed, 14

[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
is written with the required mask every time. Rachna Patil (TI) laid ground work for shared IRQ. Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/input/touchscreen/ti_am335x_tsc.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers

[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 zubair.lutful...@gmail.com Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org Signed-off-by: Russ Dill russ.d...@ti.com --- drivers/iio

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/iio/adc/ti_am335x_adc.c +++ b/drivers/iio

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/iio/adc/ti_am335x_adc.c +++ b/drivers/iio

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 bige...@linutronix.de --- Please merge

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 tiadc_irq(int irq, void

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 100644 --- a/drivers/input/touchscreen

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/iio/adc/ti_am335x_adc.c +++ b/drivers/iio

[PATCH] mfd: ti_am335x_tscadc: Update reg_cache variable in clr function

2013-08-13 Thread Zubair Lutfullah
The reg_cache variable should be updated with current steps in the reg_se register. Then the mask should apply and clear the register. Previously, the reg_cache can be an old redundant value that isn't updated. Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/mfd

[PATCH] mfd: ti_am335x_tscadc: fix reg_cache in clr function

2013-08-13 Thread Zubair Lutfullah
Fixed reg_cache in the set function. But missed the clr function in the previous patch. This updates the clr function as well. This applies after the previous fix I sent that Lee has accepted. mfd-next hasn't been updated yet. Zubair Lutfullah (1): mfd: ti_am335x_tscadc: Update reg_cache

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

2013-08-13 Thread Zubair Lutfullah
(TI) fixed bugs in the driver relevant to FIFOs and 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 zubair.lutful...@gmail.com Acked

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

2013-08-13 Thread Zubair Lutfullah
patch. Thanks Zubair Lutfullah Zubair Lutfullah (4): input: ti_am335x_tsc: correct step mask update after IRQ input: ti_am335x_tsc: Increase sequencer delay time input: ti_tsc: Enable shared IRQ for TSC and add overrun, underflow checks iio: ti_am335x_adc: Add continuous sampling

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

2013-08-13 Thread Zubair Lutfullah
TSC steps should be enabled again after IRQ routine. This fix ensures they are updated correctly every time. Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/input/touchscreen/ti_am335x_tsc.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 2/4] input: ti_am335x_tsc: Increase sequencer delay time

2013-08-13 Thread Zubair Lutfullah
Before checking PEN UP event, IRQ delays for this amount of time to let FSM stabilize. Previously, with only the TSC driver in IRQ mode, this delay was sufficient. The delay is increased slightly to accomodate if the ADC is also being used simultaneously in continuous mode. Signed-off-by: Zubair

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

2013-08-13 Thread Zubair Lutfullah
-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/input/touchscreen/ti_am335x_tsc.c | 37 + include/linux/mfd/ti_am335x_tscadc.h |2 ++ 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b

Re: [PATCH] mfd: ti_am335x_tscadc: fix reg_cache in clr function

2013-08-13 Thread Zubair Lutfullah :
On Tue, Aug 13, 2013 at 06:16:44PM +0100, Lee Jones wrote: I assume this is a 0/1 patch. Didn't realize send-mail doesn't like 0/1. Noted. Thanks ZubairLK -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

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

2013-08-13 Thread Zubair Lutfullah
(TI) fixed bugs in the driver relevant to FIFOs and 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 zubair.lutful...@gmail.com Acked

[PATCH 2/4] input: ti_am335x_tsc: Increase sequencer delay time

2013-08-13 Thread Zubair Lutfullah
Before checking PEN UP event, IRQ delays for this amount of time to let FSM stabilize. Previously, with only the TSC driver in IRQ mode, this delay was sufficient. The delay is increased slightly to accomodate if the ADC is also being used simultaneously in continuous mode. Signed-off-by: Zubair

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

2013-08-13 Thread Zubair Lutfullah
-off-by: Zubair Lutfullah zubair.lutful...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org --- drivers/input/touchscreen/ti_am335x_tsc.c | 37 + include/linux/mfd/ti_am335x_tscadc.h |2 ++ 2 files changed, 34 insertions(+), 5 deletions(-) diff --git

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

2013-08-13 Thread Zubair Lutfullah
that, found a few bugs in continuous mode here and there. And squashed them into the same patch. Thanks Zubair Lutfullah Zubair Lutfullah (4): input: ti_am335x_tsc: correct step mask update after IRQ input: ti_am335x_tsc: Increase sequencer delay time input: ti_am335x_tsc: Enable shared IRQ

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

2013-08-13 Thread Zubair Lutfullah
TSC steps should be enabled again after IRQ routine. This fix ensures they are updated correctly every time. Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/input/touchscreen/ti_am335x_tsc.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

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/iio/adc/ti_am335x_adc.c +++ b/drivers/iio

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/iio/adc/ti_am335x_adc.c +++ b/drivers/iio

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 needs

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

2013-08-16 Thread Zubair Lutfullah :
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 below. Note: These apply to the fixes-togreg branch in IIO because

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/iio/adc/ti_am335x_adc.c +++ b/drivers/iio

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)) { + +config = titsc_readl(ts_dev, REG_CTRL

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(ts_dev, REG_IRQSTATUS, irqclr

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 operated at

[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 zubair.lutful...@gmail.com --- .../bindings/input/touchscreen/ti-tsc-adc.txt |4 ++-- arch/arm/boot/dts/am335x-evm.dts |2

[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 zubair.lutful...@gmail.com --- 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

[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 zubair.lutful...@gmail.com

[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 zubair.lutful...@gmail.com --- 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

[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 zubair.lutful...@gmail.com --- 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

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

2013-07-17 Thread Zubair Lutfullah
*** 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 required iio

[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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c |8 1 file changed, 8 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b

[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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c | 29 ++--- 1 file changed, 14 insertions

[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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c | 24

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

2013-07-17 Thread Zubair Lutfullah
and writing it back, the driver is clearing all pending events, not just the one indicated in the bitmask. Signed-off-by: Russ Dill russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c | 13 + 1 file changed, 5 insertions(+), 8

[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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc

[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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c |2 +- 1 file

[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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions

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

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

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

2013-07-17 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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c |5 +++-- 1 file changed, 3

[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 zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c | 33

[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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc

[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
on work in the 3.2 tree by TI Original Author is Patil Rachna Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- 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

[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 rac...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/mfd/ti_am335x_tscadc.c |6 +- include/linux/mfd/ti_am335x_tscadc.h |1 - 2 files changed, 1 insertion(+), 6 deletions

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

2013-07-17 Thread Zubair Lutfullah
Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- 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

[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 zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c | 17 +++-- 1 file changed, 15

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

2013-07-18 Thread Zubair Lutfullah
an underrun. 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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c |6 -- 1 file changed, 4

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

2013-07-18 Thread Zubair Lutfullah
From: Russ Dill russ.d...@ti.com The ADC needs to go through a proper initialization sequence after resuming from suspend. Signed-off-by: Russ Dill russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c |5 - 1 file changed, 4

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

2013-07-18 Thread Zubair Lutfullah
From: Russ Dill russ.d...@ti.com 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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio

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

2013-07-18 Thread Zubair Lutfullah
From: Russ Dill russ.d...@ti.com 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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc

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

2013-07-18 Thread Zubair Lutfullah
. The waits to clear 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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c |8

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

2013-07-18 Thread Zubair Lutfullah
) event. By reading 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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c | 11 --- 1 file

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

2013-07-18 Thread Zubair Lutfullah
From: Patil, Rachna rac...@ti.com 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 rac...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful

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

2013-07-18 Thread Zubair Lutfullah
From: Russ Dill russ.d...@ti.com 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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful

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

2013-07-18 Thread Zubair Lutfullah
. However, it is still a good idea to close this just in case additional bugs in hardware or software exist. Signed-off-by: Russ Dill russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c |7 +++ 1 file changed, 7 insertions(+) diff --git

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

2013-07-18 Thread Zubair Lutfullah
disabled (masked). 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 russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com

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

2013-07-18 Thread Zubair Lutfullah
From: Russ Dill russ.d...@ti.com If an overrun occurs, the threshold event is meaningless, handle the overrun event first. Signed-off-by: Russ Dill russ.d...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c | 24 ++-- 1

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

2013-07-18 Thread Zubair Lutfullah
the internal ADC clock divider to set the ADC frequency w.r.t the sys clock. Signed-off-by: Patil, Rachna rac...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/mfd/ti_am335x_tscadc.c |6 +- include/linux/mfd/ti_am335x_tscadc.h |1 - 2 files changed

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

2013-07-18 Thread Zubair Lutfullah
, Rachna rac...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- 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

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

2013-07-18 Thread Zubair Lutfullah
for touchscreen. Signed-off-by: Patil, Rachna rac...@ti.com Acked-by: Vaibhav Hiremath hvaib...@ti.com Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- drivers/input/touchscreen/ti_am335x_tsc.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/input

[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
Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com --- 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

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. I

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 FIFO0 IRQs are for TSC and handled

How to use GPIO triggers?

2013-08-01 Thread Zubair Lutfullah :
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-kernel in the body

[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
is written with the required mask every time. Rachna Patil (TI) laid ground work for shared IRQ. Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com --- drivers/input/touchscreen/ti_am335x_tsc.c | 12 +--- 1 file changed, 9 insertions

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

2013-09-17 Thread Zubair Lutfullah
mode. Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org Signed-off-by: Russ Dill russ.d...@ti.com Acked-by: Lee Jones lee.jo...@linaro.org Acked-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/iio/adc/ti_am335x_adc.c

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

2013-09-18 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, + pollfunc_th

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

2013-09-18 Thread Zubair Lutfullah
mode. Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org Signed-off-by: Russ Dill russ.d...@ti.com Acked-by: Lee Jones lee.jo...@linaro.org Acked-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/iio/adc/ti_am335x_adc.c

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

2013-09-18 Thread Zubair Lutfullah
is written with the required mask every time. Rachna Patil (TI) laid ground work for shared IRQ. Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com --- drivers/input/touchscreen/ti_am335x_tsc.c | 12 +--- 1 file changed, 9 insertions

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 : zubair.lutful...@gmail.com 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 Lutfullah wrote: + +ret

[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 properly

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 there. Couple of suggestions in-line

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; + u32 *data; u16 *data;

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

2013-09-19 Thread Zubair Lutfullah
is written with the required mask every time. Rachna Patil (TI) laid ground work for shared IRQ. Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com --- drivers/input/touchscreen/ti_am335x_tsc.c | 12 +--- 1 file changed, 9 insertions

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

2013-09-19 Thread Zubair Lutfullah
mode. Signed-off-by: Zubair Lutfullah zubair.lutful...@gmail.com Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org Signed-off-by: Russ Dill russ.d...@ti.com Acked-by: Lee Jones lee.jo...@linaro.org Acked-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/iio/adc/ti_am335x_adc.c

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

2013-09-19 Thread Zubair Lutfullah
these 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-19 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 zubair.lutful...@gmail.com --- drivers/iio/adc/ti_am335x_adc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc

Re: [PATCH] mfd: ti_am335x_tscadc: avoid possible deadlock of reg_lock

2013-10-25 Thread Zubair Lutfullah :
should be used in order to avaoid a deadlock. Cc: Zubair Lutfullah zubair.lutful...@gmail.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/mfd/ti_am335x_tscadc.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) Good catch. Applied, thanks

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

2013-10-25 Thread Zubair Lutfullah :
On Tue, Oct 22, 2013 at 06:28:13PM +0200, Sebastian Andrzej Siewior wrote: On 10/22/2013 05:48 PM, Lee Jones wrote: On Tue, 22 Oct 2013, Sebastian Andrzej Siewior wrote: On 08/07/2013 10:40 AM, Lee Jones wrote: On Mon, 05 Aug 2013, Zubair Lutfullah wrote: Reg_cache variable is used

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
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: Add continuous sampling support drivers/iio

  1   2   3   4   5   6   7   8   9   10   >