fimc-is: Remove conditional runtime PM support
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 7 Aug 2015 06:37:00 +0000 (08:37 +0200)
committerInki Dae <inki.dae@samsung.com>
Mon, 3 Dec 2018 00:56:49 +0000 (09:56 +0900)
Remove conditional runtime PM code.

Change-Id: Id8c12b806217bba6f242e926e4d88ef74a567289
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/media/platform/exynos/fimc-is/fimc-is-core.c
drivers/media/platform/exynos/fimc-is/fimc-is-device-companion.c
drivers/media/platform/exynos/fimc-is/fimc-is-device-ischain.c
drivers/media/platform/exynos/fimc-is/fimc-is-device-sensor.c

index 2d6fbdc3a2c39815f6cf9121a5c10c1f11059457..a66b3deef5a5e57406f91de144d71c31eab05a9b 100644 (file)
@@ -339,24 +339,15 @@ int read_from_firmware_version(void)
 
        if (!finfo->is_caldata_read) {
                if (finfo->bin_start_addr != 0x80000) {
-#if defined(CONFIG_PM_RUNTIME)
                        pr_debug("pm_runtime_suspended = %d\n",
                        pm_runtime_suspended(is_dev));
                        pm_runtime_get_sync(is_dev);
-#else
-                       fimc_is_runtime_resume(is_dev);
-                       printk(KERN_INFO "%s - fimc_is runtime resume complete\n", __func__);
-#endif
 
                        fimc_is_sec_fw_sel(sysfs_core, is_dev, fw_name, setf_name, false);
                        fimc_is_sec_concord_fw_sel(sysfs_core, is_dev, fw_name, master_setf_name, mode_setf_name);
-#if defined(CONFIG_PM_RUNTIME)
                        pm_runtime_put_sync(is_dev);
                        pr_debug("pm_runtime_suspended = %d\n",
                                pm_runtime_suspended(is_dev));
-#else
-                       fimc_is_runtime_suspend(is_dev);
-#endif
                }
        }
        return 0;
@@ -1031,9 +1022,7 @@ static int fimc_is_probe(struct platform_device *pdev)
                vb2_ion_attach_iommu(core->mem.alloc_ctx);
 #endif
 
-#if defined(CONFIG_PM_RUNTIME)
        pm_runtime_enable(&pdev->dev);
-#endif
 
        if (camera_class == NULL) {
                camera_class = class_create(THIS_MODULE, "camera");
@@ -1200,9 +1189,7 @@ static int fimc_is_probe(struct platform_device *pdev)
        return 0;
 
 p_err5:
-#if defined(CONFIG_PM_RUNTIME)
        __pm_runtime_disable(&pdev->dev, false);
-#endif
 p_err4:
        v4l2_device_unregister(&core->v4l2_dev);
 p_err3:
index d75a08e22ed975ec1627224f01eb2c06589d5305..bf004a9f76e817260c38615ae29a2c8a5ecbd2d3 100644 (file)
@@ -350,11 +350,7 @@ int fimc_is_companion_open(struct fimc_is_device_companion *device)
 
        device->companion_status = FIMC_IS_COMPANION_OPENNING;
        core->running_rear_camera = true;
-#if defined(CONFIG_PM_RUNTIME)
        pm_runtime_get_sync(&device->pdev->dev);
-#else
-       fimc_is_companion_runtime_resume(&device->pdev->dev);
-#endif
        ret = fimc_is_sec_fw_sel(core, &device->pdev->dev, fw_name, setf_name, false);
        if (ret < 0) {
                err("failed to select firmware (%d)", ret);
@@ -437,11 +433,7 @@ int fimc_is_companion_open(struct fimc_is_device_companion *device)
        return ret;
 
 p_err_pm:
-#if defined(CONFIG_PM_RUNTIME)
        pm_runtime_put_sync(&device->pdev->dev);
-#else
-       fimc_is_companion_runtime_suspend(&device->pdev->dev);
-#endif
 
 p_err:
        err("[COMP:D] open fail(%d)status(%d)", ret, device->companion_status);
@@ -465,7 +457,6 @@ int fimc_is_companion_close(struct fimc_is_device_companion *device)
                goto p_err;
        }
 
-#if defined(CONFIG_PM_RUNTIME)
        pm_runtime_put_sync(&device->pdev->dev);
 #if 0
        if (core != NULL && !test_bit(FIMC_IS_ISCHAIN_POWER_ON, &core->state)) {
@@ -483,9 +474,6 @@ int fimc_is_companion_close(struct fimc_is_device_companion *device)
                                        readl(PMUREG_CAM1_STATUS), readl(PMUREG_ISP_ARM_STATUS));
        }
 #endif
-#else
-       fimc_is_companion_runtime_suspend(&device->pdev->dev);
-#endif /* CONFIG_PM_RUNTIME */
 
        clear_bit(FIMC_IS_COMPANION_OPEN, &device->state);
 
@@ -568,9 +556,7 @@ static int fimc_is_companion_probe(struct platform_device *pdev)
                goto p_err;
        }
 
-#if defined(CONFIG_PM_RUNTIME)
        pm_runtime_enable(&pdev->dev);
-#endif
 
        info("[COMP:D] %s(%d)\n", __func__, ret);
 
index a2ba7f534e47cba03260fd7f1aa35cd9bd227b6a..cd90731008a94def1cb900d1e8d4d6baf7437103 100644 (file)
@@ -1270,9 +1270,7 @@ int fimc_is_ischain_power(struct fimc_is_device_ischain *device, int on)
        int i;
        int ret = 0;
        u32 debug;
-#if defined(CONFIG_PM_RUNTIME)
        int rpm_ret;
-#endif
        u32 val;
        char setf_name[100];
 
@@ -1286,15 +1284,10 @@ int fimc_is_ischain_power(struct fimc_is_device_ischain *device, int on)
                        fimc_is_ischain_forcedown(device, false);
 
                /* 2. FIMC-IS local power enable */
-#if defined(CONFIG_PM_RUNTIME)
                mdbgd_ischain("pm_runtime_suspended = %d\n", device, pm_runtime_suspended(dev));
                rpm_ret = pm_runtime_get_sync(dev);
                if (rpm_ret < 0)
                        err("pm_runtime_get_sync() return error: %d", rpm_ret);
-#else
-               fimc_is_runtime_resume(dev);
-               info("%s(%d) - fimc_is runtime resume complete\n", __func__, on);
-#endif
 
                {
                        fimc_is_sec_get_sysfs_finfo(&sysfs_finfo);
@@ -1371,7 +1364,6 @@ int fimc_is_ischain_power(struct fimc_is_device_ischain *device, int on)
                printk(KERN_INFO "%s: A5 state(0x%x)\n", __func__, debug);
 
                /* FIMC-IS local power down */
-#if defined(CONFIG_PM_RUNTIME)
                rpm_ret = pm_runtime_put_sync(dev);
                if (rpm_ret < 0)
                        err("pm_runtime_put_sync() return error: %d", rpm_ret);
@@ -1382,11 +1374,6 @@ int fimc_is_ischain_power(struct fimc_is_device_ischain *device, int on)
 
                        fimc_is_a5_power(dev, 0);
                }
-#else
-               fimc_is_a5_power(dev, 0);
-
-               fimc_is_runtime_suspend(dev);
-#endif
                clear_bit(FIMC_IS_ISCHAIN_POWER_ON, &device->state);
 
                /* for mideaserver force down */
@@ -1397,11 +1384,7 @@ int fimc_is_ischain_power(struct fimc_is_device_ischain *device, int on)
        return ret;
 
 p_err_pm:
-#if defined(CONFIG_PM_RUNTIME)
        pm_runtime_put_sync(dev);
-#else
-       fimc_is_runtime_suspend(dev);
-#endif
 
        return ret;
 }
index 021a9caf89de13d417775661679fcfe8731550ba..84af2055e74e4c68671431bfc6c78247e641a576 100644 (file)
@@ -818,9 +818,7 @@ static int fimc_is_sensor_probe(struct platform_device *pdev)
                vb2_ion_attach_iommu(device->mem.alloc_ctx);
 #endif
 
-#if defined(CONFIG_PM_RUNTIME)
        pm_runtime_enable(&pdev->dev);
-#endif
 
        ret = v4l2_device_register(&pdev->dev, &device->v4l2_dev);
        if (ret) {
@@ -932,11 +930,7 @@ int fimc_is_sensor_open(struct fimc_is_device_sensor *device,
                goto p_err;
        }
 
-#ifdef CONFIG_PM_RUNTIME
        pm_runtime_get_sync(&device->pdev->dev);
-#else
-       fimc_is_sensor_runtime_resume(&device->pdev->dev);
-#endif
 
 #ifdef ENABLE_DTP
        device->dtp_check = true;
@@ -994,11 +988,7 @@ int fimc_is_sensor_close(struct fimc_is_device_sensor *device)
        if (ret)
                merr("fimc_is_flite_close is fail(%d)", device, ret);
 
-#if defined(CONFIG_PM_RUNTIME)
        pm_runtime_put_sync(&device->pdev->dev);
-#else
-       fimc_is_sensor_runtime_suspend(&device->pdev->dev);
-#endif
 
        /* cancel a work and wait for it to finish */
        cancel_work_sync(&device->control_work);