From patchwork Sat Aug 12 11:00:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Code Kipper X-Patchwork-Id: 9896995 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 41DB460351 for ; Sat, 12 Aug 2017 11:03:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32BE728B67 for ; Sat, 12 Aug 2017 11:03:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 279E228C60; Sat, 12 Aug 2017 11:03:13 +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=-2.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 05A0828C7A for ; Sat, 12 Aug 2017 11:03:10 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=Wm+v4V1F3g8aRc9iP66pRTvRZC6Rv7pjkzNWP0XG6X8=; b=K+GHPsjbt1wgDQ7Z7+FvqwG6dt evYGCPfpn9PVcdfrih9HziqBMmB/B7dhScxpc/3lmAUKFkFqR1ga/8qbmBNPbHhI5AzGGKe61Rg7h XOdF8AyZeykmnWK0xB96/YouKpnKPfh5sx0npR1imY7ONv38E5gH/DW59PnjQu+gNnIKLF+C7+Ttc p8kkr00Cmh9fzaBBigVDb7xLGarKZtBQ/95KNf4B6qFsNb+mfLH7snapZ6GJxfhSqY1y7+HDkBYCK vhyHlzyJrCV6yEcbtu0a3SxV2H0PmPHeEoHoeRqe62yFmrctLcVv2cbeXJ/rQ1YDnmYa4roTk8Jpa wyXgzSsg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dgUBX-0000Pk-Qu; Sat, 12 Aug 2017 11:02:27 +0000 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dgUAZ-00085c-CM for linux-arm-kernel@lists.infradead.org; Sat, 12 Aug 2017 11:01:29 +0000 Received: by mail-lf0-x244.google.com with SMTP id 65so3717639lfa.0 for ; Sat, 12 Aug 2017 04:01:06 -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; bh=pb8mqiu5p/dMRN+Z1SGWXzEcwrYh8siZdxxv42DPWq8=; b=aZ8Ll2vsmKJI7l0x7NPMY99KmUCZrxa+oS3mWzoSFFSSgbrSVvl2pFDx1PC50yuna0 Nh/OkTOIAA5AAukTl6DlvEwGTFe0T5a/hI/HKs0CbzukvQstgmWeXDvboW0WeDMB40go lLIzs0Ps6o4hNj+Uz8fux686D4aDqsj/JnNfWJjEgfDzZ1Bt8Vp/+/N+V8PtFD/yIXBL cVGJth289MwSppeFK3Y4dLVilZ83QtBFxEiO0I3ctxi1TrIR9yKqHSAezeucHy02gEzY HT7G318rSwy1kMQMClHEEWoepUNs9dKxsn6Cu8yvaJzFauZseRDiaeQgYcts4HEtwc9Y sacw== 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; bh=pb8mqiu5p/dMRN+Z1SGWXzEcwrYh8siZdxxv42DPWq8=; b=mUP8GOi0S6AC9U7LbqJu1tYlBY5OxOiW0yrp/VXa4uRVF2salEivTccwBjG6G3FpCQ 17dzXXM2/oBtgWtL3So3QB9EanCt4PDCZik96sarAWykhW9zWO5nMjPoYG+M9wtISqkZ JEIPMaYt1q2D5zOVcgqva843InMDyBEUzIVQhmYEc0jBQBCpfmX7FmFQTVu1l5Lxt8L1 vad2ZO/KfFaiLfog4mwPvhFI3trTkVuFf3JObi8cDIqlDXYewcWCZ6Gs9WYHKpo7GnnV DfCl/F0Gwh9ewOLI3mNRW8OqS/9V3aLPD8TzFBQgymIdD2aa5ark5WbB3+/ZwpnEBEN7 RKQg== X-Gm-Message-State: AHYfb5gW+22UQN0W7TUaKAc9fHfFtMXdOwW59+qasj5GyRJ/DjX+22ne EmAtx5TQ0EuVMg== X-Received: by 10.46.1.201 with SMTP id f70mr5451591lji.182.1502535664961; Sat, 12 Aug 2017 04:01:04 -0700 (PDT) Received: from localhost.localdomain (c80-217-9-219.bredband.comhem.se. [80.217.9.219]) by smtp.gmail.com with ESMTPSA id h22sm432402ljb.41.2017.08.12.04.01.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Aug 2017 04:01:04 -0700 (PDT) From: codekipper@gmail.com To: maxime.ripard@free-electrons.com Subject: [PATCH v3 02/11] ASoC: sun4i-i2s: Add regmap config to quirks Date: Sat, 12 Aug 2017 13:00:50 +0200 Message-Id: <20170812110059.5115-3-codekipper@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170812110059.5115-1-codekipper@gmail.com> References: <20170812110059.5115-1-codekipper@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170812_040127_603450_3B0B02B4 X-CRM114-Status: GOOD ( 12.70 ) 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: alsa-devel@alsa-project.org, Marcus Cooper , lgirdwood@gmail.com, linux-kernel@vger.kernel.org, be17068@iperbole.bo.it, linux-sunxi@googlegroups.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 From: Marcus Cooper The newer SoCs have a larger range than the original SoC that this driver was developed for. By adding the regmap config to the quirks then the driver can initialise the managed register map correctly. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai --- sound/soc/sunxi/sun4i-i2s.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 9a35313c4f9b..f6f3c409f25e 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -94,11 +94,13 @@ * struct sun4i_i2s_quirks - Differences between SoC variants. * * @has_reset: SoC needs reset deasserted. + * @sun4i_i2s_regmap: regmap config to use. * @mclk_offset: Value by which mclkdiv needs to be adjusted. * @bclk_offset: Value by which bclkdiv needs to be adjusted. */ struct sun4i_i2s_quirks { bool has_reset; + const struct regmap_config *sun4i_i2s_regmap; unsigned int mclk_offset; unsigned int bclk_offset; }; @@ -674,11 +676,13 @@ static int sun4i_i2s_runtime_suspend(struct device *dev) } static const struct sun4i_i2s_quirks sun4i_a10_i2s_quirks = { - .has_reset = false, + .has_reset = false, + .sun4i_i2s_regmap = &sun4i_i2s_regmap_config, }; static const struct sun4i_i2s_quirks sun6i_a31_i2s_quirks = { - .has_reset = true, + .has_reset = true, + .sun4i_i2s_regmap = &sun4i_i2s_regmap_config, }; static int sun4i_i2s_probe(struct platform_device *pdev) @@ -717,7 +721,7 @@ static int sun4i_i2s_probe(struct platform_device *pdev) } i2s->regmap = devm_regmap_init_mmio(&pdev->dev, regs, - &sun4i_i2s_regmap_config); + i2s->variant->sun4i_i2s_regmap); if (IS_ERR(i2s->regmap)) { dev_err(&pdev->dev, "Regmap initialisation failed\n"); return PTR_ERR(i2s->regmap);