Commit 3da3dce5 authored by Erik Andrén's avatar Erik Andrén Committed by Mauro Carvalho Chehab

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

Signed-off-by: default avatarErik Andrén <erik.andren@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 7d292de8
...@@ -242,6 +242,9 @@ static int m5602_start_transfer(struct gspca_dev *gspca_dev) ...@@ -242,6 +242,9 @@ static int m5602_start_transfer(struct gspca_dev *gspca_dev)
/* Send start command to the camera */ /* Send start command to the camera */
const u8 buffer[4] = {0x13, 0xf9, 0x0f, 0x01}; const u8 buffer[4] = {0x13, 0xf9, 0x0f, 0x01};
if (sd->sensor->start)
sd->sensor->start(sd);
memcpy(buf, buffer, sizeof(buffer)); memcpy(buf, buffer, sizeof(buffer));
err = usb_control_msg(gspca_dev->dev, err = usb_control_msg(gspca_dev->dev,
usb_sndctrlpipe(gspca_dev->dev, 0), usb_sndctrlpipe(gspca_dev->dev, 0),
......
...@@ -58,6 +58,9 @@ struct m5602_sensor { ...@@ -58,6 +58,9 @@ struct m5602_sensor {
/* Performs a initialization sequence */ /* Performs a initialization sequence */
int (*init)(struct sd *sd); int (*init)(struct sd *sd);
/* Executed when the camera starts to send data */
int (*start)(struct sd *sd);
/* Performs a power down sequence */ /* Performs a power down sequence */
int (*power_down)(struct sd *sd); int (*power_down)(struct sd *sd);
......
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