diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-06-20 10:49:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-24 13:05:30 -0400 |
commit | 901ecb02113757df8a1b6a6ff29c6941baeec3df (patch) | |
tree | 2f43b05e63fa0e7a1770e31356c69651e4969ed9 /drivers/media/platform | |
parent | 03aedb1d2cd7d137c01b5e33eabbf58a48266a3b (diff) |
media: marvell-ccic: only calculate the DPHY registers when needed
Avoid pointlessly calling calc_dphy() when the bus is not
V4L2_MBUS_CSI2_DPHY. This will make it easier to replace the platform data
with devicetree.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/marvell-ccic/mcam-core.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c index f9ac1547d093..dc30c48d4671 100644 --- a/drivers/media/platform/marvell-ccic/mcam-core.c +++ b/drivers/media/platform/marvell-ccic/mcam-core.c @@ -285,6 +285,8 @@ static void mcam_ctlr_stop(struct mcam_camera *cam) static void mcam_enable_mipi(struct mcam_camera *mcam) { /* Using MIPI mode and enable MIPI */ + if (mcam->calc_dphy) + mcam->calc_dphy(mcam); cam_dbg(mcam, "camera: DPHY3=0x%x, DPHY5=0x%x, DPHY6=0x%x\n", mcam->dphy[0], mcam->dphy[1], mcam->dphy[2]); mcam_reg_write(mcam, REG_CSI2_DPHY3, mcam->dphy[0]); @@ -1078,13 +1080,6 @@ static int mcam_read_setup(struct mcam_camera *cam) spin_lock_irqsave(&cam->dev_lock, flags); clear_bit(CF_DMA_ACTIVE, &cam->flags); mcam_reset_buffers(cam); - /* - * Update CSI2_DPHY value - */ - if (cam->calc_dphy) - cam->calc_dphy(cam); - cam_dbg(cam, "camera: DPHY sets: dphy3=0x%x, dphy5=0x%x, dphy6=0x%x\n", - cam->dphy[0], cam->dphy[1], cam->dphy[2]); if (cam->bus_type == V4L2_MBUS_CSI2_DPHY) mcam_enable_mipi(cam); else |