From patchwork Tue Jul 31 13:31:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 10395 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C08D623E56 for ; Tue, 31 Jul 2012 13:31:47 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 901E5A187E6 for ; Tue, 31 Jul 2012 13:31:47 +0000 (UTC) Received: by ggnf1 with SMTP id f1so5919110ggn.11 for ; Tue, 31 Jul 2012 06:31:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Xt30TlBfLMgW+SlYwsmEXDyqwIPKCUEWSPIZwpUP0uk=; b=i2uVrExDkq3WL3QOBi95tIrQRFoaxEjY0q6yrVXwlYEAFGxcIvqprDijuXapq+nh2R BOqLBNjC988SKHjTtnRPVERli132kVGz69ZzBe9dxz+otoYjBuH3+u43dgi4eA/5wzOo /hfd3ZtjqqdsLki/Bv/yHQiqs2ps+kCcbLbzgMWvHF5hBCS3xITUDK2/gv9p3A0rFadN kXKYhaP3kvEEFK3QPHjGRklmGz2uqeFMLHnryPukWPT+Iroe4O1G+c2aL8pOqyraY2lT hf4jF3P6voqVPO0M/SATJj1/xke7fAe1MSraJnVmtkdEHhYkmJdHArZxOxql1x20HAMU XS+w== Received: by 10.50.219.194 with SMTP id pq2mr669219igc.25.1343741506510; Tue, 31 Jul 2012 06:31:46 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.87.40 with SMTP id u8csp143082igz; Tue, 31 Jul 2012 06:31:45 -0700 (PDT) Received: by 10.180.78.4 with SMTP id x4mr2299443wiw.19.1343741505026; Tue, 31 Jul 2012 06:31:45 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id db1si273983wib.8.2012.07.31.06.31.44 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 06:31:45 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-we0-f178.google.com with SMTP id u7so5226003wey.37 for ; Tue, 31 Jul 2012 06:31:44 -0700 (PDT) Received: by 10.216.64.20 with SMTP id b20mr6807972wed.150.1343741504479; Tue, 31 Jul 2012 06:31:44 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id ex20sm263310wid.7.2012.07.31.06.31.42 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 06:31:43 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: STEricsson_nomadik_linux@list.st.com, linus.walleij@stericsson.com, arnd@arndb.de, olalilja@yahoo.se, ola.o.lilja@stericsson.com, alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com, lrg@ti.com, Lee Jones Subject: [PATCH 1/6] ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements Date: Tue, 31 Jul 2012 14:31:22 +0100 Message-Id: <1343741493-17671-2-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343741493-17671-1-git-send-email-lee.jones@linaro.org> References: <1343741493-17671-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnUWTDatCLnodeFOYuzM3Q5MvKacvfHuA3tMeNUp1o5Est3yNoTlzqGlyHhpPifbKf3re1k If codec->control_data is not populated SoC Core assumes we want to use regmap, which fails catastrophically, as we don't have one: Unable to handle kernel NULL pointer dereference at virtual address 00000080 pgd = c0004000 [00000080] *pgd=00000000 Internal error: Oops: 17 [#1] PREEMPT SMP ARM Modules linked in: CPU: 1 Not tainted (3.5.0-rc6-00884-g0b2419e-dirty #130) PC is at regmap_read+0x10/0x5c LR is at hw_read+0x80/0x90 pc : [] lr : [] psr: 60000013 Signed-off-by: Lee Jones --- sound/soc/codecs/ab8500-codec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 3c79592..23b4018 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c @@ -2406,6 +2406,10 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec) /* Setup AB8500 according to board-settings */ pdata = (struct ab8500_platform_data *)dev_get_platdata(dev->parent); + + /* Inform SoC Core that we have our own I/O arrangements. */ + codec->control_data = (void *)true; + status = ab8500_audio_setup_mics(codec, &pdata->codec->amics); if (status < 0) { pr_err("%s: Failed to setup mics (%d)!\n", __func__, status);