From patchwork Fri Apr 27 07:03:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 8286 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 7AE0223E42 for ; Fri, 27 Apr 2012 07:04:00 +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 4442CA18363 for ; Fri, 27 Apr 2012 07:04:00 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so866269iag.11 for ; Fri, 27 Apr 2012 00:04:00 -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=OyKi2l8POMtl4NiDEf2O7mjNy1LrMlStlHUmU9kII7P+saiV5U7wBap7KBKY8s/QRR eJTon4ljmFS7ax9WiPqikos9qz+3E3FeVhUphZtD9qTZDGCOTWLwBtv3m8OK79smsmhc e+45ywO1oxwrCeqsZ+iyb2Y9pwPNbuiNRgn5Gxpm/4GTcpVcmQ+NCjS25cSuiqfYP0b2 m66W9e4Z/KfR07EIj87W19huFNjkcMpa6AOzvzCnSELhI6nYyCFBD5eFNj3OwudJxCRN uTouUV8dheA1IOyfFhXr4dwnKng6NC88g12cAEJPUDsTqxB4hlRlSiKtDBeZF/vIn1c1 +Kjg== Received: by 10.43.49.201 with SMTP id vb9mr8064419icb.35.1335510240055; Fri, 27 Apr 2012 00:04:00 -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 x6csp5484ibt; Fri, 27 Apr 2012 00:03:59 -0700 (PDT) Received: by 10.180.77.4 with SMTP id o4mr3017337wiw.17.1335510238871; Fri, 27 Apr 2012 00:03:58 -0700 (PDT) Received: from db3outboundpool.messaging.microsoft.com (db3ehsobe006.messaging.microsoft.com. [213.199.154.144]) by mx.google.com with ESMTPS id s1si1319594wia.9.2012.04.27.00.03.58 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Apr 2012 00:03:58 -0700 (PDT) Received-SPF: neutral (google.com: 213.199.154.144 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) client-ip=213.199.154.144; Authentication-Results: mx.google.com; spf=neutral (google.com: 213.199.154.144 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) smtp.mail=B20223@freescale.com Received: from mail109-db3-R.bigfish.com (10.3.81.242) by DB3EHSOBE006.bigfish.com (10.3.84.26) with Microsoft SMTP Server id 14.1.225.23; Fri, 27 Apr 2012 07:03:56 +0000 Received: from mail109-db3 (localhost [127.0.0.1]) by mail109-db3-R.bigfish.com (Postfix) with ESMTP id DC03D4065F; Fri, 27 Apr 2012 07:03:55 +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 mail109-db3 (localhost.localdomain [127.0.0.1]) by mail109-db3 (MessageSwitch) id 133551023457758_7266; Fri, 27 Apr 2012 07:03:54 +0000 (UTC) Received: from DB3EHSMHS007.bigfish.com (unknown [10.3.81.247]) by mail109-db3.bigfish.com (Postfix) with ESMTP id F160D140050; Fri, 27 Apr 2012 07:03:53 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS007.bigfish.com (10.3.87.107) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 27 Apr 2012 07:03:54 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.355.3; Fri, 27 Apr 2012 02:03:40 -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 q3R737LQ008722; Fri, 27 Apr 2012 02:03:37 -0500 (CDT) From: Richard Zhao To: , , CC: , , , , , , , Richard Zhao Subject: [PATCH 08/11] ASoC: imx-audmux: add pinctrl support Date: Fri, 27 Apr 2012 15:03:02 +0800 Message-ID: <1335510185-7906-9-git-send-email-richard.zhao@freescale.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1335510185-7906-1-git-send-email-richard.zhao@freescale.com> References: <1335510185-7906-1-git-send-email-richard.zhao@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-Gm-Message-State: ALoCoQlHuak9YyaXOE7yFV7BKa9zDshZ+cLbMsAmuL/78LAlkeo/t/roTWZ4W6PhX4xJe8Bim0bX 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",