aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/imx-audmux.c
diff options
context:
space:
mode:
authorRichard Zhao <richard.zhao@freescale.com>2012-06-03 21:42:54 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-04 05:53:59 -0400
commita1c85ec03738421668becb973f35fe6e1501c6e6 (patch)
tree3a26c6d8a0a44bc96f82a99f8faf6c1d3073a4e9 /sound/soc/fsl/imx-audmux.c
parentd298caae9a920e1745599ddd4a19073d9a033df0 (diff)
ASoC: imx-audmux: add pinctrl support
Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl/imx-audmux.c')
-rw-r--r--sound/soc/fsl/imx-audmux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index f23700359c67..080327414c6b 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -26,6 +26,7 @@
26#include <linux/of_device.h> 26#include <linux/of_device.h>
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/pinctrl/consumer.h>
29 30
30#include "imx-audmux.h" 31#include "imx-audmux.h"
31 32
@@ -249,6 +250,7 @@ EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port);
249static int __devinit imx_audmux_probe(struct platform_device *pdev) 250static int __devinit imx_audmux_probe(struct platform_device *pdev)
250{ 251{
251 struct resource *res; 252 struct resource *res;
253 struct pinctrl *pinctrl;
252 const struct of_device_id *of_id = 254 const struct of_device_id *of_id =
253 of_match_device(imx_audmux_dt_ids, &pdev->dev); 255 of_match_device(imx_audmux_dt_ids, &pdev->dev);
254 256
@@ -257,6 +259,12 @@ static int __devinit imx_audmux_probe(struct platform_device *pdev)
257 if (!audmux_base) 259 if (!audmux_base)
258 return -EADDRNOTAVAIL; 260 return -EADDRNOTAVAIL;
259 261
262 pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
263 if (IS_ERR(pinctrl)) {
264 dev_err(&pdev->dev, "setup pinctrl failed!");
265 return PTR_ERR(pinctrl);
266 }
267
260 audmux_clk = clk_get(&pdev->dev, "audmux"); 268 audmux_clk = clk_get(&pdev->dev, "audmux");
261 if (IS_ERR(audmux_clk)) { 269 if (IS_ERR(audmux_clk)) {
262 dev_dbg(&pdev->dev, "cannot get clock: %ld\n", 270 dev_dbg(&pdev->dev, "cannot get clock: %ld\n",