From patchwork Tue Oct 13 05:49:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 53313 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9D5r9KY023998 for ; Tue, 13 Oct 2009 05:53:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754886AbZJMFuN (ORCPT ); Tue, 13 Oct 2009 01:50:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754120AbZJMFuN (ORCPT ); Tue, 13 Oct 2009 01:50:13 -0400 Received: from mail.renesas.com ([202.234.163.13]:59100 "EHLO mail03.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755507AbZJMFuL (ORCPT ); Tue, 13 Oct 2009 01:50:11 -0400 X-AuditID: ac140386-0000000b00003037-fb-4ad414ea7412 Received: from guardian03.idc.renesas.com ([172.20.8.202]) by mail03.idc.renesas.com (sendmail) with ESMTP id n9D5nU1n015891; Tue, 13 Oct 2009 14:49:30 +0900 (JST) Received: (from root@localhost) by guardian03.idc.renesas.com with id n9D5nU1e010120; Tue, 13 Oct 2009 14:49:30 +0900 (JST) Received: from mta03.idc.renesas.com (localhost [127.0.0.1]) by mta03.idc.renesas.com with ESMTP id n9D5nVhX013489; Tue, 13 Oct 2009 14:49:31 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KRF00H3VUUISH@ims05.idc.renesas.com>; Tue, 13 Oct 2009 14:49:30 +0900 (JST) Date: Tue, 13 Oct 2009 14:49:30 +0900 From: Kuninori Morimoto Subject: [PATCH 4/5] soc-camera: tw9910: Remove crop setting 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 diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index bdabc9a..59158bb 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c @@ -209,13 +209,6 @@ struct tw9910_scale_ctrl { u16 vscale; }; -struct tw9910_cropping_ctrl { - u16 vdelay; - u16 vactive; - u16 hdelay; - u16 hactive; -}; - struct tw9910_priv { struct v4l2_subdev subdev; struct tw9910_video_info *info; @@ -322,13 +315,6 @@ static const struct tw9910_scale_ctrl tw9910_pal_scales[] = { }, }; -static const struct tw9910_cropping_ctrl tw9910_cropping_ctrl = { - .vdelay = 0x0012, - .vactive = 0x00F0, - .hdelay = 0x0010, - .hactive = 0x02D0, -}; - /* * general function */ @@ -360,40 +346,6 @@ static int tw9910_set_scale(struct i2c_client *client, return ret; } -static int tw9910_set_cropping(struct i2c_client *client, - const struct tw9910_cropping_ctrl *cropping) -{ - int ret; - - ret = i2c_smbus_write_byte_data(client, CROP_HI, - (cropping->vdelay & 0x0300) >> 2 | - (cropping->vactive & 0x0300) >> 4 | - (cropping->hdelay & 0x0300) >> 6 | - (cropping->hactive & 0x0300) >> 8); - if (ret < 0) - return ret; - - ret = i2c_smbus_write_byte_data(client, VDELAY_LO, - cropping->vdelay & 0x00FF); - if (ret < 0) - return ret; - - ret = i2c_smbus_write_byte_data(client, VACTIVE_LO, - cropping->vactive & 0x00FF); - if (ret < 0) - return ret; - - ret = i2c_smbus_write_byte_data(client, HDELAY_LO, - cropping->hdelay & 0x00FF); - if (ret < 0) - return ret; - - ret = i2c_smbus_write_byte_data(client, HACTIVE_LO, - cropping->hactive & 0x00FF); - - return ret; -} - static int tw9910_set_hsync(struct i2c_client *client, const u16 start, const u16 end) { @@ -690,13 +642,6 @@ static int tw9910_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) goto tw9910_set_fmt_error; /* - * set cropping - */ - ret = tw9910_set_cropping(client, &tw9910_cropping_ctrl); - if (ret < 0) - goto tw9910_set_fmt_error; - - /* * set hsync */ ret = tw9910_set_hsync(client,