Lines Matching refs:cam
61 struct mmp_camera *cam = mcam_to_cam(mcam); in mmpcam_calc_dphy() local
62 struct mmp_camera_platform_data *pdata = cam->pdev->dev.platform_data; in mmpcam_calc_dphy()
63 struct device *dev = &cam->pdev->dev; in mmpcam_calc_dphy()
121 if (IS_ERR(cam->mipi_clk)) in mmpcam_calc_dphy()
125 clk_prepare_enable(cam->mipi_clk); in mmpcam_calc_dphy()
126 tx_clk_esc = (clk_get_rate(cam->mipi_clk) / 1000000) / 12; in mmpcam_calc_dphy()
127 clk_disable_unprepare(cam->mipi_clk); in mmpcam_calc_dphy()
178 struct mmp_camera *cam; in mmpcam_probe() local
186 cam = devm_kzalloc(&pdev->dev, sizeof(*cam), GFP_KERNEL); in mmpcam_probe()
187 if (cam == NULL) in mmpcam_probe()
189 platform_set_drvdata(pdev, cam); in mmpcam_probe()
190 cam->pdev = pdev; in mmpcam_probe()
191 INIT_LIST_HEAD(&cam->devlist); in mmpcam_probe()
193 mcam = &cam->mcam; in mmpcam_probe()
214 cam->mipi_clk = devm_clk_get(mcam->dev, "mipi"); in mmpcam_probe()
215 if ((IS_ERR(cam->mipi_clk) && mcam->dphy[2] == 0)) in mmpcam_probe()
216 return PTR_ERR(cam->mipi_clk); in mmpcam_probe()
276 cam->irq = ret; in mmpcam_probe()
277 ret = devm_request_irq(&pdev->dev, cam->irq, mmpcam_irq, IRQF_SHARED, in mmpcam_probe()
291 static int mmpcam_remove(struct mmp_camera *cam) in mmpcam_remove() argument
293 struct mcam_camera *mcam = &cam->mcam; in mmpcam_remove()
302 struct mmp_camera *cam = platform_get_drvdata(pdev); in mmpcam_platform_remove() local
304 if (cam == NULL) in mmpcam_platform_remove()
306 return mmpcam_remove(cam); in mmpcam_platform_remove()
315 struct mmp_camera *cam = dev_get_drvdata(dev); in mmpcam_runtime_resume() local
316 struct mcam_camera *mcam = &cam->mcam; in mmpcam_runtime_resume()
329 struct mmp_camera *cam = dev_get_drvdata(dev); in mmpcam_runtime_suspend() local
330 struct mcam_camera *mcam = &cam->mcam; in mmpcam_runtime_suspend()
343 struct mmp_camera *cam = dev_get_drvdata(dev); in mmpcam_suspend() local
346 mccic_suspend(&cam->mcam); in mmpcam_suspend()
352 struct mmp_camera *cam = dev_get_drvdata(dev); in mmpcam_resume() local
355 return mccic_resume(&cam->mcam); in mmpcam_resume()