From patchwork Thu Aug 9 15:47:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 10623 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 BBFF123E02 for ; Thu, 9 Aug 2012 15:48:16 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 8493AA18440 for ; Thu, 9 Aug 2012 15:48:16 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id g10so584535ghb.11 for ; Thu, 09 Aug 2012 08:48:16 -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=CCptuoH4l4g7L6P1wUcb63AJkiqTdKWJ8BOoaYQ1WW0=; b=QD4RnIlXilXq/8WdjvX8TdG3SAiMJ5Or12qn6XorbxJPBVRSJXPXnmSl7OSLRo68TR YnQv7XYeWt0vH/KvzEoYOzDWbmZIBqXLAW+VqXNo3UX9/lpRczrtnupqmWCRzRws7JUi PMvOlPdhFHE5MUnARk9ReiJBuOl9nEx9082LTbVgPsMAWiV5oRLrx4Zxo+4eSupq5L0d TZdH0G0EBQmVz8VyfVPFC3mPXCwXERyQKORKfWWy0/vc8GlGnJaWtlU510RhVUKBKMlB DcKTwbeO7G5De549UhHXbBma79A5elo9XZk8qi9dV4uMvEHdbks+H6pEo/xRBdRMYfk0 kPoA== Received: by 10.42.86.138 with SMTP id u10mr944573icl.32.1344527295920; Thu, 09 Aug 2012 08:48:15 -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.184.200 with SMTP id ew8csp15223igc; Thu, 9 Aug 2012 08:48:14 -0700 (PDT) Received: by 10.216.71.82 with SMTP id q60mr12269372wed.64.1344527294271; Thu, 09 Aug 2012 08:48:14 -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 c35si2005758wec.3.2012.08.09.08.48.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Aug 2012 08:48:14 -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 mail-wi0-f172.google.com with SMTP id hm11so380135wib.13 for ; Thu, 09 Aug 2012 08:48:13 -0700 (PDT) Received: by 10.180.98.138 with SMTP id ei10mr4014696wib.1.1344527293790; Thu, 09 Aug 2012 08:48:13 -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 q4sm2278954wix.9.2012.08.09.08.48.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Aug 2012 08:48:13 -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, broonie@opensource.wolfsonmicro.com, Lee Jones , alsa-devel@alsa-project.org Subject: [PATCH 03/22] ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements Date: Thu, 9 Aug 2012 16:47:29 +0100 Message-Id: <1344527268-5964-4-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1344527268-5964-1-git-send-email-lee.jones@linaro.org> References: <1344527268-5964-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmDZo/Kx6UL++WiNu11UUoeaa3vTh21y5JsJi6xQIDNG9xX/RKWPmStFWstqBNMFsLjWSyX 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 CC: alsa-devel@alsa-project.org 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);