obj-$(CONFIG_VIDEO_OMAP_CAMERA) += omapcamera.o
obj-$(CONFIG_VIDEO_CAMERA_SENSOR_OV9640) += sensor_ov9640.o
-objs-yy := camera_core.o
-
-objs-y$(CONFIG_ARCH_OMAP16XX) += omap16xxcam.o
+objs-y$(CONFIG_ARCH_OMAP16XX) += omap16xxcam.o camera_core.o
objs-y$(CONFIG_MACH_OMAP_H3) += h3_sensor_power.o
objs-y$(CONFIG_MACH_OMAP_H4) += h4_sensor_power.o
#include "camera_core.h"
struct camera_device *camera_dev;
-extern struct camera_sensor camera_sensor_if;
+extern struct omap_camera_sensor camera_sensor_if;
extern struct camera_hardware camera_hardware_if;
static void camera_core_sgdma_process(struct camera_device *cam);
camera_core_vbq_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
videobuf_waiton(vb, 0, 0);
- videobuf_dma_pci_unmap(NULL, &vb->dma);
+ videobuf_dma_unmap(q, &vb->dma);
videobuf_dma_free(&vb->dma);
vb->state = STATE_NEEDS_INIT;
spin_unlock(&cam->img_lock);
if (vb->state == STATE_NEEDS_INIT)
- err = videobuf_iolock(NULL, vb, NULL);
+ err = videobuf_iolock(q, vb, NULL);
if (!err)
vb->state = STATE_PREPARED;
cam->xclk = cam->cam_hardware->set_xclk(cam->xclk, cam->hardware_data);
/* initialize the sensor and define a default capture format cam->pix */
- cam->sensor_data = cam->cam_sensor->init(&cam->pix, &cam->pix2);
+ cam->sensor_data = cam->cam_sensor->init(&cam->pix);
if (!cam->sensor_data) {
cam->cam_hardware->disable(cam->hardware_data);
printk(KERN_ERR CAM_NAME ": cannot initialize sensor\n");
unsigned long xclk;
/* Pointer to the sensor interface ops */
- struct camera_sensor *cam_sensor;
+ struct omap_camera_sensor *cam_sensor;
void *sensor_data;
/* Pointer to the camera interface hardware ops */
-
/*
* drivers/media/video/omap/sensor_if.h
*
#ifndef OMAP_SENSOR_IF_H
#define OMAP_SENSOR_IF_H
-
-#define LEN_SENSOR_NAME 31
-struct camera_sensor {
+#define OMAP_SENSOR_NAME_LEN 31
+
+struct omap_camera_sensor {
unsigned int version;
- char name[LEN_SENSOR_NAME + 1];
+ char name[OMAP_SENSOR_NAME_LEN + 1];
void *(*init)(struct v4l2_pix_format *);
int (*cleanup)(void *);
int (*power_off)(void *);
int (*enum_pixformat)(struct v4l2_fmtdesc *, void *);
- int (*try_format) (struct v4l2_pix_format *, void *);
+ int (*try_format)(struct v4l2_pix_format *, void *);
- unsigned long (*calc_xclk) (struct v4l2_pix_format *,
- struct v4l2_fract *, void *);
+ unsigned long (*calc_xclk)(struct v4l2_pix_format *,
+ struct v4l2_fract *, void *);
- int (*configure) (struct v4l2_pix_format *, unsigned long,
- struct v4l2_fract *, void *);
+ int (*configure)(struct v4l2_pix_format *, unsigned long,
+ struct v4l2_fract *, void *);
int (*query_control) (struct v4l2_queryctrl *, void *);
- int (*get_control) (struct v4l2_control *, void *);
- int (*set_control) (struct v4l2_control *, void *);
+ int (*get_control)(struct v4l2_control *, void *);
+ int (*set_control)(struct v4l2_control *, void *);
};
* initialization is successful.
*/
static void *
-ov9640sensor_init(struct v4l2_pix_format *pix, struct v4l2_pix_format *pix2)
+ov9640sensor_init(struct v4l2_pix_format *pix)
{
struct ov9640_sensor *sensor = &ov9640;
int err;
return (void *)sensor;
}
-struct camera_sensor camera_sensor_if = {
+struct omap_camera_sensor camera_sensor_if = {
.version = 0x01,
.name = "OV9640",
.parallel_mode = PAR_MODE_NOBT8,