aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2016-08-18 07:00:59 -0400
committerMark Brown <broonie@kernel.org>2016-08-18 11:00:25 -0400
commit479e2a86dc6aeaec6013165e1bd3525db6914f3a (patch)
treee66010162e01b9ee8539c056dd65db266634c844
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
ASoC: omap-mcpdm: Drop pdmclk clock handling
This reverts commit 65aca64d05b5eaa5ce15e18b458a8d338ddbd478. The patches for twl6040 MFD and clk missed the merge window and causing the McPDM driver to never probe since it is put back to the deferred list because the missing drivers. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--Documentation/devicetree/bindings/sound/omap-mcpdm.txt10
-rw-r--r--sound/soc/omap/omap-mcpdm.c17
2 files changed, 0 insertions, 27 deletions
diff --git a/Documentation/devicetree/bindings/sound/omap-mcpdm.txt b/Documentation/devicetree/bindings/sound/omap-mcpdm.txt
index 6f6c2f8e908d..0741dff048dd 100644
--- a/Documentation/devicetree/bindings/sound/omap-mcpdm.txt
+++ b/Documentation/devicetree/bindings/sound/omap-mcpdm.txt
@@ -8,8 +8,6 @@ Required properties:
8- interrupts: Interrupt number for McPDM 8- interrupts: Interrupt number for McPDM
9- interrupt-parent: The parent interrupt controller 9- interrupt-parent: The parent interrupt controller
10- ti,hwmods: Name of the hwmod associated to the McPDM 10- ti,hwmods: Name of the hwmod associated to the McPDM
11- clocks: phandle for the pdmclk provider, likely <&twl6040>
12- clock-names: Must be "pdmclk"
13 11
14Example: 12Example:
15 13
@@ -21,11 +19,3 @@ mcpdm: mcpdm@40132000 {
21 interrupt-parent = <&gic>; 19 interrupt-parent = <&gic>;
22 ti,hwmods = "mcpdm"; 20 ti,hwmods = "mcpdm";
23}; 21};
24
25In board DTS file the pdmclk needs to be added:
26
27&mcpdm {
28 clocks = <&twl6040>;
29 clock-names = "pdmclk";
30 status = "okay";
31};
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index e7cdc51fd806..74d6e6fdcfd0 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -31,7 +31,6 @@
31#include <linux/err.h> 31#include <linux/err.h>
32#include <linux/io.h> 32#include <linux/io.h>
33#include <linux/irq.h> 33#include <linux/irq.h>
34#include <linux/clk.h>
35#include <linux/slab.h> 34#include <linux/slab.h>
36#include <linux/pm_runtime.h> 35#include <linux/pm_runtime.h>
37#include <linux/of_device.h> 36#include <linux/of_device.h>
@@ -55,7 +54,6 @@ struct omap_mcpdm {
55 unsigned long phys_base; 54 unsigned long phys_base;
56 void __iomem *io_base; 55 void __iomem *io_base;
57 int irq; 56 int irq;
58 struct clk *pdmclk;
59 57
60 struct mutex mutex; 58 struct mutex mutex;
61 59
@@ -390,7 +388,6 @@ static int omap_mcpdm_probe(struct snd_soc_dai *dai)
390 struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai); 388 struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai);
391 int ret; 389 int ret;
392 390
393 clk_prepare_enable(mcpdm->pdmclk);
394 pm_runtime_enable(mcpdm->dev); 391 pm_runtime_enable(mcpdm->dev);
395 392
396 /* Disable lines while request is ongoing */ 393 /* Disable lines while request is ongoing */
@@ -425,7 +422,6 @@ static int omap_mcpdm_remove(struct snd_soc_dai *dai)
425 422
426 pm_runtime_disable(mcpdm->dev); 423 pm_runtime_disable(mcpdm->dev);
427 424
428 clk_disable_unprepare(mcpdm->pdmclk);
429 return 0; 425 return 0;
430} 426}
431 427
@@ -445,8 +441,6 @@ static int omap_mcpdm_suspend(struct snd_soc_dai *dai)
445 mcpdm->pm_active_count++; 441 mcpdm->pm_active_count++;
446 } 442 }
447 443
448 clk_disable_unprepare(mcpdm->pdmclk);
449
450 return 0; 444 return 0;
451} 445}
452 446
@@ -454,8 +448,6 @@ static int omap_mcpdm_resume(struct snd_soc_dai *dai)
454{ 448{
455 struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai); 449 struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai);
456 450
457 clk_prepare_enable(mcpdm->pdmclk);
458
459 if (mcpdm->pm_active_count) { 451 if (mcpdm->pm_active_count) {
460 while (mcpdm->pm_active_count--) 452 while (mcpdm->pm_active_count--)
461 pm_runtime_get_sync(mcpdm->dev); 453 pm_runtime_get_sync(mcpdm->dev);
@@ -549,15 +541,6 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
549 541
550 mcpdm->dev = &pdev->dev; 542 mcpdm->dev = &pdev->dev;
551 543
552 mcpdm->pdmclk = devm_clk_get(&pdev->dev, "pdmclk");
553 if (IS_ERR(mcpdm->pdmclk)) {
554 if (PTR_ERR(mcpdm->pdmclk) == -EPROBE_DEFER)
555 return -EPROBE_DEFER;
556 dev_warn(&pdev->dev, "Error getting pdmclk (%ld)!\n",
557 PTR_ERR(mcpdm->pdmclk));
558 mcpdm->pdmclk = NULL;
559 }
560
561 ret = devm_snd_soc_register_component(&pdev->dev, 544 ret = devm_snd_soc_register_component(&pdev->dev,
562 &omap_mcpdm_component, 545 &omap_mcpdm_component,
563 &omap_mcpdm_dai, 1); 546 &omap_mcpdm_dai, 1);