Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124396
b: refs/heads/master
c: e6e4837
h: refs/heads/master
v: v3
  • Loading branch information
Antonio Ospite authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 60f6803 commit f8f0f65
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15e3209a30c1b4dd52e937388fb3969d06dc33ec
refs/heads/master: e6e483782772994fe42ef9e8b5b4d6f6376b3d45
17 changes: 17 additions & 0 deletions trunk/drivers/media/video/gspca/ov534.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,20 @@ static void sccb_reg_write(struct usb_device *udev, u16 reg, u8 val)
PDEBUG(D_ERR, "sccb_reg_write failed");
}

static u8 sccb_reg_read(struct usb_device *udev, u16 reg)
{
ov534_reg_write(udev, OV534_REG_SUBADDR, reg);
ov534_reg_write(udev, OV534_REG_OPERATION, OV534_OP_WRITE_2);
if (!sccb_check_status(udev))
PDEBUG(D_ERR, "sccb_reg_read failed 1");

ov534_reg_write(udev, OV534_REG_OPERATION, OV534_OP_READ_2);
if (!sccb_check_status(udev))
PDEBUG(D_ERR, "sccb_reg_read failed 2");

return ov534_reg_read(udev, OV534_REG_READ);
}

static const __u8 ov534_reg_initdata[][2] = {
{ 0xe7, 0x3a },

Expand Down Expand Up @@ -339,6 +353,9 @@ static void ov534_setup(struct usb_device *udev)
ov534_reg_write(udev, ov534_reg_initdata[i][0],
ov534_reg_initdata[i][1]);

PDEBUG(D_PROBE, "sensor is ov%02x%02x",
sccb_reg_read(udev, 0x0a), sccb_reg_read(udev, 0x0b));

ov534_set_led(udev, 1);

/* Initialize sensor */
Expand Down

0 comments on commit f8f0f65

Please sign in to comment.