diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2017-03-04 04:52:40 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-08-20 08:17:38 -0400 |
commit | 7e1db599b99655af2b2cbeaf14aab1a07d84fc6d (patch) | |
tree | b17fa884e2f73653af59602279bcbbf43686138a /drivers/media/platform/omap3isp/ispcsiphy.h | |
parent | 19be9fd67c2574304717559293f717d7d0328842 (diff) | |
download | linux-7e1db599b99655af2b2cbeaf14aab1a07d84fc6d.tar.gz |
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/ispcsiphy.h')
-rw-r--r-- | drivers/media/platform/omap3isp/ispcsiphy.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/platform/omap3isp/ispcsiphy.h b/drivers/media/platform/omap3isp/ispcsiphy.h index 978ca5c80a6c..91543a09b28a 100644 --- a/drivers/media/platform/omap3isp/ispcsiphy.h +++ b/drivers/media/platform/omap3isp/ispcsiphy.h @@ -25,9 +25,10 @@ struct regulator; struct isp_csiphy { struct isp_device *isp; struct mutex mutex; /* serialize csiphy configuration */ - u8 phy_in_use; struct isp_csi2_device *csi2; struct regulator *vdd; + /* the entity that acquired the phy */ + struct media_entity *entity; /* mem resources - enums as defined in enum isp_mem_resources */ unsigned int cfg_regs; @@ -36,7 +37,8 @@ struct isp_csiphy { u8 num_data_lanes; /* number of CSI2 Data Lanes supported */ }; -int omap3isp_csiphy_acquire(struct isp_csiphy *phy); +int omap3isp_csiphy_acquire(struct isp_csiphy *phy, + struct media_entity *entity); void omap3isp_csiphy_release(struct isp_csiphy *phy); int omap3isp_csiphy_init(struct isp_device *isp); void omap3isp_csiphy_cleanup(struct isp_device *isp); |