From: Jonathan Cameron <jic23@kernel.org>
To: Angelo Compagnucci <angelo.compagnucci@gmail.com>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio:adc:mcp3422 Fix incorrect scales table
Date: Wed, 04 Feb 2015 16:31:30 +0000 [thread overview]
Message-ID: <54D24962.10402@kernel.org> (raw)
In-Reply-To: <1423059266-18143-1-git-send-email-angelo.compagnucci@gmail.com>
On 04/02/15 14:14, Angelo Compagnucci wrote:
> This patch fixes uncorrect order of mcp3422_scales table, the values
> was erroneously transposed.
> It removes also an unused array and a wrong comment.
>
> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Applied to the fixes-togreg branch of iio.git. Given timing this will
got to Greg after the merge windows closes.
I'm travelling without my ssh key so this won't hit git.kernel.org until
at least Sunday.
(Mind you Manchester airport's wifi isn't working in the bar, so who knows
when the email will go out!)
> ---
> drivers/iio/adc/mcp3422.c | 17 ++++-------------
> 1 file changed, 4 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/iio/adc/mcp3422.c b/drivers/iio/adc/mcp3422.c
> index 5167225..b96c636 100644
> --- a/drivers/iio/adc/mcp3422.c
> +++ b/drivers/iio/adc/mcp3422.c
> @@ -58,20 +58,11 @@
> .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SAMP_FREQ), \
> }
>
> -/* LSB is in nV to eliminate floating point */
> -static const u32 rates_to_lsb[] = {1000000, 250000, 62500, 15625};
> -
> -/*
> - * scales calculated as:
> - * rates_to_lsb[sample_rate] / (1 << pga);
> - * pga is 1 for 0, 2
> - */
> -
> static const int mcp3422_scales[4][4] = {
> - { 1000000, 250000, 62500, 15625 },
> - { 500000 , 125000, 31250, 7812 },
> - { 250000 , 62500 , 15625, 3906 },
> - { 125000 , 31250 , 7812 , 1953 } };
> + { 1000000, 500000, 250000, 125000 },
> + { 250000 , 125000, 62500 , 31250 },
> + { 62500 , 31250 , 15625 , 7812 },
> + { 15625 , 7812 , 3906 , 1953 } };
>
> /* Constant msleep times for data acquisitions */
> static const int mcp3422_read_times[4] = {
>
prev parent reply other threads:[~2015-02-04 18:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 14:14 [PATCH] iio:adc:mcp3422 Fix incorrect scales table Angelo Compagnucci
2015-02-04 16:31 ` Jonathan Cameron [this message]
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=54D24962.10402@kernel.org \
--to=jic23@kernel.org \
--cc=angelo.compagnucci@gmail.com \
--cc=linux-iio@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox