From patchwork Tue Dec 3 10:27:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 21952 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 979DE202AE for ; Tue, 3 Dec 2013 10:27:17 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id i4sf46913085oah.6 for ; Tue, 03 Dec 2013 02:27:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=dRtayW5z5og8qsykM597/rOgbVLOEyMiuRE5z/RLyMU=; b=K8VHDuzrjMLnFUfRdtCvHxk7+BYQceVA0TfeBF7huUp+hsg58xdJb90Fla2/Cb908V egU7bv2SfrtlUKgCOqTV43kIpGbTfO8tZvZYNM1UgxJsVP38TenWvTDTtELLyHkEAHkP 9wvxY73q5JB8+sr3++kjQiBiuckKFHHd0Jece8rAybuS1GZAozqhe07AGNHjGK9cPYW6 5CtF4P2QL2N6kIipeaA5CJze4aG3iGVIBYWLmM5e8aQFoSehu3HsZihHK6A/VkBT/72J 27kEXEbwFfgNHClxnwERytMOM5tBEpuExbzIseYgo4r7t8BBtBj6to6WduJXWOUoNrin A3Ug== X-Gm-Message-State: ALoCoQnF5XB5BCUkS1fDBBmhiB1eDQakIfAmGZDRC/r3aAd9jpeHeYnI8NhGMiEzmAbC5CPkrGD/ X-Received: by 10.182.186.105 with SMTP id fj9mr23338293obc.5.1386066436131; Tue, 03 Dec 2013 02:27:16 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.127.99 with SMTP id nf3ls795968qeb.30.gmail; Tue, 03 Dec 2013 02:27:16 -0800 (PST) X-Received: by 10.52.230.35 with SMTP id sv3mr4514967vdc.27.1386066435992; Tue, 03 Dec 2013 02:27:15 -0800 (PST) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id e6si31118171vcb.69.2013.12.03.02.27.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 02:27:15 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id oz11so10169749veb.32 for ; Tue, 03 Dec 2013 02:27:15 -0800 (PST) X-Received: by 10.220.2.9 with SMTP id 9mr107680vch.58.1386066435537; Tue, 03 Dec 2013 02:27:15 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp195931vcz; Tue, 3 Dec 2013 02:27:15 -0800 (PST) X-Received: by 10.50.153.50 with SMTP id vd18mr1875431igb.6.1386066434401; Tue, 03 Dec 2013 02:27:14 -0800 (PST) Received: from mail-ie0-f169.google.com (mail-ie0-f169.google.com [209.85.223.169]) by mx.google.com with ESMTPS id b8si1975999igo.31.2013.12.03.02.27.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 02:27:14 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.169 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.223.169; Received: by mail-ie0-f169.google.com with SMTP id e14so23328938iej.14 for ; Tue, 03 Dec 2013 02:27:14 -0800 (PST) X-Received: by 10.50.66.180 with SMTP id g20mr1776883igt.29.1386066433984; Tue, 03 Dec 2013 02:27:13 -0800 (PST) Received: from localhost.localdomain (cpc15-aztw25-2-0-cust493.aztw.cable.virginm.net. [92.233.57.238]) by mx.google.com with ESMTPSA id o1sm2394256igh.9.2013.12.03.02.27.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 02:27:13 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org Cc: linus.walleij@linaro.org, Lee Jones , alsa-devel@alsa-project.org Subject: [PATCH 1/2] ASoC: ux500_pcm: Differentiate between pdata and DT initialisation Date: Tue, 3 Dec 2013 10:27:06 +0000 Message-Id: <1386066427-6862-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , If booting with full DT support (i.e. DMA too, the last piece of the puzzle), then we don't need to use the compatible_request_channel call back or require some of the historical bumph which probably isn't required by a platform data start-up now either. This will also be ripped out in upcoming commits. Cc: alsa-devel@alsa-project.org Acked-by: Linus Walleij Signed-off-by: Lee Jones --- sound/soc/ux500/ux500_pcm.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/sound/soc/ux500/ux500_pcm.c b/sound/soc/ux500/ux500_pcm.c index 2f1bdb7..ad0d420 100644 --- a/sound/soc/ux500/ux500_pcm.c +++ b/sound/soc/ux500/ux500_pcm.c @@ -134,15 +134,24 @@ static const struct snd_dmaengine_pcm_config ux500_dmaengine_pcm_config = { .prepare_slave_config = ux500_pcm_prepare_slave_config, }; +static const struct snd_dmaengine_pcm_config ux500_dmaengine_of_pcm_config = { + .prepare_slave_config = ux500_pcm_prepare_slave_config, +}; + int ux500_pcm_register_platform(struct platform_device *pdev) { + const struct snd_dmaengine_pcm_config *pcm_config; + struct device_node *np = pdev->dev.of_node; int ret; - ret = snd_dmaengine_pcm_register(&pdev->dev, - &ux500_dmaengine_pcm_config, - SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | - SND_DMAENGINE_PCM_FLAG_COMPAT | - SND_DMAENGINE_PCM_FLAG_NO_DT); + if (np) + pcm_config = &ux500_dmaengine_of_pcm_config; + else + pcm_config = &ux500_dmaengine_pcm_config; + + ret = snd_dmaengine_pcm_register(&pdev->dev, pcm_config, + SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | + SND_DMAENGINE_PCM_FLAG_COMPAT); if (ret < 0) { dev_err(&pdev->dev, "%s: ERROR: Failed to register platform '%s' (%d)!\n",