From patchwork Fri Apr 27 06:55:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 8245 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 A060923E9A for ; Fri, 27 Apr 2012 06:56:53 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 6916AA186EC for ; Fri, 27 Apr 2012 06:56:53 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so857924iag.11 for ; Thu, 26 Apr 2012 23:56:53 -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 :x-spamscore:x-bigfish:x-forefront-antispam-report:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:x-originatororg:x-gm-message-state; bh=K61+R/25oMoPrzvhNNSvx24WxIo5WqcTchSRKnfoZuY=; b=OIo1X0k33Y0Gv7y6NcPA8bOZXTjzwF6+XY90URsbLv4qLK5rj2fqEtvBRqZU6bJrC4 A6/OEJ85/lAs6XBdoPXLN/wCyMfXan1DOOa6SlJAJRhfWWQ2AxW7T+3ddSHIcvckeq8+ zgin7/vkecs7B470XdYjuAJCV413LCCYPr2B7648aLAs/nDiwKq/62lUJS7bmc3YJ8XE CHVblaOBXT+kcHwJl+Y9NnltaWnwhzhhgY9zC7k4ZEO5HTAoExqj2+J0ARDvMbGnOdQd u3SNRXxeFHi+o1d4TUu9DkPyI1a4tAr9SyflvWf2y7HES+qe4HWXbgPwo+/dIelYJM+Y GWww== Received: by 10.50.196.230 with SMTP id ip6mr770207igc.49.1335509813227; Thu, 26 Apr 2012 23:56:53 -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.231.137.198 with SMTP id x6csp5128ibt; Thu, 26 Apr 2012 23:56:52 -0700 (PDT) Received: by 10.180.92.71 with SMTP id ck7mr2922236wib.21.1335509812203; Thu, 26 Apr 2012 23:56:52 -0700 (PDT) Received: from db3outboundpool.messaging.microsoft.com (db3ehsobe004.messaging.microsoft.com. [213.199.154.142]) by mx.google.com with ESMTPS id bt8si1273409wib.40.2012.04.26.23.56.51 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Apr 2012 23:56:52 -0700 (PDT) Received-SPF: neutral (google.com: 213.199.154.142 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) client-ip=213.199.154.142; Authentication-Results: mx.google.com; spf=neutral (google.com: 213.199.154.142 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) smtp.mail=B20223@freescale.com Received: from mail55-db3-R.bigfish.com (10.3.81.236) by DB3EHSOBE002.bigfish.com (10.3.84.22) with Microsoft SMTP Server id 14.1.225.23; Fri, 27 Apr 2012 06:56:49 +0000 Received: from mail55-db3 (localhost [127.0.0.1]) by mail55-db3-R.bigfish.com (Postfix) with ESMTP id 722E6403C9; Fri, 27 Apr 2012 06:56:49 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bh) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail55-db3 (localhost.localdomain [127.0.0.1]) by mail55-db3 (MessageSwitch) id 1335509807932147_29308; Fri, 27 Apr 2012 06:56:47 +0000 (UTC) Received: from DB3EHSMHS018.bigfish.com (unknown [10.3.81.246]) by mail55-db3.bigfish.com (Postfix) with ESMTP id D44994E0057; Fri, 27 Apr 2012 06:56:47 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS018.bigfish.com (10.3.87.118) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 27 Apr 2012 06:56:47 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.355.3; Fri, 27 Apr 2012 01:56:48 -0500 Received: from b20223-02.ap.freescale.net (b20223-02.ap.freescale.net [10.192.242.124]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id q3R6uBpq008244; Fri, 27 Apr 2012 01:56:45 -0500 (CDT) From: Richard Zhao To: , , CC: , , , , , , , Richard Zhao Subject: [PATCH 08/11] ASoC: imx-audmux: add pinctrl support Date: Fri, 27 Apr 2012 14:55:59 +0800 Message-ID: <1335509762-7777-9-git-send-email-richard.zhao@freescale.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1335509762-7777-1-git-send-email-richard.zhao@freescale.com> References: <1335509762-7777-1-git-send-email-richard.zhao@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-Gm-Message-State: ALoCoQl1GQo+u6cjyw6dVZqE4ciMB5BAhGHpS0+aiIKy9FVdh1dASWuKMTpwtZn+q4ZtLFE073zn Signed-off-by: Richard Zhao --- arch/arm/boot/dts/imx6q-sabrelite.dts | 3 +++ arch/arm/boot/dts/imx6q.dtsi | 10 ++++++++++ sound/soc/fsl/imx-audmux.c | 8 ++++++++ 3 files changed, 21 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts index 02f93bc..cdae2dd 100644 --- a/arch/arm/boot/dts/imx6q-sabrelite.dts +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts @@ -54,7 +54,10 @@ audmux@021d8000 { status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_audmux_1>; }; + uart2: uart@021e8000 { status = "okay"; }; diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 7bf402e..3c3004d 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -402,6 +402,16 @@ reg = <0x020e0000 0x4000>; /* shared pinctrl settings */ + audmux { + pinctrl_audmux_1: audmux-1 { + fsl,pins = "MX6Q_PAD_SD2_DAT0", + "MX6Q_PAD_SD2_DAT3", + "MX6Q_PAD_SD2_DAT2", + "MX6Q_PAD_SD2_DAT1"; + fsl,mux = <3 3 3 3>; + }; + }; + i2c1 { pinctrl_i2c1_1: i2c1grp-1 { fsl,pins = "MX6Q_PAD_EIM_D21", diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index f237003..6c7dfc0 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "imx-audmux.h" @@ -249,6 +250,7 @@ EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port); static int __devinit imx_audmux_probe(struct platform_device *pdev) { struct resource *res; + struct pinctrl *pct; const struct of_device_id *of_id = of_match_device(imx_audmux_dt_ids, &pdev->dev); @@ -257,6 +259,12 @@ static int __devinit imx_audmux_probe(struct platform_device *pdev) if (!audmux_base) return -EADDRNOTAVAIL; + pct = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pct)) { + dev_err(&pdev->dev, "setup pinctrl failed!"); + return PTR_ERR(pct); + } + audmux_clk = clk_get(&pdev->dev, "audmux"); if (IS_ERR(audmux_clk)) { dev_dbg(&pdev->dev, "cannot get clock: %ld\n",