[media] staging: media: go7007: i2c GPIO initialization Reset i2c stuff for GO7007_BO...
authorVolokh Konstantin <volokh84@gmail.com>
Wed, 16 Jan 2013 12:00:50 +0000 (09:00 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 6 Feb 2013 11:02:59 +0000 (09:02 -0200)
Signed-off-by: Volokh Konstantin <volokh84@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/go7007/go7007-driver.c
drivers/staging/media/go7007/go7007-usb.c

index 00014e754c75395a2ef5e53d862097218d6998d1..0aaeb0aeb99eed6dd495f0fb2414fdccf4efff39 100644 (file)
@@ -173,6 +173,11 @@ static int go7007_init_encoder(struct go7007 *go)
                go7007_write_addr(go, 0x3c82, 0x0001);
                go7007_write_addr(go, 0x3c80, 0x00fe);
        }
+       if (go->board_id == GO7007_BOARDID_ADLINK_MPG24) {
+               /* set GPIO5 to be an output, currently low */
+               go7007_write_addr(go, 0x3c82, 0x0000);
+               go7007_write_addr(go, 0x3c80, 0x00df);
+       }
        return 0;
 }
 
index a6cad158947535f513cebbdfe7a0daf8787fd3f0..9dbf5ecd05a27aca67003243781fd817c03debef 100644 (file)
@@ -1110,9 +1110,6 @@ static int go7007_usb_probe(struct usb_interface *intf,
                        } else {
                                u16 channel;
 
-                               /* set GPIO5 to be an output, currently low */
-                               go7007_write_addr(go, 0x3c82, 0x0000);
-                               go7007_write_addr(go, 0x3c80, 0x00df);
                                /* read channel number from GPIO[1:0] */
                                go7007_read_addr(go, 0x3c81, &channel);
                                channel &= 0x3;