From: Lee Jones <lee.jones@linaro.org>
To: Vignesh R <vigneshr@ti.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Jonathan Cameron <jic23@kernel.org>,
Randy Dunlap <rdunlap@infradead.org>,
Samuel Ortiz <sameo@linux.intel.com>, Felipe Balbi <balbi@ti.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: adc: ti_am335x_adc: make sample delay, open delay, averaging DT parameters
Date: Wed, 27 Aug 2014 14:56:35 +0100 [thread overview]
Message-ID: <20140827135635.GH6364@lee--X1> (raw)
In-Reply-To: <1409141990-29627-2-git-send-email-vigneshr@ti.com>
On Wed, 27 Aug 2014, Vignesh R wrote:
> Number of averaging, open delay, sample delay are made DT parameters.
> By decreasing averaging and delays more samples can be obtained per
> second increasing performance of ADC. Previously the number of
> averages per step was fixed to 16. Making these parameters
> configurable will help in balancing speed vs accuracy.
> For each ADC step provide DT based paramters to set open delay,
> sample delay and number of averaging. One configurable step is
> used per ADC channel. Since there can be atmost 8 ADC channels,
> steps 16 to 8 are used for ADC.
>
> Signed-off-by: Vignesh R <vigneshr@ti.com>
> ---
> .../bindings/input/touchscreen/ti-tsc-adc.txt | 18 +++++++
> drivers/iio/adc/ti_am335x_adc.c | 49 +++++++++++++++++---
> include/linux/mfd/ti_am335x_tscadc.h | 3 ++
> 3 files changed, 63 insertions(+), 7 deletions(-)
[...]
> diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
> index fb96c84..26d3e84 100644
> --- a/include/linux/mfd/ti_am335x_tscadc.h
> +++ b/include/linux/mfd/ti_am335x_tscadc.h
> @@ -82,14 +82,17 @@
There are so many different formats at play here, it's difficult to
see what's happening where!
> #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4)
> #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8)
> #define STEPCONFIG_FIFO1 BIT(26)
> +#define STEPCONFIG_AVG_MAX 16
>
> /* Delay register */
> #define STEPDELAY_OPEN_MASK (0x3FFFF << 0)
> #define STEPDELAY_OPEN(val) ((val) << 0)
What's the point in shifting by zero?
> #define STEPCONFIG_OPENDLY STEPDELAY_OPEN(0x098)
> +#define STEPDELAY_OPEN_MAX 0x3FFFF
Put this up the top, then you can use it when defining
STEPDELAY_OPEN_MASK.
> #define STEPDELAY_SAMPLE_MASK (0xFF << 24)
> #define STEPDELAY_SAMPLE(val) ((val) << 24)
> #define STEPCONFIG_SAMPLEDLY STEPDELAY_SAMPLE(0)
> +#define STEPDELAY_SAMPLE_MAX 0xFF
> /* Charge Config */
> #define STEPCHARGE_RFP_MASK (7 << 12)
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Vignesh R <vigneshr-l0cyMroinI0@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
Sebastian Andrzej Siewior
<bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] iio: adc: ti_am335x_adc: make sample delay, open delay, averaging DT parameters
Date: Wed, 27 Aug 2014 14:56:35 +0100 [thread overview]
Message-ID: <20140827135635.GH6364@lee--X1> (raw)
In-Reply-To: <1409141990-29627-2-git-send-email-vigneshr-l0cyMroinI0@public.gmane.org>
On Wed, 27 Aug 2014, Vignesh R wrote:
> Number of averaging, open delay, sample delay are made DT parameters.
> By decreasing averaging and delays more samples can be obtained per
> second increasing performance of ADC. Previously the number of
> averages per step was fixed to 16. Making these parameters
> configurable will help in balancing speed vs accuracy.
> For each ADC step provide DT based paramters to set open delay,
> sample delay and number of averaging. One configurable step is
> used per ADC channel. Since there can be atmost 8 ADC channels,
> steps 16 to 8 are used for ADC.
>
> Signed-off-by: Vignesh R <vigneshr-l0cyMroinI0@public.gmane.org>
> ---
> .../bindings/input/touchscreen/ti-tsc-adc.txt | 18 +++++++
> drivers/iio/adc/ti_am335x_adc.c | 49 +++++++++++++++++---
> include/linux/mfd/ti_am335x_tscadc.h | 3 ++
> 3 files changed, 63 insertions(+), 7 deletions(-)
[...]
> diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
> index fb96c84..26d3e84 100644
> --- a/include/linux/mfd/ti_am335x_tscadc.h
> +++ b/include/linux/mfd/ti_am335x_tscadc.h
> @@ -82,14 +82,17 @@
There are so many different formats at play here, it's difficult to
see what's happening where!
> #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4)
> #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8)
> #define STEPCONFIG_FIFO1 BIT(26)
> +#define STEPCONFIG_AVG_MAX 16
>
> /* Delay register */
> #define STEPDELAY_OPEN_MASK (0x3FFFF << 0)
> #define STEPDELAY_OPEN(val) ((val) << 0)
What's the point in shifting by zero?
> #define STEPCONFIG_OPENDLY STEPDELAY_OPEN(0x098)
> +#define STEPDELAY_OPEN_MAX 0x3FFFF
Put this up the top, then you can use it when defining
STEPDELAY_OPEN_MASK.
> #define STEPDELAY_SAMPLE_MASK (0xFF << 24)
> #define STEPDELAY_SAMPLE(val) ((val) << 24)
> #define STEPCONFIG_SAMPLEDLY STEPDELAY_SAMPLE(0)
> +#define STEPDELAY_SAMPLE_MAX 0xFF
> /* Charge Config */
> #define STEPCHARGE_RFP_MASK (7 << 12)
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2014-08-27 13:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 12:19 [PATCH 1/2] iio: adc: ti_am335x_adc: refactor DT parsing into a function Vignesh R
2014-08-27 12:19 ` Vignesh R
2014-08-27 12:19 ` [PATCH 2/2] iio: adc: ti_am335x_adc: make sample delay, open delay, averaging DT parameters Vignesh R
2014-08-27 12:19 ` Vignesh R
2014-08-27 13:56 ` Lee Jones [this message]
2014-08-27 13:56 ` Lee Jones
2014-08-28 5:12 ` Vignesh R
2014-08-28 5:12 ` Vignesh R
2014-08-28 7:11 ` Lee Jones
2014-08-30 9:34 ` Jonathan Cameron
2014-08-30 9:34 ` Jonathan Cameron
2014-08-30 9:43 ` Jonathan Cameron
2014-09-01 6:40 ` Vignesh R
2014-09-01 6:40 ` Vignesh R
2014-08-30 9:44 ` [PATCH 1/2] iio: adc: ti_am335x_adc: refactor DT parsing into a function Jonathan Cameron
-- strict thread matches above, loose matches on Subject: below --
2015-03-31 11:12 [PATCH 0/2] iio: ti_am335x_adc: Add optional DT properties for tscadc Vignesh R
2015-03-31 11:12 ` [PATCH 2/2] iio: adc: ti_am335x_adc: make sample delay, open delay, averaging DT parameters Vignesh R
2015-03-31 11:12 ` Vignesh R
2015-04-09 14:19 ` Jonathan Cameron
2015-04-09 14:19 ` Jonathan Cameron
2015-05-13 7:42 ` Vignesh R
2015-05-13 17:38 ` Jonathan Cameron
2015-05-13 17:38 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140827135635.GH6364@lee--X1 \
--to=lee.jones@linaro.org \
--cc=balbi@ti.com \
--cc=bigeasy@linutronix.de \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jic23@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.org \
--cc=sameo@linux.intel.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.