mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
camera: rockchip: camsys_drv: v0.0x30.0
rk3326 and other platform power management implementation Change-Id: I34b9c773cfee1e684e833cdbcf687ac54cd8d88a Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
This commit is contained in:
parent
a1065a4d6c
commit
9d76b2eb09
|
|
@ -212,9 +212,11 @@
|
|||
CSIHOST_PHY_SHUTDOWNZ and CSIHOST_DPHY_RSTZ is
|
||||
csi host control interface;so DPHY_RX1_SRC_SEL_MASK
|
||||
should be set DPHY_RX1_SRC_SEL_CSI.
|
||||
*v0.0x30.0:
|
||||
1) rk3326 and other platform power management implementation.
|
||||
*/
|
||||
|
||||
#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0, 0x29, 0)
|
||||
#define CAMSYS_DRIVER_VERSION KERNEL_VERSION(0, 0x30, 0)
|
||||
|
||||
#define CAMSYS_PLATFORM_DRV_NAME "RockChip-CamSys"
|
||||
#define CAMSYS_PLATFORM_MARVIN_NAME "Platform_MarvinDev"
|
||||
|
|
|
|||
|
|
@ -652,13 +652,14 @@ static int camsys_mrv_clkin_cb(void *ptr, unsigned int on)
|
|||
clk_prepare_enable(clk->clk_mipi_24m);
|
||||
}
|
||||
clk->in_on = true;
|
||||
|
||||
pm_runtime_get_sync(&camsys_dev->pdev->dev);
|
||||
camsys_trace(1, "%s clock(f: %ld Hz) in turn on",
|
||||
dev_name(camsys_dev->miscdev.this_device), isp_clk);
|
||||
camsys_mrv_reset_cb(ptr, 1);
|
||||
udelay(100);
|
||||
camsys_mrv_reset_cb(ptr, 0);
|
||||
} else if (!on && clk->in_on) {
|
||||
pm_runtime_put_sync(&camsys_dev->pdev->dev);
|
||||
clk_disable_unprepare(clk->aclk_isp);
|
||||
clk_disable_unprepare(clk->hclk_isp);
|
||||
clk_disable_unprepare(clk->isp);
|
||||
|
|
@ -929,8 +930,7 @@ static int camsys_mrv_remove_cb(struct platform_device *pdev)
|
|||
if (!IS_ERR_OR_NULL(mrv_clk->pclkin_isp1)) {
|
||||
devm_clk_put(&pdev->dev, mrv_clk->pclkin_isp1);
|
||||
}
|
||||
if (CHIP_TYPE == 3399)
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
kfree(mrv_clk);
|
||||
mrv_clk = NULL;
|
||||
}
|
||||
|
|
@ -975,6 +975,7 @@ int camsys_mrv_probe_cb(struct platform_device *pdev, camsys_dev_t *camsys_dev)
|
|||
}
|
||||
if (CHIP_TYPE == 3368 || CHIP_TYPE == 3366 ||
|
||||
CHIP_TYPE == 3326) {
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
/* mrv_clk->pd_isp = devm_clk_get(&pdev->dev, "pd_isp"); */
|
||||
mrv_clk->aclk_isp = devm_clk_get(&pdev->dev, "aclk_isp");
|
||||
mrv_clk->hclk_isp = devm_clk_get(&pdev->dev, "hclk_isp");
|
||||
|
|
@ -1081,6 +1082,7 @@ int camsys_mrv_probe_cb(struct platform_device *pdev, camsys_dev_t *camsys_dev)
|
|||
}
|
||||
}
|
||||
} else{
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
/*mrv_clk->pd_isp = */
|
||||
/* devm_clk_get(&pdev->dev, "pd_isp");*/
|
||||
mrv_clk->aclk_isp =
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user