From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751764AbdJOK2x (ORCPT ); Sun, 15 Oct 2017 06:28:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:59058 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750722AbdJOK2w (ORCPT ); Sun, 15 Oct 2017 06:28:52 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14A3521874 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jic23@kernel.org Date: Sun, 15 Oct 2017 11:28:47 +0100 From: Jonathan Cameron To: Eugen Hristev Cc: , , , , , , , Subject: Re: [PATCH v2 5/5] iio: adc: at91-sama5d2_adc: use max sample rate Message-ID: <20171015112847.5c035e7a@archlinux> In-Reply-To: <1507703732-29175-6-git-send-email-eugen.hristev@microchip.com> References: <1507703732-29175-1-git-send-email-eugen.hristev@microchip.com> <1507703732-29175-6-git-send-email-eugen.hristev@microchip.com> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Oct 2017 09:35:32 +0300 Eugen Hristev wrote: > Change driver settings to use maximum sample rate clock. > This is useful to achieve best possible sampling rate > if we use DMA. > > Signed-off-by: Eugen Hristev I would normally expect this to have some bearing on the noise levels on the measured signals. All I can find is a reference to the track time being 15*a single clock cycle. We could change this so that it is appropriate for the currently samping frequency rather than leaving it as a fixed value. Jonathan > --- > drivers/iio/adc/at91-sama5d2_adc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c > index 7e51ecb..b76f88f 100644 > --- a/drivers/iio/adc/at91-sama5d2_adc.c > +++ b/drivers/iio/adc/at91-sama5d2_adc.c > @@ -934,7 +934,7 @@ static void at91_adc_hw_init(struct at91_adc_state *st) > at91_adc_writel(st, AT91_SAMA5D2_MR, > AT91_SAMA5D2_MR_TRANSFER(2) | AT91_SAMA5D2_MR_ANACH); > > - at91_adc_setup_samp_freq(st, st->soc_info.min_sample_rate); > + at91_adc_setup_samp_freq(st, st->soc_info.max_sample_rate); > } > > static ssize_t at91_adc_get_fifo_state(struct device *dev,