Commit 57da71c2 authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Tony Lindgren

OMAP1: CAMERA: Convert camera_core.c to use v4l2-int-device API

This patch converts camera_core.c to use v4l2-int-device API.
Only read method was tested with success. MMAP method still needs
re-work and tests.
Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@indt.org.br>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 7a184b46
This diff is collapsed.
...@@ -19,6 +19,7 @@ struct camera_fh; ...@@ -19,6 +19,7 @@ struct camera_fh;
#include <media/video-buf.h> #include <media/video-buf.h>
#include <asm/scatterlist.h> #include <asm/scatterlist.h>
#include <media/v4l2-int-device.h>
struct camera_device; struct camera_device;
typedef void (*dma_callback_t)(void *arg1, void *arg2); typedef void (*dma_callback_t)(void *arg1, void *arg2);
...@@ -39,7 +40,7 @@ struct sgdma_state { ...@@ -39,7 +40,7 @@ struct sgdma_state {
/* per-device data structure */ /* per-device data structure */
struct camera_device { struct camera_device {
struct device dev; struct device *dev;
struct video_device *vfd; struct video_device *vfd;
spinlock_t overlay_lock; /* spinlock for overlay DMA counter */ spinlock_t overlay_lock; /* spinlock for overlay DMA counter */
...@@ -80,18 +81,18 @@ struct camera_device { ...@@ -80,18 +81,18 @@ struct camera_device {
*/ */
struct camera_fh *previewing; struct camera_fh *previewing;
/* capture parameters (frame rate, number of buffers) */ /*
struct v4l2_captureparm cparm; * Sensor interface parameters: interface type, CC_CTRL
* register value and interface specific data.
/* This is the frame period actually requested by the user. */ */
struct v4l2_fract nominal_timeperframe; int if_type;
union {
/* frequency (in Hz) of camera interface xclk output */ struct parallel {
unsigned long xclk; u32 xclk;
} bt656;
} if_u;
/* Pointer to the sensor interface ops */ /* Pointer to the sensor interface ops */
struct omap_camera_sensor *cam_sensor; struct v4l2_int_device *sdev;
void *sensor_data;
/* Pointer to the camera interface hardware ops */ /* Pointer to the camera interface hardware ops */
struct camera_hardware *cam_hardware; struct camera_hardware *cam_hardware;
...@@ -104,7 +105,6 @@ struct camera_device { ...@@ -104,7 +105,6 @@ struct camera_device {
* VIDIOC_S_FMT/VIDIOC_G_FMT ioctls with a CAPTURE buffer type. * VIDIOC_S_FMT/VIDIOC_G_FMT ioctls with a CAPTURE buffer type.
*/ */
struct v4l2_pix_format pix; struct v4l2_pix_format pix;
struct v4l2_pix_format pix2;
/* crop defines the size and offset of the video overlay source window /* crop defines the size and offset of the video overlay source window
* within the framebuffer. These parameters are set/queried by the * within the framebuffer. These parameters are set/queried by the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment