From patchwork Thu Mar 7 12:43:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastien Guiriec X-Patchwork-Id: 2231421 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id C6AB73FCF6 for ; Thu, 7 Mar 2013 12:44:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755463Ab3CGMoQ (ORCPT ); Thu, 7 Mar 2013 07:44:16 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:51414 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754827Ab3CGMoP (ORCPT ); Thu, 7 Mar 2013 07:44:15 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r27Ci0Tu003536; Thu, 7 Mar 2013 06:44:00 -0600 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r27Ci02A002583; Thu, 7 Mar 2013 06:44:00 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Thu, 7 Mar 2013 06:44:00 -0600 Received: from unb0919150.emea.dhcp.ti.com (unb0919150.emea.dhcp.ti.com [137.167.110.144]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r27ChstR028567; Thu, 7 Mar 2013 06:43:59 -0600 From: Sebastien Guiriec To: Sebastien Guiriec , Peter Ujfalusi , Liam Girdwood , Mark Brown , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Jarkko Nikula , Tony Lindgren CC: , Subject: [PATCH 2/5] ASoC: omap-dmic: Update driver for DMA DT binding. Date: Thu, 7 Mar 2013 13:43:21 +0100 Message-ID: <1362660204-27074-3-git-send-email-s-guiriec@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1362660204-27074-1-git-send-email-s-guiriec@ti.com> References: <1362660204-27074-1-git-send-email-s-guiriec@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Update the driver in order to use OMAP DMA DT binding instead of hwmod data for DT boot. Signed-off-by: Sebastien Guiriec --- sound/soc/omap/omap-dmic.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c index ba49ccd..8695b32 100644 --- a/sound/soc/omap/omap-dmic.c +++ b/sound/soc/omap/omap-dmic.c @@ -62,6 +62,7 @@ struct omap_dmic { */ static struct omap_pcm_dma_data omap_dmic_dai_dma_params = { .name = "DMIC capture", + .dma_name = "up_link", }; static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val) @@ -478,13 +479,15 @@ static int asoc_dmic_probe(struct platform_device *pdev) } omap_dmic_dai_dma_params.port_addr = res->start + OMAP_DMIC_DATA_REG; - res = platform_get_resource(pdev, IORESOURCE_DMA, 0); - if (!res) { - dev_err(dmic->dev, "invalid dma resource\n"); - ret = -ENODEV; - goto err_put_clk; + if (!pdev->dev.of_node) { + res = platform_get_resource(pdev, IORESOURCE_DMA, 0); + if (!res) { + dev_err(dmic->dev, "invalid dma resource\n"); + ret = -ENODEV; + goto err_put_clk; + } + omap_dmic_dai_dma_params.dma_req = res->start; } - omap_dmic_dai_dma_params.dma_req = res->start; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); if (!res) {