diff options
author | Jean-François Moine <moinejf@free.fr> | 2010-07-14 06:09:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 15:43:07 -0400 |
commit | 76ed0fe75750717042932a49d07f643b98dfdd5b (patch) | |
tree | 335249d4c205aae37079cde6a4c163c15d61ee5c | |
parent | 19697b546c9bc5b3c44070be1cfc7ce54a97c0d9 (diff) |
V4L/DVB: gspca - vc032x: Move the first VC0321 settings to sd_init()
The first VC0321 settings were done at webcam connection only. They must also
be done on resume after suspend.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/gspca/vc032x.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index 072785368265..031266a4081b 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c | |||
@@ -3415,13 +3415,6 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
3415 | if (sd->sensor == SENSOR_OV7670) | 3415 | if (sd->sensor == SENSOR_OV7670) |
3416 | sd->flags |= FL_HFLIP | FL_VFLIP; | 3416 | sd->flags |= FL_HFLIP | FL_VFLIP; |
3417 | 3417 | ||
3418 | if (sd->bridge == BRIDGE_VC0321) { | ||
3419 | reg_r(gspca_dev, 0x8a, 0, 3); | ||
3420 | reg_w(gspca_dev, 0x87, 0x00, 0x0f0f); | ||
3421 | |||
3422 | reg_r(gspca_dev, 0x8b, 0, 3); | ||
3423 | reg_w(gspca_dev, 0x88, 0x00, 0x0202); | ||
3424 | } | ||
3425 | return 0; | 3418 | return 0; |
3426 | } | 3419 | } |
3427 | 3420 | ||
@@ -3430,12 +3423,18 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
3430 | { | 3423 | { |
3431 | struct sd *sd = (struct sd *) gspca_dev; | 3424 | struct sd *sd = (struct sd *) gspca_dev; |
3432 | 3425 | ||
3433 | if (sd->sensor == SENSOR_POxxxx) { | 3426 | if (sd->bridge == BRIDGE_VC0321) { |
3434 | reg_r(gspca_dev, 0xa1, 0xb300, 1); | 3427 | reg_r(gspca_dev, 0x8a, 0, 3); |
3435 | if (gspca_dev->usb_buf[0] != 0) { | 3428 | reg_w(gspca_dev, 0x87, 0x00, 0x0f0f); |
3436 | reg_w(gspca_dev, 0xa0, 0x26, 0xb300); | 3429 | reg_r(gspca_dev, 0x8b, 0, 3); |
3437 | reg_w(gspca_dev, 0xa0, 0x04, 0xb300); | 3430 | reg_w(gspca_dev, 0x88, 0x00, 0x0202); |
3438 | reg_w(gspca_dev, 0xa0, 0x00, 0xb300); | 3431 | if (sd->sensor == SENSOR_POxxxx) { |
3432 | reg_r(gspca_dev, 0xa1, 0xb300, 1); | ||
3433 | if (gspca_dev->usb_buf[0] != 0) { | ||
3434 | reg_w(gspca_dev, 0xa0, 0x26, 0xb300); | ||
3435 | reg_w(gspca_dev, 0xa0, 0x04, 0xb300); | ||
3436 | reg_w(gspca_dev, 0xa0, 0x00, 0xb300); | ||
3437 | } | ||
3439 | } | 3438 | } |
3440 | } | 3439 | } |
3441 | return gspca_dev->usb_err; | 3440 | return gspca_dev->usb_err; |