exynos/mfc: add mfc device to power domain
authorNaveen krishna Chatradhi <ch.naveen@samsung.com>
Tue, 31 Jul 2012 06:30:19 +0000 (12:00 +0530)
committerChromeBot <chrome-bot@google.com>
Wed, 20 Mar 2013 09:05:00 +0000 (02:05 -0700)
This patch adds the mfc device to the genpd by calling the
function 'pm_genpd_of_add_device_by_name'. The power domain
is found by searching for a of property 'samsung,pd' in the of node.

BUG=chrome-os-partner:11793
Test=MFC/GSC/Sysmmu get suspended after probe and resume upon
video playback. Tested on Daisy.

Change-Id: I171fab67eb63a2e779dd2405befb080b35fa018e
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29164
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/45653
Reviewed-by: John Sheu <sheu@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
Commit-Queue: John Sheu <sheu@chromium.org>

drivers/media/video/s5p-mfc/s5p_mfc.c

index 3fe717c..098fab4 100644 (file)
@@ -22,6 +22,7 @@
 #include <media/v4l2-event.h>
 #include <linux/workqueue.h>
 #include <linux/of.h>
+#include <linux/pm_domain.h>
 #include <media/videobuf2-core.h>
 #include "s5p_mfc_common.h"
 #include "s5p_mfc_ctrl.h"
@@ -1094,6 +1095,10 @@ static int s5p_mfc_probe(struct platform_device *pdev)
 
        dev->variant = mfc_get_drv_data(pdev);
 
+       if (pm_genpd_of_add_device_by_name(pdev->dev.of_node, &pdev->dev,
+                                                               "samsung,pd"))
+               dev_err(&pdev->dev, "failed to add to genpd\n");
+
        ret = s5p_mfc_init_pm(dev);
        if (ret < 0) {
                dev_err(&pdev->dev, "failed to get mfc clock source\n");