mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Reviewed-by: Hans Verkuil <[email protected]> Reviewed-by: Sergio Aguirre <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
11e3d1adbe
commit
325361088b
8 changed files with 90 additions and 30 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -263,6 +263,17 @@ struct v4l2_subdev_video_ops {
|
|||
struct v4l2_dv_timings *timings);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_subdev_sensor_ops - v4l2-subdev sensor operations
|
||||
* @g_skip_top_lines: number of lines at the top of the image to be skipped.
|
||||
* This is needed for some sensors, which always corrupt
|
||||
* several top lines of the output image, or which send their
|
||||
* metadata in them.
|
||||
*/
|
||||
struct v4l2_subdev_sensor_ops {
|
||||
int (*g_skip_top_lines)(struct v4l2_subdev *sd, u32 *lines);
|
||||
};
|
||||
|
||||
/*
|
||||
interrupt_service_routine: Called by the bridge chip's interrupt service
|
||||
handler, when an IR interrupt status has be raised due to this subdev,
|
||||
|
|
@ -347,11 +358,12 @@ struct v4l2_subdev_ir_ops {
|
|||
};
|
||||
|
||||
struct v4l2_subdev_ops {
|
||||
const struct v4l2_subdev_core_ops *core;
|
||||
const struct v4l2_subdev_tuner_ops *tuner;
|
||||
const struct v4l2_subdev_audio_ops *audio;
|
||||
const struct v4l2_subdev_video_ops *video;
|
||||
const struct v4l2_subdev_ir_ops *ir;
|
||||
const struct v4l2_subdev_core_ops *core;
|
||||
const struct v4l2_subdev_tuner_ops *tuner;
|
||||
const struct v4l2_subdev_audio_ops *audio;
|
||||
const struct v4l2_subdev_video_ops *video;
|
||||
const struct v4l2_subdev_ir_ops *ir;
|
||||
const struct v4l2_subdev_sensor_ops *sensor;
|
||||
};
|
||||
|
||||
#define V4L2_SUBDEV_NAME_SIZE 32
|
||||
|
|
|
|||
Loading…
Reference in a new issue