forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/media/platform/marvell-ccic/mcam-core.h
....@@ -8,6 +8,7 @@
88 #define _MCAM_CORE_H
99
1010 #include <linux/list.h>
11
+#include <linux/clk-provider.h>
1112 #include <media/v4l2-common.h>
1213 #include <media/v4l2-ctrls.h>
1314 #include <media/v4l2-dev.h>
....@@ -102,21 +103,16 @@
102103 * These fields should be set by the platform code prior to
103104 * calling mcam_register().
104105 */
105
- struct i2c_adapter *i2c_adapter;
106106 unsigned char __iomem *regs;
107107 unsigned regs_size; /* size in bytes of the register space */
108108 spinlock_t dev_lock;
109109 struct device *dev; /* For messages, dma alloc */
110110 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? */
113111 enum mcam_buffer_mode buffer_mode;
114112
115
- int mclk_min; /* The minimal value of mclk */
116113 int mclk_src; /* which clock source the mclk derives from */
117114 int mclk_div; /* Clock Divider Value for MCLK */
118115
119
- int ccic_id;
120116 enum v4l2_mbus_type bus_type;
121117 /* MIPI support */
122118 /* The dphy config value, allocated in board file
....@@ -130,6 +126,8 @@
130126
131127 /* clock tree support */
132128 struct clk *clk[NR_MCAM_CLK];
129
+ struct clk_hw mclk_hw;
130
+ struct clk *mclk;
133131
134132 /*
135133 * Callbacks from the core to the platform code.
....@@ -137,7 +135,6 @@
137135 int (*plat_power_up) (struct mcam_camera *cam);
138136 void (*plat_power_down) (struct mcam_camera *cam);
139137 void (*calc_dphy) (struct mcam_camera *cam);
140
- void (*ctlr_reset) (struct mcam_camera *cam);
141138
142139 /*
143140 * Everything below here is private to the mcam core and
....@@ -153,8 +150,9 @@
153150 * Subsystem structures.
154151 */
155152 struct video_device vdev;
153
+ struct v4l2_async_notifier notifier;
154
+ struct v4l2_async_subdev asd;
156155 struct v4l2_subdev *sensor;
157
- unsigned short sensor_addr;
158156
159157 /* Videobuf2 stuff */
160158 struct vb2_queue vb_queue;
....@@ -238,10 +236,8 @@
238236 int mccic_register(struct mcam_camera *cam);
239237 int mccic_irq(struct mcam_camera *cam, unsigned int irqs);
240238 void mccic_shutdown(struct mcam_camera *cam);
241
-#ifdef CONFIG_PM
242239 void mccic_suspend(struct mcam_camera *cam);
243240 int mccic_resume(struct mcam_camera *cam);
244
-#endif
245241
246242 /*
247243 * Register definitions for the m88alp01 camera interface. Offsets in bytes