[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <12725C92-9BB8-4F77-A7B4-F3C3DA9F8B0B@gmail.com>
Date: Mon, 24 Oct 2016 23:01:56 -0700
From: John Syne <john3909@...il.com>
To: Mugunthan V N <mugunthanvnm@...com>
Cc: Lee Jones <lee.jones@...aro.org>, linux-iio@...r.kernel.org,
Tony Lindgren <tony@...mide.com>,
Jonathan Cameron <jic23@...nel.org>,
Vignesh R <vigneshr@...com>, linux-omap@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Sekhar Nori <nsekhar@...com>,
Peter Ujfalusi <peter.ujfalusi@...com>
Subject: Re: [PATCH] drivers: mfd: ti_am335x_tscadc: increase ADC ref clock to 24MHz
> On Oct 24, 2016, at 10:52 PM, Mugunthan V N <mugunthanvnm@...com> wrote:
>
> On Tuesday 25 October 2016 02:28 AM, John Syne wrote:
>>>> On Oct 23, 2016, at 11:02 PM, Mugunthan V N <mugunthanvnm@...com> wrote:
>>>>
>>>> Increase ADC reference clock from 3MHz to 24MHz so that the
>>>> sampling rates goes up from 100K samples per second to 800K
>>>> samples per second on AM335x and AM437x SoC.
>>>>
>>>> Also increase opendelay for touchscreen configuration to
>>>> equalize the increase in ADC reference clock frequency,
>>>> which results in the same amount touch events reported via
>>>> evtest on AM335x GP EVM.
>>>>
>>>> Signed-off-by: Mugunthan V N <mugunthanvnm@...com>
>>>> ---
>>>>
>>>> This patch depends on ADC DMA patch series [1]
>>>>
>>>> Without DMA support, when ADC ref clock is set at 24MHz, I am
>>>> seeing fifo overflow as CPU is not able to pull the ADC samples.
>>>> This answers that DMA support is must for ADC to consume the
>>>> samples generated at 24MHz with no open, step delay or
>>>> averaging with patch [2].
>>>>
>>>> Measured the performance with the iio_generic_buffer with the
>>>> patch [3] applied
>>>>
>>>> [1] - http://www.spinics.net/lists/devicetree/msg145045.html
>>>> [2] - http://pastebin.ubuntu.com/23357935/
>>>> [3] - http://pastebin.ubuntu.com/23357939/
>>>>
>>>> ---
>>>> include/linux/mfd/ti_am335x_tscadc.h | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
>>>> index b9a53e0..96c4207 100644
>>>> --- a/include/linux/mfd/ti_am335x_tscadc.h
>>>> +++ b/include/linux/mfd/ti_am335x_tscadc.h
>>>> @@ -90,7 +90,7 @@
>>>> /* Delay register */
>>>> #define STEPDELAY_OPEN_MASK (0x3FFFF << 0)
>>>> #define STEPDELAY_OPEN(val) ((val) << 0)
>>>> -#define STEPCONFIG_OPENDLY STEPDELAY_OPEN(0x098)
>> Wouldn’t this be better to add this to the devicetree?
>>
>> ti,chan-step-avg = <0x16 0x16 0x16 0x16 0x16 0x16 0x16>;
>> ti,chan-step-opendelay = <0x500 0x500 0x500 0x500 0x500 0x500 0x500>;
>> ti,chan-step-sampledelay = <0x0 0x0 0x0 0x0 0x0 0x0 0x0>;
>
> For a touch screen, there is not need to change in these parameter
> settings, so my opinion is to keep it as is. Or am I missing something?
I was thinking that if you are using this driver as an ADC, you may want the flexibility to make these changes in the DT. I’m doing this by connecting sensors to the ADC inputs. I’m not using this driver for a touchscreen.
Regards,
John
>
> Regards
> Mugunthan V N
Powered by blists - more mailing lists