From patchwork Tue Oct 13 05:49:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 1829 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Tue, 13 Oct 2009 05:53:52 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Tue, 13 Oct 2009 16:49:18 -0300 (BRT) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MxaKW-0004PK-2h; Tue, 13 Oct 2009 05:53:52 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753552AbZJMFuF (ORCPT + 1 other); Tue, 13 Oct 2009 01:50:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753505AbZJMFuF (ORCPT ); Tue, 13 Oct 2009 01:50:05 -0400 Received: from mail.renesas.com ([202.234.163.13]:58986 "EHLO mail03.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753467AbZJMFuE (ORCPT ); Tue, 13 Oct 2009 01:50:04 -0400 X-AuditID: ac140386-0000000600003037-e7-4ad414e273fb Received: from guardian01.idc.renesas.com ([172.20.8.200]) by mail03.idc.renesas.com (sendmail) with ESMTP id n9D5nLi9015804; Tue, 13 Oct 2009 14:49:21 +0900 (JST) Received: (from root@localhost) by guardian01.idc.renesas.com with id n9D5nLg5011554; Tue, 13 Oct 2009 14:49:21 +0900 (JST) Received: from mta04.idc.renesas.com (localhost [127.0.0.1]) by mta04.idc.renesas.com with ESMTP id n9D5nJ3o008636; Tue, 13 Oct 2009 14:49:19 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KRF00H0VUU9SH@ims05.idc.renesas.com>; Tue, 13 Oct 2009 14:49:21 +0900 (JST) Date: Tue, 13 Oct 2009 14:49:20 +0900 From: Kuninori Morimoto Subject: [PATCH 1/5] soc-camera: tw9910: Add revision control To: Guennadi Liakhovetski Cc: Linux Media Mailing List Message-id: MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.3 (i386-msvc-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.02-dev (RINDOU) (2009-06-17 Rev.4261) X-Brightmail-Tracker: AAAAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Kuninori Morimoto --- drivers/media/video/tw9910.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index df7934d..5152d56 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c @@ -225,6 +225,7 @@ struct tw9910_priv { struct v4l2_subdev subdev; struct tw9910_video_info *info; const struct tw9910_scale_ctrl *scale; + int rev; }; /* @@ -570,8 +571,11 @@ static int tw9910_enum_input(struct soc_camera_device *icd, static int tw9910_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *id) { + struct i2c_client *client = sd->priv; + struct tw9910_priv *priv = to_tw9910(client); + id->ident = V4L2_IDENT_TW9910; - id->revision = 0; + id->revision = priv->rev; return 0; } @@ -896,6 +900,8 @@ static int tw9910_video_probe(struct soc_camera_device *icd, return -ENODEV; } + priv->rev = GET_ReV(val); + dev_info(&client->dev, "tw9910 Product ID %0x:%0x\n", GET_ID(val), GET_ReV(val));