diff options
Diffstat (limited to 'include/media/soc_camera.h')
-rw-r--r-- | include/media/soc_camera.h | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 3d74e60032dd..dcc5b86bcb6c 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -24,18 +24,13 @@ struct soc_camera_device { | |||
24 | struct device *pdev; /* Platform device */ | 24 | struct device *pdev; /* Platform device */ |
25 | s32 user_width; | 25 | s32 user_width; |
26 | s32 user_height; | 26 | s32 user_height; |
27 | unsigned short width_min; | 27 | enum v4l2_colorspace colorspace; |
28 | unsigned short height_min; | ||
29 | unsigned short y_skip_top; /* Lines to skip at the top */ | ||
30 | unsigned char iface; /* Host number */ | 28 | unsigned char iface; /* Host number */ |
31 | unsigned char devnum; /* Device number per host */ | 29 | unsigned char devnum; /* Device number per host */ |
32 | unsigned char buswidth; /* See comment in .c */ | ||
33 | struct soc_camera_sense *sense; /* See comment in struct definition */ | 30 | struct soc_camera_sense *sense; /* See comment in struct definition */ |
34 | struct soc_camera_ops *ops; | 31 | struct soc_camera_ops *ops; |
35 | struct video_device *vdev; | 32 | struct video_device *vdev; |
36 | const struct soc_camera_data_format *current_fmt; | 33 | const struct soc_camera_format_xlate *current_fmt; |
37 | const struct soc_camera_data_format *formats; | ||
38 | int num_formats; | ||
39 | struct soc_camera_format_xlate *user_formats; | 34 | struct soc_camera_format_xlate *user_formats; |
40 | int num_user_formats; | 35 | int num_user_formats; |
41 | enum v4l2_field field; /* Preserve field over close() */ | 36 | enum v4l2_field field; /* Preserve field over close() */ |
@@ -107,6 +102,8 @@ struct soc_camera_link { | |||
107 | int i2c_adapter_id; | 102 | int i2c_adapter_id; |
108 | struct i2c_board_info *board_info; | 103 | struct i2c_board_info *board_info; |
109 | const char *module_name; | 104 | const char *module_name; |
105 | void *priv; | ||
106 | |||
110 | /* | 107 | /* |
111 | * For non-I2C devices platform platform has to provide methods to | 108 | * For non-I2C devices platform platform has to provide methods to |
112 | * add a device to the system and to remove | 109 | * add a device to the system and to remove |
@@ -162,23 +159,13 @@ static inline struct v4l2_subdev *soc_camera_to_subdev( | |||
162 | int soc_camera_host_register(struct soc_camera_host *ici); | 159 | int soc_camera_host_register(struct soc_camera_host *ici); |
163 | void soc_camera_host_unregister(struct soc_camera_host *ici); | 160 | void soc_camera_host_unregister(struct soc_camera_host *ici); |
164 | 161 | ||
165 | const struct soc_camera_data_format *soc_camera_format_by_fourcc( | ||
166 | struct soc_camera_device *icd, unsigned int fourcc); | ||
167 | const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc( | 162 | const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc( |
168 | struct soc_camera_device *icd, unsigned int fourcc); | 163 | struct soc_camera_device *icd, unsigned int fourcc); |
169 | 164 | ||
170 | struct soc_camera_data_format { | ||
171 | const char *name; | ||
172 | unsigned int depth; | ||
173 | __u32 fourcc; | ||
174 | enum v4l2_colorspace colorspace; | ||
175 | }; | ||
176 | |||
177 | /** | 165 | /** |
178 | * struct soc_camera_format_xlate - match between host and sensor formats | 166 | * struct soc_camera_format_xlate - match between host and sensor formats |
179 | * @cam_fmt: sensor format provided by the sensor | 167 | * @code: code of a sensor provided format |
180 | * @host_fmt: host format after host translation from cam_fmt | 168 | * @host_fmt: host format after host translation from code |
181 | * @buswidth: bus width for this format | ||
182 | * | 169 | * |
183 | * Host and sensor translation structure. Used in table of host and sensor | 170 | * Host and sensor translation structure. Used in table of host and sensor |
184 | * formats matchings in soc_camera_device. A host can override the generic list | 171 | * formats matchings in soc_camera_device. A host can override the generic list |
@@ -186,9 +173,8 @@ struct soc_camera_data_format { | |||
186 | * format setup. | 173 | * format setup. |
187 | */ | 174 | */ |
188 | struct soc_camera_format_xlate { | 175 | struct soc_camera_format_xlate { |
189 | const struct soc_camera_data_format *cam_fmt; | 176 | enum v4l2_mbus_pixelcode code; |
190 | const struct soc_camera_data_format *host_fmt; | 177 | const struct soc_mbus_pixelfmt *host_fmt; |
191 | unsigned char buswidth; | ||
192 | }; | 178 | }; |
193 | 179 | ||
194 | struct soc_camera_ops { | 180 | struct soc_camera_ops { |