From patchwork Wed Jul 20 08:29:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 9239113 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 22611600CB for ; Wed, 20 Jul 2016 08:31:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13D012787C for ; Wed, 20 Jul 2016 08:31:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 087E12793D; Wed, 20 Jul 2016 08:31:53 +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 AB01A20499 for ; Wed, 20 Jul 2016 08:31:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753165AbcGTI37 (ORCPT ); Wed, 20 Jul 2016 04:29:59 -0400 Received: from down.free-electrons.com ([37.187.137.238]:41189 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753064AbcGTI3y (ORCPT ); Wed, 20 Jul 2016 04:29:54 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id 4AA771BC; Wed, 20 Jul 2016 10:29:53 +0200 (CEST) Received: from quentin-Latitude-E6320.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id E077B1BD; Wed, 20 Jul 2016 10:29:42 +0200 (CEST) From: Quentin Schulz To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, maxime.ripard@free-electrons.com, wens@csie.org, dmitry.torokhov@gmail.com, lee.jones@linaro.org Cc: Quentin Schulz , antoine.tenart@free-electrons.com, thomas.petazzoni@free-electrons.com, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org Subject: [PATCH 2/5] mfd: sunxi-gpadc-mfd: add buffer structure Date: Wed, 20 Jul 2016 10:29:08 +0200 Message-Id: <1469003351-15263-3-git-send-email-quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1469003351-15263-1-git-send-email-quentin.schulz@free-electrons.com> References: <1469003351-15263-1-git-send-email-quentin.schulz@free-electrons.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds a buffer structure for files including the sunxi-gpadc-mfd header. This structure has a buffer of 32 u32 values to store data from the FIFO of the GPADC of Allwinner SoCs. A buff_size is provided in case the buffer is not full. Signed-off-by: Quentin Schulz --- include/linux/mfd/sunxi-gpadc-mfd.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/mfd/sunxi-gpadc-mfd.h b/include/linux/mfd/sunxi-gpadc-mfd.h index 7155845..f658299 100644 --- a/include/linux/mfd/sunxi-gpadc-mfd.h +++ b/include/linux/mfd/sunxi-gpadc-mfd.h @@ -20,4 +20,9 @@ struct sunxi_gpadc_mfd_dev { void __iomem *regs; }; +struct sunxi_gpadc_buffer { + u32 buffer[32]; + unsigned int buff_size; +}; + #endif