summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp/ispcsi2.c
diff options
context:
space:
mode:
authorSakari Ailus2017-03-04 10:52:40 +0100
committerMauro Carvalho Chehab2017-08-20 14:17:38 +0200
commit7e1db599b99655af2b2cbeaf14aab1a07d84fc6d (patch)
treeb17fa884e2f73653af59602279bcbbf43686138a /drivers/media/platform/omap3isp/ispcsi2.c
parentmedia: omap3isp: Always initialise isp and mutex for csiphy1 (diff)
downloadkernel-qcow2-linux-7e1db599b99655af2b2cbeaf14aab1a07d84fc6d.tar.gz
kernel-qcow2-linux-7e1db599b99655af2b2cbeaf14aab1a07d84fc6d.tar.xz
kernel-qcow2-linux-7e1db599b99655af2b2cbeaf14aab1a07d84fc6d.zip
media: omap3isp: csiphy: Don't assume the CSI receiver is a CSI2 module
The CSI PHY is associated with a CSI receiver. The code assumes this receiver is a CSI2 module and relies on the CSI2 module object heavily to access the ISP or pipeline objects. However, the receiver could also be a CSI1/CCP2 module. Pass a new CSI receiver entity pointer to the CSI PHY acquire function, and replace all hardcoded usage of the CSI2 module with that CSI receiver entity. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # on Beagleboard-xM + MPT9P031 Acked-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/omap3isp/ispcsi2.c')
-rw-r--r--drivers/media/platform/omap3isp/ispcsi2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/omap3isp/ispcsi2.c b/drivers/media/platform/omap3isp/ispcsi2.c
index 7dae2fe0d42d..3ec37fed710b 100644
--- a/drivers/media/platform/omap3isp/ispcsi2.c
+++ b/drivers/media/platform/omap3isp/ispcsi2.c
@@ -490,7 +490,7 @@ int omap3isp_csi2_reset(struct isp_csi2_device *csi2)
if (!csi2->available)
return -ENODEV;
- if (csi2->phy->phy_in_use)
+ if (csi2->phy->entity)
return -EBUSY;
isp_reg_set(isp, csi2->regs1, ISPCSI2_SYSCONFIG,
@@ -1053,7 +1053,7 @@ static int csi2_set_stream(struct v4l2_subdev *sd, int enable)
switch (enable) {
case ISP_PIPELINE_STREAM_CONTINUOUS:
- if (omap3isp_csiphy_acquire(csi2->phy) < 0)
+ if (omap3isp_csiphy_acquire(csi2->phy, &sd->entity) < 0)
return -ENODEV;
if (csi2->output & CSI2_OUTPUT_MEMORY)
omap3isp_sbl_enable(isp, OMAP3_ISP_SBL_CSI2A_WRITE);