From patchwork Mon May 27 20:06:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 10963509 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 F2DB815E6 for ; Mon, 27 May 2019 20:10:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0372D28553 for ; Mon, 27 May 2019 20:10:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EABE82873E; Mon, 27 May 2019 20:10:42 +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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,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 9837E28553 for ; Mon, 27 May 2019 20:10:42 +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:References:In-Reply-To: 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: List-Owner; bh=D809F/hD2ZtlDi7zoEW8qnQq5SjQjmLsAwQ+89Eq/OQ=; b=k9SdehCv6sirBZ 0Ym5CzMtGlCn/dGHO7W2KyNwCkmt39+Dnn89Jr3u9myOOZe0o56rdiE/n0ugiPYztviQ3jOOsoWtJ wdQsT7aQuA7oQH7NSDD2B9DxnXhqKoXh4POgFlf0b64/pm6WXlwMJog8W6qomdjcZM2oRhVnJiAqR R33nFrDlZWzwLRCDTApNBZQ9Pdh6h0weiV/X2GOQQpVvNBPsaKMaJXkVvE2NcBqOdGNglOXMNfGAg NjF7yOjQk+DxFcsJPrQusnHKaQz/m6Kybj0KZg1lRdyc2HLz/TwKsZ+/O6+AL7gFYKurLcaqbyMhW 7B3GS5O0FlA+pD4b+TIA==; 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 1hVLx7-0003Ci-Rb; Mon, 27 May 2019 20:10:37 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVLwn-0002nU-3Z for linux-arm-kernel@lists.infradead.org; Mon, 27 May 2019 20:10:19 +0000 Received: by mail-wm1-x344.google.com with SMTP id f204so539416wme.0 for ; Mon, 27 May 2019 13:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t6VdND5amN3StrhVc/zIi7Y91LySYgcr3YUPE2udaNw=; b=GLpFAL4wu2OrqSDvxzgInDtXCuimTNOqaHJziuaMoWOTVLMYBrJEbzRCGIVqQinpIS xeY0389EDmZ4JpQYjVNdRo2DtKE9/Sje54FrxlxZOIAZjV5knm+sTOp68PqqNyDPvRM0 uUlLytSd2Zs/FxFU282CMHz4nx3Ha+th8GVF+13SuZEv+hndX+zmy/6zrIN3IOvfl3nN ESYjm3YPKgBkqSRFMUY0WbkxdAwez86GmY6zf4rd+HFypmxYWV4uBcLvxwwLmC1CKgQ/ Giaiz+t2+C6sdmd3naO9c85x13RVAeqjMaFoN5fgp9LGewHYfwcRQNUvtO1D1lfa/zyB ivog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t6VdND5amN3StrhVc/zIi7Y91LySYgcr3YUPE2udaNw=; b=X98X8qrcZbVyeZbuTzm/IlUrqihx0i1On8BNa6wLY8xtM55g5vgxixM9zCbum5Jq2T Bz3zyD2RU+6tsAY5X+CLJy/5/0+AqidnC0ihfd4QmV0nXSdG7mgIHaglGrROYvAqJzao 7KJy0KaA7XS96V+mgcZCBRoKeT2qPYX7lGV/f9z0HRGkDEWWqXZnqYxs7wUeAtvv4WAb XKKNG/LFwlRxu5BKyKaBKvQuk4lj0mETB/2iysq5Ohi3SwSnql0P29jU9x6CpurkeilI XyYBzqhnQQvEzYXyQUWkATTd5Fc1+lBLjTpIZRmq+jheGYgSsgK7SpXydp3vZ6T5rMmV zbng== X-Gm-Message-State: APjAAAX4lAWdKwrjsyLfim/I7ZOgxzjZMj8hBP0yzWx6L9RJOjjqhCLS 92XcjqPkaP3uNTro9XzV42A= X-Google-Smtp-Source: APXvYqwhDPRjhw9OpYYCmRvpl9ZRKHy8xPORapsR6gjT3JrkGdCqImbpQ0zkOtaRtG4S2cd9sPO+9w== X-Received: by 2002:a7b:c549:: with SMTP id j9mr453146wmk.122.1558987814935; Mon, 27 May 2019 13:10:14 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:1f1:d0f0::4e2b:d7ca]) by smtp.gmail.com with ESMTPSA id s127sm308523wmf.48.2019.05.27.13.10.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 May 2019 13:10:13 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Liam Girdwood , Mark Brown , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Jaroslav Kysela , Takashi Iwai , Jagan Teki Subject: [PATCH v4 2/7] ASoC: sun4i-spdif: Move quirks to the top Date: Mon, 27 May 2019 22:06:22 +0200 Message-Id: <20190527200627.8635-3-peron.clem@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190527200627.8635-1-peron.clem@gmail.com> References: <20190527200627.8635-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190527_131017_266024_F02677A7 X-CRM114-Status: GOOD ( 15.33 ) 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: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, =?utf-8?b?Q2w=?= =?utf-8?b?w6ltZW50IFDDqXJvbg==?= , 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 The quirks are actually defines in the middle of the file with short explanation. Move this at the top and add a section to have coherency with sun4i-i2s. Signed-off-by: Clément Péron Acked-by: Maxime Ripard --- sound/soc/sunxi/sun4i-spdif.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c index b4af4aabead1..b6c66a62e915 100644 --- a/sound/soc/sunxi/sun4i-spdif.c +++ b/sound/soc/sunxi/sun4i-spdif.c @@ -161,6 +161,17 @@ #define SUN4I_SPDIF_SAMFREQ_176_4KHZ 0xc #define SUN4I_SPDIF_SAMFREQ_192KHZ 0xe +/** + * struct sun4i_spdif_quirks - Differences between SoC variants. + * + * @reg_dac_tx_data: TX FIFO offset for DMA config. + * @has_reset: SoC needs reset deasserted. + */ +struct sun4i_spdif_quirks { + unsigned int reg_dac_txdata; + bool has_reset; +}; + struct sun4i_spdif_dev { struct platform_device *pdev; struct clk *spdif_clk; @@ -405,11 +416,6 @@ static struct snd_soc_dai_driver sun4i_spdif_dai = { .name = "spdif", }; -struct sun4i_spdif_quirks { - unsigned int reg_dac_txdata; /* TX FIFO offset for DMA config */ - bool has_reset; -}; - static const struct sun4i_spdif_quirks sun4i_a10_spdif_quirks = { .reg_dac_txdata = SUN4I_SPDIF_TXFIFO, };