Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753885AbcJDJsA (ORCPT ); Tue, 4 Oct 2016 05:48:00 -0400 Received: from down.free-electrons.com ([37.187.137.238]:53753 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751527AbcJDJr6 (ORCPT ); Tue, 4 Oct 2016 05:47:58 -0400 From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?= To: vinod.koul@intel.com, maxime.ripard@free-electrons.com, wens@csie.org, mturquette@baylibre.com, sboyd@codeaurora.org, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, lee.jones@linaro.org, mark.rutland@arm.com, robh+dt@kernel.org Cc: linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, thomas.petazzoni@free-electrons.com, mylene.josserand@free-electrons.com, alexandre.belloni@free-electrons.com Subject: [PATCH 05/14] mfd: sun6i-prcm: Add sun8i analog codec as subnode Date: Tue, 4 Oct 2016 11:46:18 +0200 Message-Id: X-Mailer: git-send-email 2.9.3 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1431 Lines: 52 The sun8i audio codec is using PRCM registers to configure all the analog part of the audio codec. It is added as a subnode of the PRCM with his resource (offset of 0x1c0). Signed-off-by: Mylène Josserand --- drivers/mfd/sun6i-prcm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/mfd/sun6i-prcm.c b/drivers/mfd/sun6i-prcm.c index 011fcc5..e0c6bf5 100644 --- a/drivers/mfd/sun6i-prcm.c +++ b/drivers/mfd/sun6i-prcm.c @@ -12,6 +12,8 @@ #include #include +#define SUN6I_AUDIO_CODEC_ANALOG 0x1c0 + struct prcm_data { int nsubdevs; const struct mfd_cell *subdevs; @@ -57,6 +59,14 @@ static const struct resource sun6i_a31_apb0_rstc_res[] = { }, }; +static const struct resource sun8i_adda_res[] = { + { + .start = SUN6I_AUDIO_CODEC_ANALOG, + .end = 0x1c3, + .flags = IORESOURCE_MEM, + }, +}; + static const struct mfd_cell sun6i_a31_prcm_subdevs[] = { { .name = "sun6i-a31-ar100-clk", @@ -109,6 +119,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-codec-analog", + .num_resources = ARRAY_SIZE(sun8i_adda_res), + .resources = sun8i_adda_res, + }, }; static const struct prcm_data sun6i_a31_prcm_data = { -- 2.9.3