Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124506
b: refs/heads/master
c: 1d07b6f
h: refs/heads/master
v: v3
  • Loading branch information
Erik Andrén authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 617e83f commit f969302
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48223c88299a10a62ff5f5e40bd07670a21c3de9
refs/heads/master: 1d07b6f14e39eb613e42ff7fe7e352d6f67a65eb
16 changes: 12 additions & 4 deletions trunk/drivers/media/video/gspca/m5602/m5602_po1030.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,16 @@ int po1030_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
int err;

PDEBUG(D_V4L2, "Set hflip %d", val);
err = m5602_read_sensor(sd, PO1030_REG_CONTROL2, &i2c_data, 1);
if (err < 0)
goto out;

i2c_data = (val & 0x01) << 7;
i2c_data = (0x7f & i2c_data) | ((val & 0x01) << 7);

err = m5602_write_sensor(sd, PO1030_REG_CONTROL2,
&i2c_data, 1);
&i2c_data, 1);

out:
return err;
}

Expand All @@ -216,12 +220,16 @@ int po1030_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
int err;

PDEBUG(D_V4L2, "Set vflip %d", val);
err = m5602_read_sensor(sd, PO1030_REG_CONTROL2, &i2c_data, 1);
if (err < 0)
goto out;

i2c_data = (val & 0x01) << 6;
i2c_data = (i2c_data & 0xbf) | ((val & 0x01) << 6);

err = m5602_write_sensor(sd, PO1030_REG_CONTROL2,
&i2c_data, 1);
&i2c_data, 1);

out:
return err;
}

Expand Down

0 comments on commit f969302

Please sign in to comment.