+static int acp3x_dai_probe(struct platform_device *pdev)
+{
+ÂÂÂ struct resource *res;
+ÂÂÂ struct i2s_dev_data *adata;
+ÂÂÂ int status;
+
+ÂÂÂ adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
+ÂÂÂÂÂÂÂÂÂÂÂ GFP_KERNEL);
+ÂÂÂ if (!adata)
+ÂÂÂÂÂÂÂ return -ENOMEM;
+
+ÂÂÂ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ÂÂÂ if (!res) {
+ÂÂÂÂÂÂÂ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
+ÂÂÂÂÂÂÂ return -ENOMEM;
+ÂÂÂ }
+
+ÂÂÂ adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
+ÂÂÂÂÂÂÂÂÂÂÂ resource_size(res));
+ÂÂÂ if (IS_ERR(adata->acp3x_base))
+ÂÂÂÂÂÂÂ return PTR_ERR(adata->acp3x_base);
+
+ÂÂÂ adata->i2s_irq = res->start;
+ÂÂÂ dev_set_drvdata(&pdev->dev, adata);
+ÂÂÂ status = devm_snd_soc_register_component(&pdev->dev,
+ÂÂÂÂÂÂÂÂÂÂÂ &acp3x_dai_component, &acp3x_i2s_dai, 1);
+ÂÂÂ if (status) {
+ÂÂÂÂÂÂÂ dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ÂÂÂÂÂÂÂ return -ENODEV;
+ÂÂÂ }
+ÂÂÂ pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
+ÂÂÂ pm_runtime_use_autosuspend(&pdev->dev);
+ÂÂÂ pm_runtime_enable(&pdev->dev);
question: here you want to use pm_runtime for this platform device...
+ÂÂÂ return 0;
+}
+
+static int acp3x_dai_remove(struct platform_device *pdev)
+{
+ÂÂÂ pm_runtime_disable(&pdev->dev);
+ÂÂÂ return 0;
+}
+static struct platform_driver acp3x_dai_driver = {
+ÂÂÂ .probe = acp3x_dai_probe,
+ÂÂÂ .remove = acp3x_dai_remove,
+ÂÂÂ .driver = {
+ÂÂÂÂÂÂÂ .name = "acp3x_i2s_playcap",
... but here there is no .pm structure and I don't see any suspend/resume routines for this driver...
+ÂÂÂ },
+};
@@ -774,13 +586,14 @@ static struct platform_driver acp3x_dma_driver = {
ÂÂÂÂÂ .probe = acp3x_audio_probe,
ÂÂÂÂÂ .remove = acp3x_audio_remove,
ÂÂÂÂÂ .driver = {
-ÂÂÂÂÂÂÂ .name = "acp3x_rv_i2s",
+ÂÂÂÂÂÂÂ .name = "acp3x_rv_i2s_dma",
ÂÂÂÂÂÂÂÂÂ .pm = &acp3x_pm_ops,
ÂÂÂÂÂ },
... but for this other platform_driver you do have a .pm structure and suspend-resume implementations.
Wondering if this is a miss or a feature?