.. | .. |
---|
8 | 8 | #define _MCAM_CORE_H |
---|
9 | 9 | |
---|
10 | 10 | #include <linux/list.h> |
---|
| 11 | +#include <linux/clk-provider.h> |
---|
11 | 12 | #include <media/v4l2-common.h> |
---|
12 | 13 | #include <media/v4l2-ctrls.h> |
---|
13 | 14 | #include <media/v4l2-dev.h> |
---|
.. | .. |
---|
102 | 103 | * These fields should be set by the platform code prior to |
---|
103 | 104 | * calling mcam_register(). |
---|
104 | 105 | */ |
---|
105 | | - struct i2c_adapter *i2c_adapter; |
---|
106 | 106 | unsigned char __iomem *regs; |
---|
107 | 107 | unsigned regs_size; /* size in bytes of the register space */ |
---|
108 | 108 | spinlock_t dev_lock; |
---|
109 | 109 | struct device *dev; /* For messages, dma alloc */ |
---|
110 | 110 | enum mcam_chip_id chip_id; |
---|
111 | | - short int clock_speed; /* Sensor clock speed, default 30 */ |
---|
112 | | - short int use_smbus; /* SMBUS or straight I2c? */ |
---|
113 | 111 | enum mcam_buffer_mode buffer_mode; |
---|
114 | 112 | |
---|
115 | | - int mclk_min; /* The minimal value of mclk */ |
---|
116 | 113 | int mclk_src; /* which clock source the mclk derives from */ |
---|
117 | 114 | int mclk_div; /* Clock Divider Value for MCLK */ |
---|
118 | 115 | |
---|
119 | | - int ccic_id; |
---|
120 | 116 | enum v4l2_mbus_type bus_type; |
---|
121 | 117 | /* MIPI support */ |
---|
122 | 118 | /* The dphy config value, allocated in board file |
---|
.. | .. |
---|
130 | 126 | |
---|
131 | 127 | /* clock tree support */ |
---|
132 | 128 | struct clk *clk[NR_MCAM_CLK]; |
---|
| 129 | + struct clk_hw mclk_hw; |
---|
| 130 | + struct clk *mclk; |
---|
133 | 131 | |
---|
134 | 132 | /* |
---|
135 | 133 | * Callbacks from the core to the platform code. |
---|
.. | .. |
---|
137 | 135 | int (*plat_power_up) (struct mcam_camera *cam); |
---|
138 | 136 | void (*plat_power_down) (struct mcam_camera *cam); |
---|
139 | 137 | void (*calc_dphy) (struct mcam_camera *cam); |
---|
140 | | - void (*ctlr_reset) (struct mcam_camera *cam); |
---|
141 | 138 | |
---|
142 | 139 | /* |
---|
143 | 140 | * Everything below here is private to the mcam core and |
---|
.. | .. |
---|
153 | 150 | * Subsystem structures. |
---|
154 | 151 | */ |
---|
155 | 152 | struct video_device vdev; |
---|
| 153 | + struct v4l2_async_notifier notifier; |
---|
| 154 | + struct v4l2_async_subdev asd; |
---|
156 | 155 | struct v4l2_subdev *sensor; |
---|
157 | | - unsigned short sensor_addr; |
---|
158 | 156 | |
---|
159 | 157 | /* Videobuf2 stuff */ |
---|
160 | 158 | struct vb2_queue vb_queue; |
---|
.. | .. |
---|
238 | 236 | int mccic_register(struct mcam_camera *cam); |
---|
239 | 237 | int mccic_irq(struct mcam_camera *cam, unsigned int irqs); |
---|
240 | 238 | void mccic_shutdown(struct mcam_camera *cam); |
---|
241 | | -#ifdef CONFIG_PM |
---|
242 | 239 | void mccic_suspend(struct mcam_camera *cam); |
---|
243 | 240 | int mccic_resume(struct mcam_camera *cam); |
---|
244 | | -#endif |
---|
245 | 241 | |
---|
246 | 242 | /* |
---|
247 | 243 | * Register definitions for the m88alp01 camera interface. Offsets in bytes |
---|