From patchwork Wed Oct 11 06:35:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 9998729 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D5363602BF for ; Wed, 11 Oct 2017 06:39:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFF3E28904 for ; Wed, 11 Oct 2017 06:39:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4A6E2890A; Wed, 11 Oct 2017 06:39:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 734FA28904 for ; Wed, 11 Oct 2017 06:39:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932286AbdJKGiu (ORCPT ); Wed, 11 Oct 2017 02:38:50 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:33119 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757121AbdJKGit (ORCPT ); Wed, 11 Oct 2017 02:38:49 -0400 X-IronPort-AV: E=Sophos;i="5.43,360,1503385200"; d="scan'208";a="7774081" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Oct 2017 23:38:43 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 10 Oct 2017 23:38:42 -0700 From: Eugen Hristev To: , , , , , , , , CC: Subject: [PATCH v2 5/5] iio: adc: at91-sama5d2_adc: use max sample rate Date: Wed, 11 Oct 2017 09:35:32 +0300 Message-ID: <1507703732-29175-6-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507703732-29175-1-git-send-email-eugen.hristev@microchip.com> References: <1507703732-29175-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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,