stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "iio: adc: ti-ads1015: add 10% to conversion wait time" has been added to the 4.14-stable tree
@ 2017-12-06 17:25 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-12-06 17:25 UTC (permalink / raw)
  To: ladis, Jonathan.Cameron, akinobu.mita, alexander.levin,
	daniel.baluta, gregkh, jic23
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    iio: adc: ti-ads1015: add 10% to conversion wait time

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iio-adc-ti-ads1015-add-10-to-conversion-wait-time.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Wed Dec  6 18:04:41 CET 2017
From: Ladislav Michl <ladis@linux-mips.org>
Date: Fri, 25 Aug 2017 07:39:16 +0200
Subject: iio: adc: ti-ads1015: add 10% to conversion wait time

From: Ladislav Michl <ladis@linux-mips.org>


[ Upstream commit fe895ac88b9fbdf2026f0bfd56c82747bb9d7c48 ]

As user's guide "ADS1015EVM, ADS1115EVM, ADS1015EVM-PDK, ADS1115EVM-PDK
User Guide (Rev. B)" (http://www.ti.com/lit/ug/sbau157b/sbau157b.pdf)
states at page 16:
"Note that both the ADS1115 and ADS1015 have internal clocks with a ±10%
accuracy. If performing FFT tests, frequencies may appear to be incorrect
as a result of this tolerance range.", add those 10% to converion wait
time.

Cc: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/iio/adc/ti-ads1015.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/iio/adc/ti-ads1015.c
+++ b/drivers/iio/adc/ti-ads1015.c
@@ -369,6 +369,7 @@ int ads1015_get_adc_result(struct ads101
 
 		conv_time = DIV_ROUND_UP(USEC_PER_SEC, data->data_rate[dr_old]);
 		conv_time += DIV_ROUND_UP(USEC_PER_SEC, data->data_rate[dr]);
+		conv_time += conv_time / 10; /* 10% internal clock inaccuracy */
 		usleep_range(conv_time, conv_time + 1);
 		data->conv_invalid = false;
 	}


Patches currently in stable-queue which might be from ladis@linux-mips.org are

queue-4.14/iio-adc-ti-ads1015-add-10-to-conversion-wait-time.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-06 17:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-06 17:25 Patch "iio: adc: ti-ads1015: add 10% to conversion wait time" has been added to the 4.14-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).