Skip to content

Commit

Permalink
ASoC: imx-audmux: add pinctrl support
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Zhao <[email protected]>
Acked-by: Dong Aisheng <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Richard Zhao authored and broonie committed Jun 4, 2012
1 parent d298caa commit a1c85ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sound/soc/fsl/imx-audmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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 *pinctrl;
const struct of_device_id *of_id =
of_match_device(imx_audmux_dt_ids, &pdev->dev);

Expand All @@ -257,6 +259,12 @@ static int __devinit imx_audmux_probe(struct platform_device *pdev)
if (!audmux_base)
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");
if (IS_ERR(audmux_clk)) {
dev_dbg(&pdev->dev, "cannot get clock: %ld\n",
Expand Down

0 comments on commit a1c85ec

Please sign in to comment.