xref: /linux/drivers/media/platform/ti/omap3isp/ispcsiphy.h (revision 0a94608f0f7de9b1135ffea3546afe68eafef57f)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * ispcsiphy.h
4  *
5  * TI OMAP3 ISP - CSI PHY module
6  *
7  * Copyright (C) 2010 Nokia Corporation
8  * Copyright (C) 2009 Texas Instruments, Inc.
9  *
10  * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
11  *	     Sakari Ailus <sakari.ailus@iki.fi>
12  */
13 
14 #ifndef OMAP3_ISP_CSI_PHY_H
15 #define OMAP3_ISP_CSI_PHY_H
16 
17 #include "omap3isp.h"
18 
19 struct isp_csi2_device;
20 struct regulator;
21 
22 struct isp_csiphy {
23 	struct isp_device *isp;
24 	struct mutex mutex;	/* serialize csiphy configuration */
25 	struct isp_csi2_device *csi2;
26 	struct regulator *vdd;
27 	/* the entity that acquired the phy */
28 	struct media_entity *entity;
29 
30 	/* mem resources - enums as defined in enum isp_mem_resources */
31 	unsigned int cfg_regs;
32 	unsigned int phy_regs;
33 
34 	u8 num_data_lanes;	/* number of CSI2 Data Lanes supported */
35 };
36 
37 int omap3isp_csiphy_acquire(struct isp_csiphy *phy,
38 			    struct media_entity *entity);
39 void omap3isp_csiphy_release(struct isp_csiphy *phy);
40 int omap3isp_csiphy_init(struct isp_device *isp);
41 void omap3isp_csiphy_cleanup(struct isp_device *isp);
42 
43 #endif	/* OMAP3_ISP_CSI_PHY_H */
44