V4L/DVB (10035): m5602: add a start sending hook in the sensor struct

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Erik Andrén 2008-12-21 17:25:25 -03:00 committed by Mauro Carvalho Chehab
parent 7d292de890
commit 3da3dce5af
2 changed files with 6 additions and 0 deletions

View file

@ -242,6 +242,9 @@ static int m5602_start_transfer(struct gspca_dev *gspca_dev)
/* Send start command to the camera */
const u8 buffer[4] = {0x13, 0xf9, 0x0f, 0x01};
if (sd->sensor->start)
sd->sensor->start(sd);
memcpy(buf, buffer, sizeof(buffer));
err = usb_control_msg(gspca_dev->dev,
usb_sndctrlpipe(gspca_dev->dev, 0),

View file

@ -58,6 +58,9 @@ struct m5602_sensor {
/* Performs a initialization sequence */
int (*init)(struct sd *sd);
/* Executed when the camera starts to send data */
int (*start)(struct sd *sd);
/* Performs a power down sequence */
int (*power_down)(struct sd *sd);