From 11e3d1adbe0246fc8d6c06f7e42aff5bead25670 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 11 Dec 2009 11:06:00 -0300 Subject: V4L/DVB (13643): soc-camera: remove no longer needed struct members Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- include/media/soc_camera.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/media/soc_camera.h') diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 3d74e60032dd..c5afc8cf8e1a 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h @@ -24,8 +24,6 @@ struct soc_camera_device { struct device *pdev; /* Platform device */ s32 user_width; s32 user_height; - unsigned short width_min; - unsigned short height_min; unsigned short y_skip_top; /* Lines to skip at the top */ unsigned char iface; /* Host number */ unsigned char devnum; /* Device number per host */ -- cgit v1.2.3 From 325361088b73269f4cc96256276a142addbf3454 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 11 Dec 2009 11:14:46 -0300 Subject: V4L/DVB (13644): v4l: add new v4l2-subdev sensor operations, use g_skip_top_lines in soc-camera Introduce new v4l2-subdev sensor operations, move .enum_framesizes() and .enum_frameintervals() methods to it, add a new .g_skip_top_lines() method and switch soc-camera to use it instead of .y_skip_top soc_camera_device member, which can now be removed. Signed-off-by: Guennadi Liakhovetski Reviewed-by: Hans Verkuil Reviewed-by: Sergio Aguirre Signed-off-by: Mauro Carvalho Chehab --- include/media/soc_camera.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/media/soc_camera.h') diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index c5afc8cf8e1a..218639f133d3 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h @@ -24,7 +24,6 @@ struct soc_camera_device { struct device *pdev; /* Platform device */ s32 user_width; s32 user_height; - unsigned short y_skip_top; /* Lines to skip at the top */ unsigned char iface; /* Host number */ unsigned char devnum; /* Device number per host */ unsigned char buswidth; /* See comment in .c */ -- cgit v1.2.3 From 3fd7ceffddd52c2f8c004a7999ccb705d592cbfd Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 11 Dec 2009 11:15:06 -0300 Subject: V4L/DVB (13648): soc-camera: add a private field to struct soc_camera_link Up to now, if a client driver needed platform data apart from those contained in struct soc_camera_link, it had to embed the struct into its own object. This makes the use of such a driver in configurations other than soc-camera Signed-off-by: Mauro Carvalho Chehab --- include/media/soc_camera.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/media/soc_camera.h') diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 218639f133d3..831efffaf2ae 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h @@ -104,6 +104,8 @@ struct soc_camera_link { int i2c_adapter_id; struct i2c_board_info *board_info; const char *module_name; + void *priv; + /* * For non-I2C devices platform platform has to provide methods to * add a device to the system and to remove -- cgit v1.2.3 From 760697beca338599a65484389c7abbe54aedb664 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 11 Dec 2009 11:46:49 -0300 Subject: V4L/DVB (13659): soc-camera: convert to the new mediabus API Convert soc-camera core and all soc-camera drivers to the new mediabus API. This also takes soc-camera client drivers one step closer to also be usable with generic v4l2-subdev host drivers. Signed-off-by: Guennadi Liakhovetski Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/media/soc_camera.h | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'include/media/soc_camera.h') 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 { struct device *pdev; /* Platform device */ s32 user_width; s32 user_height; + enum v4l2_colorspace colorspace; unsigned char iface; /* Host number */ unsigned char devnum; /* Device number per host */ - unsigned char buswidth; /* See comment in .c */ struct soc_camera_sense *sense; /* See comment in struct definition */ struct soc_camera_ops *ops; struct video_device *vdev; - const struct soc_camera_data_format *current_fmt; - const struct soc_camera_data_format *formats; - int num_formats; + const struct soc_camera_format_xlate *current_fmt; struct soc_camera_format_xlate *user_formats; int num_user_formats; enum v4l2_field field; /* Preserve field over close() */ @@ -161,23 +159,13 @@ static inline struct v4l2_subdev *soc_camera_to_subdev( int soc_camera_host_register(struct soc_camera_host *ici); void soc_camera_host_unregister(struct soc_camera_host *ici); -const struct soc_camera_data_format *soc_camera_format_by_fourcc( - struct soc_camera_device *icd, unsigned int fourcc); const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc( struct soc_camera_device *icd, unsigned int fourcc); -struct soc_camera_data_format { - const char *name; - unsigned int depth; - __u32 fourcc; - enum v4l2_colorspace colorspace; -}; - /** * struct soc_camera_format_xlate - match between host and sensor formats - * @cam_fmt: sensor format provided by the sensor - * @host_fmt: host format after host translation from cam_fmt - * @buswidth: bus width for this format + * @code: code of a sensor provided format + * @host_fmt: host format after host translation from code * * Host and sensor translation structure. Used in table of host and sensor * formats matchings in soc_camera_device. A host can override the generic list @@ -185,9 +173,8 @@ struct soc_camera_data_format { * format setup. */ struct soc_camera_format_xlate { - const struct soc_camera_data_format *cam_fmt; - const struct soc_camera_data_format *host_fmt; - unsigned char buswidth; + enum v4l2_mbus_pixelcode code; + const struct soc_mbus_pixelfmt *host_fmt; }; struct soc_camera_ops { -- cgit v1.2.3