kirkwood-i2s.c (9c86286a60b28bd25cb1c70eb2aba34f182d1063) kirkwood-i2s.c (7f2c52afc02554f18db27242b62d4047bbd8df4c)
1/*
2 * kirkwood-i2s.c
3 *
4 * (c) 2010 Arnaud Patard <apatard@mandriva.com>
5 * (c) 2010 Arnaud Patard <arnaud.patard@rtp-net.org>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 565 unchanged lines hidden (view full) ---

574 if (err < 0)
575 return err;
576
577 priv->extclk = devm_clk_get(&pdev->dev, "extclk");
578 if (IS_ERR(priv->extclk)) {
579 if (PTR_ERR(priv->extclk) == -EPROBE_DEFER)
580 return -EPROBE_DEFER;
581 } else {
1/*
2 * kirkwood-i2s.c
3 *
4 * (c) 2010 Arnaud Patard <apatard@mandriva.com>
5 * (c) 2010 Arnaud Patard <arnaud.patard@rtp-net.org>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 565 unchanged lines hidden (view full) ---

574 if (err < 0)
575 return err;
576
577 priv->extclk = devm_clk_get(&pdev->dev, "extclk");
578 if (IS_ERR(priv->extclk)) {
579 if (PTR_ERR(priv->extclk) == -EPROBE_DEFER)
580 return -EPROBE_DEFER;
581 } else {
582 if (clk_is_match(priv->extclk, priv->clk)) {
582 if (priv->extclk == priv->clk) {
583 devm_clk_put(&pdev->dev, priv->extclk);
584 priv->extclk = ERR_PTR(-EINVAL);
585 } else {
586 dev_info(&pdev->dev, "found external clock\n");
587 clk_prepare_enable(priv->extclk);
588 soc_dai = kirkwood_i2s_dai_extclk;
589 }
590 }

--- 47 unchanged lines hidden (view full) ---

638 if (!IS_ERR(priv->extclk))
639 clk_disable_unprepare(priv->extclk);
640 clk_disable_unprepare(priv->clk);
641
642 return 0;
643}
644
645#ifdef CONFIG_OF
583 devm_clk_put(&pdev->dev, priv->extclk);
584 priv->extclk = ERR_PTR(-EINVAL);
585 } else {
586 dev_info(&pdev->dev, "found external clock\n");
587 clk_prepare_enable(priv->extclk);
588 soc_dai = kirkwood_i2s_dai_extclk;
589 }
590 }

--- 47 unchanged lines hidden (view full) ---

638 if (!IS_ERR(priv->extclk))
639 clk_disable_unprepare(priv->extclk);
640 clk_disable_unprepare(priv->clk);
641
642 return 0;
643}
644
645#ifdef CONFIG_OF
646static struct of_device_id mvebu_audio_of_match[] = {
646static const struct of_device_id mvebu_audio_of_match[] = {
647 { .compatible = "marvell,kirkwood-audio" },
648 { .compatible = "marvell,dove-audio" },
649 { .compatible = "marvell,armada370-audio" },
650 { }
651};
652MODULE_DEVICE_TABLE(of, mvebu_audio_of_match);
653#endif
654

--- 16 unchanged lines hidden ---
647 { .compatible = "marvell,kirkwood-audio" },
648 { .compatible = "marvell,dove-audio" },
649 { .compatible = "marvell,armada370-audio" },
650 { }
651};
652MODULE_DEVICE_TABLE(of, mvebu_audio_of_match);
653#endif
654

--- 16 unchanged lines hidden ---