Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1807057ybi; Sat, 25 May 2019 09:25:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYC1cXuZ7qirliJf5jAI0Q/O3TwlUbNdZGSJnJhRMOz3h8WAdcm/FTb4caggjIbx7IKxLP X-Received: by 2002:a17:902:a505:: with SMTP id s5mr23059519plq.54.1558801536030; Sat, 25 May 2019 09:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558801536; cv=none; d=google.com; s=arc-20160816; b=C65KTSWN8TgXwiF4KA14hlvaCsxKJ6KgNqTQBhVkTfl5BlheZp5DaNg9PEeNoxAdrR rrl4yrmohPcbRu5bYoyIoWGVFShWiQdwjbJuulgzGSPbQnGtQXp90eSoG914Wv/0Tw6T xgE/X1jBx2DYenkyDJjZA2VcGol1HotC/fWucknV176ZUq5gMVPFskgRtFau2jjAR0JE bkxJve6RsEFhhYf+SDT52cCSV3AlsjC6Q6jaQHTFA4QUKZFfDtWL6ljrjog/vMkOyEoa eY8AE60cB14X70QGjaGYD+ODkGrQ45Ftb4NDHm4fTKiuuEqaORTzsPlVVSR4sLQdcpC5 2f4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nfqUAOYPvDzhcNc+tjW6jBBWsXQUQMy7ncklrPlMEZg=; b=VQAWhSCHhXiVJ470cjFaHjOEN6zGx+lCg4Bv3WvSo7UcKEZ47CLOMn3fnL5sXc0JD6 Qx+QbhuPpoSl2EbtcaGscKtTL0JJO4ZiMSNy0tXgV7AI++mFUK8K7GYucMgErqlYXj8i 6/fHvRg4NOtpWxWue+0wozCrWbBOSmpwZaY+hoRgizgGsw7y20HCdueZDjENpPkvqiPh qgG7fp//DfCYndJTGF6hbSc/m0Xhl0kxOVJ3NzSfWnu+6sxtNSZymuefPaBDFP2i+ASN b+Xmii6blQC7NwwdzA9V6oKSL3T5pBIIhSfjamZKRyPRfgyXXdGqg2IKoJ4hXyeNZCNk ue6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aCL66DnQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19si10367699pfk.205.2019.05.25.09.25.21; Sat, 25 May 2019 09:25:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aCL66DnQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727202AbfEYQXh (ORCPT + 99 others); Sat, 25 May 2019 12:23:37 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39821 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727051AbfEYQXg (ORCPT ); Sat, 25 May 2019 12:23:36 -0400 Received: by mail-wm1-f68.google.com with SMTP id z23so7865190wma.4; Sat, 25 May 2019 09:23:34 -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=nfqUAOYPvDzhcNc+tjW6jBBWsXQUQMy7ncklrPlMEZg=; b=aCL66DnQKCJFGF7Sny1qI110miKIWTxt7QW1iSoRit3Mo5jspnYicZoXoQfgUflTpn nL6BhP1dmM+LagcQyqPghQws4BzN0DNqSTXisfQSiQF26TeDElGIYaCOXH6Xy/5djSLp Aea8coHm1Qg3oR0BmfdgzqYXVNUie1jX/vbcAGGcwDR7J9AcFH5sDqjUJIZrOFrLuzb4 u0bGKcTMGLWvkKx9WubIYANjkLlsgz++UOw3dQHpff9U/sp0W9OjFqUx7L54Pf6QfBZM 9Ti/JJvL7T1GY8wbnAxFjY7+cbqxYzr+e1HZAwznhbu/sGK+bEIjL3I46nVozFwseSEk UaCA== 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=nfqUAOYPvDzhcNc+tjW6jBBWsXQUQMy7ncklrPlMEZg=; b=ciDLYkx3WY1xTvAgTT6I1vVVCs+w+4nkV+pEoilWC+vsWjO2Q3sYPmqNFXdW0KAncC i/b/H9v1kUhNZOV461nOhSeT/Na94Eu8FUPofQQ5lAGeaZz+QcAM9bQovryWq27zcm5G JJtGTWOKh69cEqMkvv8Zxjqs+dK4AaDdXvIRe6viXTh1nEmxp+L5BmcQz6JN4URJ2D2g BewQQFB1oDMhO35FakNPyNh3umGEn8kJtzHNLlQ/HoHRjtBtHRhXbZ4XKtMKlBp8EjrH RHbELAaiFtrhsJQQvVrj3d4qpy7gDhBCh3azf4HCV/D4Dj13scf4FG0c5sJQjcgu4xtd 9v5A== X-Gm-Message-State: APjAAAX0zBU7p/McbGCurQjPQ+kOrnO8H1p5frShBy3o9A/9mX3PUGc3 gn4/Ey+BRe1b9Ha+IEHObTFzhHB0BIZPBg== X-Received: by 2002:a1c:35c9:: with SMTP id c192mr3998765wma.147.1558801413382; Sat, 25 May 2019 09:23:33 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:1f1:d0f0::4e2b:d7ca]) by smtp.gmail.com with ESMTPSA id k184sm13194409wmk.0.2019.05.25.09.23.32 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 25 May 2019 09:23:32 -0700 (PDT) From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= To: Liam Girdwood , Mark Brown , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Jaroslav Kysela , Takashi Iwai , Jagan Teki Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= Subject: [PATCH v3 2/7] ASoC: sun4i-spdif: Move quirks to the top Date: Sat, 25 May 2019 18:23:18 +0200 Message-Id: <20190525162323.20216-3-peron.clem@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190525162323.20216-1-peron.clem@gmail.com> References: <20190525162323.20216-1-peron.clem@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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, }; -- 2.20.1