aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
Diffstat (limited to 'include/media')
-rw-r--r--include/media/soc_camera.h25
-rw-r--r--include/media/soc_camera_platform.h2
2 files changed, 7 insertions, 20 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 831efffaf2ae..dcc5b86bcb6c 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -24,15 +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 enum v4l2_colorspace colorspace;
27 unsigned char iface; /* Host number */ 28 unsigned char iface; /* Host number */
28 unsigned char devnum; /* Device number per host */ 29 unsigned char devnum; /* Device number per host */
29 unsigned char buswidth; /* See comment in .c */
30 struct soc_camera_sense *sense; /* See comment in struct definition */ 30 struct soc_camera_sense *sense; /* See comment in struct definition */
31 struct soc_camera_ops *ops; 31 struct soc_camera_ops *ops;
32 struct video_device *vdev; 32 struct video_device *vdev;
33 const struct soc_camera_data_format *current_fmt; 33 const struct soc_camera_format_xlate *current_fmt;
34 const struct soc_camera_data_format *formats;
35 int num_formats;
36 struct soc_camera_format_xlate *user_formats; 34 struct soc_camera_format_xlate *user_formats;
37 int num_user_formats; 35 int num_user_formats;
38 enum v4l2_field field; /* Preserve field over close() */ 36 enum v4l2_field field; /* Preserve field over close() */
@@ -161,23 +159,13 @@ static inline struct v4l2_subdev *soc_camera_to_subdev(
161int soc_camera_host_register(struct soc_camera_host *ici); 159int soc_camera_host_register(struct soc_camera_host *ici);
162void soc_camera_host_unregister(struct soc_camera_host *ici); 160void soc_camera_host_unregister(struct soc_camera_host *ici);
163 161
164const struct soc_camera_data_format *soc_camera_format_by_fourcc(
165 struct soc_camera_device *icd, unsigned int fourcc);
166const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc( 162const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc(
167 struct soc_camera_device *icd, unsigned int fourcc); 163 struct soc_camera_device *icd, unsigned int fourcc);
168 164
169struct soc_camera_data_format {
170 const char *name;
171 unsigned int depth;
172 __u32 fourcc;
173 enum v4l2_colorspace colorspace;
174};
175
176/** 165/**
177 * struct soc_camera_format_xlate - match between host and sensor formats 166 * struct soc_camera_format_xlate - match between host and sensor formats
178 * @cam_fmt: sensor format provided by the sensor 167 * @code: code of a sensor provided format
179 * @host_fmt: host format after host translation from cam_fmt 168 * @host_fmt: host format after host translation from code
180 * @buswidth: bus width for this format
181 * 169 *
182 * 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
183 * 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
@@ -185,9 +173,8 @@ struct soc_camera_data_format {
185 * format setup. 173 * format setup.
186 */ 174 */
187struct soc_camera_format_xlate { 175struct soc_camera_format_xlate {
188 const struct soc_camera_data_format *cam_fmt; 176 enum v4l2_mbus_pixelcode code;
189 const struct soc_camera_data_format *host_fmt; 177 const struct soc_mbus_pixelfmt *host_fmt;
190 unsigned char buswidth;
191}; 178};
192 179
193struct soc_camera_ops { 180struct soc_camera_ops {
diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h
index 88b3b5747f62..0ecefe227b76 100644
--- a/include/media/soc_camera_platform.h
+++ b/include/media/soc_camera_platform.h
@@ -19,7 +19,7 @@ struct device;
19struct soc_camera_platform_info { 19struct soc_camera_platform_info {
20 const char *format_name; 20 const char *format_name;
21 unsigned long format_depth; 21 unsigned long format_depth;
22 struct v4l2_pix_format format; 22 struct v4l2_mbus_framefmt format;
23 unsigned long bus_param; 23 unsigned long bus_param;
24 struct device *dev; 24 struct device *dev;
25 int (*set_capture)(struct soc_camera_platform_info *info, int enable); 25 int (*set_capture)(struct soc_camera_platform_info *info, int enable);