From patchwork Thu Mar 21 16:47:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Gasnier X-Patchwork-Id: 10864063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 727B313B5 for ; Thu, 21 Mar 2019 16:49:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F1F0287B6 for ; Thu, 21 Mar 2019 16:49:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42C0728A12; Thu, 21 Mar 2019 16:49:08 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F0E2A287B6 for ; Thu, 21 Mar 2019 16:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=BuehNVLpPIGWHPacND0P237VrLS+CXOVdqAcZApLSmM=; b=XuD3Owza9NePvK cuaq5T2aEfqoWKONss5U42U0z3fjetaaS8u4nw3iximZDM5y3WeKLxx0K+ml3FdEVirVZWsr9SqrU RkyET1JZ7bARUe3/A+0iDZ0g44LsROejqpfS6VtplsY42qfv2UTq/8QVH9AbnH4jK/4GbJ9PsbTcj KpUT1P1CK4tggOiHJg9xC9HFCDmWzrXXJQaiMHkDXR09feNkuNUpOW9m9OHQaEEk7Lkz2HrUNFKBP vjBcq4tb/xG9dE6u5yQR58Aa/NKajJI6tpFtFXfqLrNAaD+cE17lA8AcLj3VX1StC4T8dD7T9eSx8 jJlKcNcYxlXuob07Ep9g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h70sH-0001ow-NB; Thu, 21 Mar 2019 16:49:01 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h70r1-0000ER-V6 for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2019 16:47:48 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2LGktiN008033; Thu, 21 Mar 2019 17:47:36 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2r8rwkek1e-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 21 Mar 2019 17:47:36 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id F39BB31; Thu, 21 Mar 2019 16:47:35 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id CE1F55670; Thu, 21 Mar 2019 16:47:35 +0000 (GMT) Received: from localhost (10.75.127.47) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 21 Mar 2019 17:47:35 +0100 From: Fabrice Gasnier To: Subject: [PATCH v2 0/8] iio: adc: stm32-dfsdm: add buffer modes Date: Thu, 21 Mar 2019 17:47:21 +0100 Message-ID: <1553186849-6261-1-git-send-email-fabrice.gasnier@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG6NODE2.st.com (10.75.127.17) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-21_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190321_094744_404727_DDC62080 X-CRM114-Status: UNSURE ( 9.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lars@metafoo.de, olivier.moysan@st.com, alexandre.torgue@st.com, linux-iio@vger.kernel.org, pmeerw@pmeerw.net, arnaud.pouliquen@st.com, linux-kernel@vger.kernel.org, mcoquelin.stm32@gmail.com, knaack.h@gmx.de, fabrice.gasnier@st.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset adds support for buffer modes, scan mode and triggers in STM32 DFSDM ADC driver: - 1st patch is an improvement - Patch 2 to 5 are basically precursor patchs that reworks the way to configure the dfsdm for the audio part, so it can be common with the iio part. - Last patchs add support for triggered buffer mode (with scan mode and hardware triggers) Changes in v2: - rework 1st patch to better reflect the contrainsts and explain them, to reflect Jonathan's remarks. - improve patch 7 description to better explain the DFSDM modes, with regard to the userland interface. Fabrice Gasnier (8): iio: adc: stm32-dfsdm: make spi_master_freq more accurate iio: adc: stm32-dfsdm: continuous mode depends on current mode iio: adc: stm32-dfsdm: move dma enable from start_conv() to start_dma() iio: adc: stm32-dfsdm: move dma slave config to start routine iio: adc: stm32-dfsdm: enable hw consumer iio: adc: stm32-dfsdm: add support for scan mode iio: adc: stm32-dfsdm: add support for buffer modes iio: adc: stm32-dfsdm: claim direct mode for raw read and settings drivers/iio/adc/stm32-dfsdm-adc.c | 513 +++++++++++++++++++++++++++++-------- drivers/iio/adc/stm32-dfsdm-core.c | 17 +- 2 files changed, 413 insertions(+), 117 deletions(-)