From patchwork Thu Dec 9 20:42:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 396082 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB9Kh2Pk016948 for ; Thu, 9 Dec 2010 20:43:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752936Ab0LIUnA (ORCPT ); Thu, 9 Dec 2010 15:43:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11034 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872Ab0LIUnA (ORCPT ); Thu, 9 Dec 2010 15:43:00 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oB9KgvBg006918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 9 Dec 2010 15:42:57 -0500 Received: from pedra (vpn-232-79.phx2.redhat.com [10.3.232.79]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oB9Kgstt009833; Thu, 9 Dec 2010 15:42:55 -0500 Date: Thu, 9 Dec 2010 18:42:39 -0200 From: Mauro Carvalho Chehab To: Jean-Francois Moine , Brian Johnson , Linux Media Mailing List Subject: [PATCH 6/6] [media] gspca/sonixj: Fix support for sn9c120+ov7660 Message-ID: <20101209184239.02cba572@pedra> In-Reply-To: References: Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 09 Dec 2010 20:43:02 +0000 (UTC) diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 681f64b..2761155 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c @@ -1785,7 +1785,8 @@ static void bridge_init(struct gspca_dev *gspca_dev, * This combination doesn't use an inverted powerdown * Tested with USB ID = 0c45:60fb */ - if (sd->sensor == SENSOR_OV7660 && sd->bridge == BRIDGE_SN9C105) + if (sd->sensor == SENSOR_OV7660 && + ((sd->bridge == BRIDGE_SN9C105) || (sd->bridge == BRIDGE_SN9C120)) reg1_inv_powerdown = 0; switch (sd->sensor) { @@ -2615,12 +2616,8 @@ static int sd_start(struct gspca_dev *gspca_dev) break; case SENSOR_OV7660: init = ov7660_sensor_param1; - if (sd->bridge == BRIDGE_SN9C120) { - if (mode) { /* 320x240 - 160x120 */ - reg17 = 0xa2; - reg1 = 0x44; /* 48 Mhz, video trf eneble */ - } - } else if (sd->bridge == BRIDGE_SN9C105) { + if ((sd->bridge == BRIDGE_SN9C120) || + (sd->bridge == BRIDGE_SN9C105)) { reg17 = 0xa2; reg1 = 0x44; /* 48 Mhz, video trf eneble */ } else { @@ -3027,9 +3024,7 @@ static const __devinitdata struct usb_device_id device_table[] = { /* {USB_DEVICE(0x0c45, 0x6132), BS(SN9C120, OV7670)}, */ {USB_DEVICE(0x0c45, 0x6138), BS(SN9C120, MO4000)}, {USB_DEVICE(0x0c45, 0x613a), BS(SN9C120, OV7648)}, -#if !defined CONFIG_USB_SN9C102 && !defined CONFIG_USB_SN9C102_MODULE {USB_DEVICE(0x0c45, 0x613b), BS(SN9C120, OV7660)}, -#endif {USB_DEVICE(0x0c45, 0x613c), BS(SN9C120, HV7131R)}, {USB_DEVICE(0x0c45, 0x613e), BS(SN9C120, OV7630)}, {USB_DEVICE(0x0c45, 0x6142), BS(SN9C120, PO2030N)}, /*sn9c120b*/ diff --git a/drivers/media/video/sn9c102/sn9c102_devtable.h b/drivers/media/video/sn9c102/sn9c102_devtable.h index ccfa59c..340de19 100644 --- a/drivers/media/video/sn9c102/sn9c102_devtable.h +++ b/drivers/media/video/sn9c102/sn9c102_devtable.h @@ -127,9 +127,7 @@ static const struct usb_device_id sn9c102_id_table[] = { /* { SN9C102_USB_DEVICE(0x0c45, 0x6138, BRIDGE_SN9C120), }, MO8000 */ #if !defined CONFIG_USB_GSPCA_SONIXJ && !defined CONFIG_USB_GSPCA_SONIXJ_MODULE { SN9C102_USB_DEVICE(0x0c45, 0x613a, BRIDGE_SN9C120), }, -#endif { SN9C102_USB_DEVICE(0x0c45, 0x613b, BRIDGE_SN9C120), }, -#if !defined CONFIG_USB_GSPCA_SONIXJ && !defined CONFIG_USB_GSPCA_SONIXJ_MODULE { SN9C102_USB_DEVICE(0x0c45, 0x613c, BRIDGE_SN9C120), }, { SN9C102_USB_DEVICE(0x0c45, 0x613e, BRIDGE_SN9C120), }, #endif