From patchwork Sat Nov 12 06:46:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 9423949 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 A30696047D for ; Sat, 12 Nov 2016 06:49:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9673E2990A for ; Sat, 12 Nov 2016 06:49:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B0EA29957; Sat, 12 Nov 2016 06:49:29 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 52AFA2990A for ; Sat, 12 Nov 2016 06:49:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c5S64-0000G1-3T; Sat, 12 Nov 2016 06:47:28 +0000 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76] helo=wens.csie.org) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c5S5q-0000Bk-Ny for linux-arm-kernel@lists.infradead.org; Sat, 12 Nov 2016 06:47:15 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id 58E845FA3F; Sat, 12 Nov 2016 14:46:49 +0800 (CST) From: Chen-Yu Tsai To: Liam Girdwood , Mark Brown , Maxime Ripard , Lee Jones , Rob Herring , Mark Rutland Subject: [PATCH 03/10] mfd: sun6i-prcm: Add codec analog controls sub-device for Allwinner A23 Date: Sat, 12 Nov 2016 14:46:41 +0800 Message-Id: <20161112064648.26779-4-wens@csie.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161112064648.26779-1-wens@csie.org> References: <20161112064648.26779-1-wens@csie.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161111_224714_986640_927BF5DE X-CRM114-Status: UNSURE ( 9.38 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 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, Chen-Yu Tsai , Mylene Josserand , 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 The PRCM block on the A23 contains a message box like interface to the registers for the analog path controls of the internal codec. Add a sub-device for it. Signed-off-by: Chen-Yu Tsai --- drivers/mfd/sun6i-prcm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/mfd/sun6i-prcm.c b/drivers/mfd/sun6i-prcm.c index 011fcc555945..4abbf2ede944 100644 --- a/drivers/mfd/sun6i-prcm.c +++ b/drivers/mfd/sun6i-prcm.c @@ -12,6 +12,9 @@ #include #include +#define SUN8I_CODEC_ANALOG_BASE 0x1c0 +#define SUN8I_CODEC_ANALOG_END (SUN8I_CODEC_ANALOG_BASE + 0x4 - 1) + struct prcm_data { int nsubdevs; const struct mfd_cell *subdevs; @@ -57,6 +60,14 @@ static const struct resource sun6i_a31_apb0_rstc_res[] = { }, }; +static const struct resource sun8i_codec_analog_res[] = { + { + .start = SUN8I_CODEC_ANALOG_BASE, + .end = SUN8I_CODEC_ANALOG_END, + .flags = IORESOURCE_MEM, + }, +}; + static const struct mfd_cell sun6i_a31_prcm_subdevs[] = { { .name = "sun6i-a31-ar100-clk", @@ -109,6 +120,12 @@ static const struct mfd_cell sun8i_a23_prcm_subdevs[] = { .num_resources = ARRAY_SIZE(sun6i_a31_apb0_rstc_res), .resources = sun6i_a31_apb0_rstc_res, }, + { + .name = "sun8i-codec-analog", + .of_compatible = "allwinner,sun8i-a23-codec-analog", + .num_resources = ARRAY_SIZE(sun8i_codec_analog_res), + .resources = sun8i_codec_analog_res, + }, }; static const struct prcm_data sun6i_a31_prcm_data = {