Commit a1c85ec0 authored by Richard Zhao's avatar Richard Zhao Committed by Mark Brown

ASoC: imx-audmux: add pinctrl support

Signed-off-by: default avatarRichard Zhao <richard.zhao@freescale.com>
Acked-by: default avatarDong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent d298caae
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/pinctrl/consumer.h>
#include "imx-audmux.h" #include "imx-audmux.h"
...@@ -249,6 +250,7 @@ EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port); ...@@ -249,6 +250,7 @@ EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port);
static int __devinit imx_audmux_probe(struct platform_device *pdev) static int __devinit imx_audmux_probe(struct platform_device *pdev)
{ {
struct resource *res; struct resource *res;
struct pinctrl *pinctrl;
const struct of_device_id *of_id = const struct of_device_id *of_id =
of_match_device(imx_audmux_dt_ids, &pdev->dev); of_match_device(imx_audmux_dt_ids, &pdev->dev);
...@@ -257,6 +259,12 @@ static int __devinit imx_audmux_probe(struct platform_device *pdev) ...@@ -257,6 +259,12 @@ static int __devinit imx_audmux_probe(struct platform_device *pdev)
if (!audmux_base) if (!audmux_base)
return -EADDRNOTAVAIL; return -EADDRNOTAVAIL;
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
if (IS_ERR(pinctrl)) {
dev_err(&pdev->dev, "setup pinctrl failed!");
return PTR_ERR(pinctrl);
}
audmux_clk = clk_get(&pdev->dev, "audmux"); audmux_clk = clk_get(&pdev->dev, "audmux");
if (IS_ERR(audmux_clk)) { if (IS_ERR(audmux_clk)) {
dev_dbg(&pdev->dev, "cannot get clock: %ld\n", dev_dbg(&pdev->dev, "cannot get clock: %ld\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment