/* * omap4iss_csi2_init - Routine for module driver init */ int omap4iss_csi2_init(struct iss_device *iss) { struct iss_csi2_device *csi2a = &iss->csi2a; struct iss_csi2_device *csi2b = &iss->csi2b; int ret; csi2a->iss = iss; csi2a->available = 1; csi2a->regs1 = OMAP4_ISS_MEM_CSI2_A_REGS1; csi2a->phy = &iss->csiphy1; csi2a->subclk = OMAP4_ISS_SUBCLK_CSI2_A; csi2a->state = ISS_PIPELINE_STREAM_STOPPED; init_waitqueue_head(&csi2a->wait); ret = csi2_init_entities(csi2a, "a"); if (ret < 0) return ret; csi2b->iss = iss; csi2b->available = 1; csi2b->regs1 = OMAP4_ISS_MEM_CSI2_B_REGS1; csi2b->phy = &iss->csiphy2; csi2b->subclk = OMAP4_ISS_SUBCLK_CSI2_B; csi2b->state = ISS_PIPELINE_STREAM_STOPPED; init_waitqueue_head(&csi2b->wait); ret = csi2_init_entities(csi2b, "b"); if (ret < 0) return ret; return 0; }
/* * omap3isp_csi2_init - Routine for module driver init */ int omap3isp_csi2_init(struct isp_device *isp) { struct isp_csi2_device *csi2a = &isp->isp_csi2a; struct isp_csi2_device *csi2c = &isp->isp_csi2c; int ret; csi2a->isp = isp; csi2a->available = 1; csi2a->regs1 = OMAP3_ISP_IOMEM_CSI2A_REGS1; csi2a->regs2 = OMAP3_ISP_IOMEM_CSI2A_REGS2; csi2a->phy = &isp->isp_csiphy2; csi2a->state = ISP_PIPELINE_STREAM_STOPPED; init_waitqueue_head(&csi2a->wait); ret = csi2_init_entities(csi2a); if (ret < 0) return ret; if (isp->revision == ISP_REVISION_15_0) { csi2c->isp = isp; csi2c->available = 1; csi2c->regs1 = OMAP3_ISP_IOMEM_CSI2C_REGS1; csi2c->regs2 = OMAP3_ISP_IOMEM_CSI2C_REGS2; csi2c->phy = &isp->isp_csiphy1; csi2c->state = ISP_PIPELINE_STREAM_STOPPED; init_waitqueue_head(&csi2c->wait); } return 0; }
/* * omap4iss_csi2_init - Routine for module driver init */ int omap4iss_csi2_init(struct iss_device *iss) { struct iss_csi2_device *csi2a = &iss->csi2a; int ret; csi2a->iss = iss; csi2a->available = 1; csi2a->regs1 = iss->regs[OMAP4_ISS_MEM_CSI2_A_REGS1]; csi2a->phy = &iss->csiphy1; csi2a->state = ISS_PIPELINE_STREAM_STOPPED; init_waitqueue_head(&csi2a->wait); ret = csi2_init_entities(csi2a); if (ret < 0) goto fail; return 0; fail: omap4iss_csi2_cleanup(iss); return ret; }