From patchwork Fri Jul 27 12:38:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 10308 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 C351F23E23 for ; Fri, 27 Jul 2012 12:39:06 +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 8F3A1A1912F for ; Fri, 27 Jul 2012 12:39:06 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so3101136ggn.11 for ; Fri, 27 Jul 2012 05:39:06 -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=fYF2aXwOjFPQU7BVYQRuRX1Sp2etgTq5Rj05FIhLC51WzjNQsLW8UBPe5+OtLqN8CE R3LAWdreKTd+uMAeLkxOAqlD3HMSxFzkhcE4zKrjnxwY9N1DnJtN9FEq6yKZpgF+KtgE Xbg3nkn4Ijg178gEQ/OjpjvsjIAaTCmgqAhiujXveQ64ewjuqzRip2xltBIMLHmFEdch OpM9ZiFxPfe5ie48nwBegQZmBbpv2rZ3VdAGtII2LlxmFj7IO7fO/VOfb4Qe0FjC3ZVU x9GElHGS1vFsn6nMjsxBpPoAwbHRxCKr1yAOuSZqWrGH/GHTULM7b8BWhXZGabWbzbA9 N+Ng== Received: by 10.42.189.73 with SMTP id dd9mr1409276icb.49.1343392746139; Fri, 27 Jul 2012 05:39:06 -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.43.93.3 with SMTP id bs3csp29398icc; Fri, 27 Jul 2012 05:39:05 -0700 (PDT) Received: by 10.180.84.169 with SMTP id a9mr5909522wiz.8.1343392744826; Fri, 27 Jul 2012 05:39:04 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id k55si2599497wer.139.2012.07.27.05.39.04 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Jul 2012 05:39:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by wibhm11 with SMTP id hm11so5797281wib.13 for ; Fri, 27 Jul 2012 05:39:04 -0700 (PDT) Received: by 10.216.62.21 with SMTP id x21mr1150580wec.202.1343392744621; Fri, 27 Jul 2012 05:39:04 -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 ef5sm6242502wib.3.2012.07.27.05.39.03 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Jul 2012 05:39:04 -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, sameo@linux.intel.com, alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com, lrg@ti.com, Lee Jones Subject: [PATCH 2/7] ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements Date: Fri, 27 Jul 2012 13:38:49 +0100 Message-Id: <1343392734-11805-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343392734-11805-1-git-send-email-lee.jones@linaro.org> References: <1343392734-11805-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkaoP/FlosORIq+8rkgkHBlHf/iIXLIh2u0DUtCpYa2li9JVNYV9uKkV+3UfgKCqYyQtz24 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);