From: richard.zhao@freescale.com (Richard Zhao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 08/11] ASoC: imx-audmux: add pinctrl support
Date: Fri, 27 Apr 2012 15:03:02 +0800 [thread overview]
Message-ID: <1335510185-7906-9-git-send-email-richard.zhao@freescale.com> (raw)
In-Reply-To: <1335510185-7906-1-git-send-email-richard.zhao@freescale.com>
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
---
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 at 021d8000 {
status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_audmux_1>;
};
+
uart2: uart at 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 <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
+#include <linux/pinctrl/consumer.h>
#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",
--
1.7.5.4
next prev parent reply other threads:[~2012-04-27 7:03 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 7:02 [PATCH 00/11] enable imx6q_sabrelite sgtl5000 audio support Richard Zhao
2012-04-27 7:02 ` [PATCH 01/11] dma: imx-sdma: make channel0 operations atomic Richard Zhao
2012-04-27 7:55 ` Sascha Hauer
2012-04-27 9:17 ` Richard Zhao
2012-04-27 8:21 ` Vinod Koul
2012-04-27 8:41 ` Richard Zhao
2012-04-27 10:22 ` Vinod Koul
2012-04-27 11:20 ` Mark Brown
2012-04-27 11:26 ` Richard Zhao
2012-04-27 11:33 ` Russell King - ARM Linux
2012-04-27 13:01 ` Laxman Dewangan
2012-04-27 13:10 ` Russell King - ARM Linux
2012-04-27 13:17 ` Laxman Dewangan
2012-04-27 13:19 ` Richard Zhao
2012-04-27 9:18 ` Lothar Waßmann
2012-04-27 13:25 ` Richard Zhao
2012-04-27 15:13 ` Lothar Waßmann
2012-04-27 15:27 ` Huang Shijie
2012-04-27 7:02 ` [PATCH 02/11] ASoC: imx-sgtl5000: add of_node_put when probe fail Richard Zhao
2012-04-27 17:44 ` Mark Brown
2012-04-27 7:02 ` [PATCH 03/11] ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000 Richard Zhao
2012-04-27 17:44 ` Mark Brown
2012-05-01 13:44 ` Shawn Guo
2012-05-02 10:50 ` Richard Zhao
2012-05-02 11:41 ` Mark Brown
2012-05-02 12:12 ` Shawn Guo
2012-05-02 12:22 ` Mark Brown
2012-04-27 7:02 ` [PATCH 04/11] i2c: imx: add pinctrl support Richard Zhao
2012-04-27 8:40 ` Dong Aisheng
2012-04-27 9:15 ` Richard Zhao
2012-04-27 7:02 ` [PATCH 05/11] ARM: imx6q: move imx6q_sabrelite specific code to a dedicated function Richard Zhao
2012-05-01 13:18 ` Shawn Guo
2012-04-27 7:03 ` [PATCH 06/11] ARM: dts: imx6q-sabrelite: add ssi device Richard Zhao
2012-05-01 13:26 ` Shawn Guo
2012-05-02 2:38 ` Shawn Guo
2012-04-27 7:03 ` [PATCH 07/11] ARM: dts: imx6q-sabrelite: add audmux device Richard Zhao
2012-04-27 7:03 ` Richard Zhao [this message]
2012-04-27 7:03 ` [PATCH 09/11] ARM: imx6q: add ssi1 clk_lookup Richard Zhao
2012-04-27 8:04 ` Sascha Hauer
2012-04-27 9:10 ` Richard Zhao
2012-04-27 9:25 ` Sascha Hauer
2012-04-30 2:01 ` Richard Zhao
2012-04-30 12:18 ` Sascha Hauer
2012-05-02 10:34 ` Richard Zhao
2012-05-02 14:34 ` Shawn Guo
2012-05-02 16:33 ` Sascha Hauer
2012-04-27 7:03 ` [PATCH 10/11] ARM: imx6q_sabrelite: clkdev_add cko1 for sgtl5000 Richard Zhao
2012-05-01 12:47 ` Shawn Guo
2012-05-01 23:39 ` Shawn Guo
2012-05-02 2:47 ` [alsa-devel] " Fabio Estevam
2012-05-02 3:37 ` Shawn Guo
2012-05-02 11:00 ` Richard Zhao
2012-04-27 7:03 ` [PATCH 11/11] ARM: dts: imx6q-sabrelite: add sound device imx6q-sabrelite-sgtl5000 Richard Zhao
2012-05-01 12:55 ` Shawn Guo
2012-05-02 10:37 ` Richard Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335510185-7906-9-git-send-email-richard.zhao@freescale.com \
--to=richard.zhao@freescale.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).