From patchwork Tue Jul 31 13:31:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 10398 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 C35C423E56 for ; Tue, 31 Jul 2012 13:31:51 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 8BD8AA18CF5 for ; Tue, 31 Jul 2012 13:31:51 +0000 (UTC) Received: by mail-yw0-f52.google.com with SMTP id p61so5919659yhp.11 for ; Tue, 31 Jul 2012 06:31:51 -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=LWLCfqnh7hhsN4b9OgIM9gwX7exzB/0qX+xXx0Y2oObmjHdkM9IFDRjU0cJyW5Hs+D /4aTg4C4wRgpiF5YSjeLSKDtvJyw2GHBMuIRDjHvdDYKaU9MhDgPTqh1InlC2Csq6Wr4 ql5mvv/9LNKLVpVph3a8zexD78ePxvB1LSlLrci+KAY06Np0zXXLoIZEvnhKX9m/WcXH IB+naCvfoP5UAcnTfq5PMfUv22M7s4Psh2pP7iD+7tZhAxLMOlMkbU30/CtFjW/TavvZ cxcMU0fNWYJW/dqNU8S290gWgWswVL2uk0JpqsfsJdr9UcpWtIDvpuzT6V27FwttXOKr qF2A== Received: by 10.50.163.5 with SMTP id ye5mr652094igb.51.1343741510936; Tue, 31 Jul 2012 06:31:50 -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 u8csp143089igz; Tue, 31 Jul 2012 06:31:50 -0700 (PDT) Received: by 10.180.82.164 with SMTP id j4mr6880571wiy.18.1343741509465; Tue, 31 Jul 2012 06:31:49 -0700 (PDT) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by mx.google.com with ESMTPS id n7si233413wiy.46.2012.07.31.06.31.49 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 06:31:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.170 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.170; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.170 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-wi0-f170.google.com with SMTP id hq12so3338832wib.1 for ; Tue, 31 Jul 2012 06:31:49 -0700 (PDT) Received: by 10.180.86.106 with SMTP id o10mr6845003wiz.22.1343741508999; Tue, 31 Jul 2012 06:31:48 -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.47 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 06:31:48 -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 2/6] ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements Date: Tue, 31 Jul 2012 14:31:25 +0100 Message-Id: <1343741493-17671-5-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: ALoCoQkTxVZTi+QXdglh2cblt0J9xFzxsNVC05zqaGKTQ2fnZgKcIaEqSAlquFWatnbFF3dywOBe 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);