From patchwork Fri Jan 30 04:30:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 457 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Fri, 30 Jan 2009 09:19:52 +0000 Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1LSpXT-00055Z-Pr for mchehab@infradead.org; Fri, 30 Jan 2009 09:19:52 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751947AbZA3JTv (ORCPT ); Fri, 30 Jan 2009 04:19:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752048AbZA3JTv (ORCPT ); Fri, 30 Jan 2009 04:19:51 -0500 Received: from mail.renesas.com ([202.234.163.13]:42078 "EHLO mail06.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751947AbZA3JTu (ORCPT ); Fri, 30 Jan 2009 04:19:50 -0500 X-AuditID: ac14038a-0000000900001ca1-e3-4982c62f1be1 Received: from guardian02.idc.renesas.com ([172.20.8.201]) by mail06.idc.renesas.com (sendmail) with ESMTP id n0U9JgqR029427; Fri, 30 Jan 2009 18:19:42 +0900 (JST) Received: (from root@localhost) by guardian02.idc.renesas.com with id n0U9Jd6b005881; Fri, 30 Jan 2009 18:19:39 +0900 (JST) Received: from mta01.idc.renesas.com (localhost [127.0.0.1]) by mta01.idc.renesas.com with ESMTP id n0U9JdbU000075; Fri, 30 Jan 2009 18:19:39 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KEA000TX1WRL6@ims05.idc.renesas.com>; Fri, 30 Jan 2009 18:19:39 +0900 (JST) Date: Fri, 30 Jan 2009 13:30:02 +0900 From: Kuninori Morimoto Subject: [PATCH 2/2] sh_mobile_ceu: Add FLDPOL operation To: Guennadi Liakhovetski Cc: Magnus , Linux Media 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.1 (i386-mingw-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.00-dev (KIKU) 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/sh_mobile_ceu_camera.c | 7 +++++++ include/media/sh_mobile_ceu.h | 2 ++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 07b7b4c..366e5f5 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -118,6 +118,12 @@ static unsigned long make_bus_param(struct sh_mobile_ceu_dev *pcdev) if (pcdev->pdata->flags & SH_CEU_FLAG_USE_16BIT_BUS) flags |= SOCAM_DATAWIDTH_16; + if (pcdev->pdata->flags & SH_CEU_FLAG_USE_FLDPOL_HIGH) + flags |= SOCAM_FLDPOL_ACTIVE_HIGH; + + if (pcdev->pdata->flags & SH_CEU_FLAG_USE_FLDPOL_LOW) + flags |= SOCAM_FLDPOL_ACTIVE_LOW; + if (flags & SOCAM_DATAWIDTH_MASK) return flags; @@ -474,6 +480,7 @@ static int sh_mobile_ceu_set_bus_param(struct soc_camera_device *icd, icd->current_fmt->fourcc == V4L2_PIX_FMT_NV61) value ^= 0x00000100; /* swap U, V to change from NV1x->NVx1 */ + value |= common_flags & SOCAM_FLDPOL_ACTIVE_LOW ? 1 << 16 : 0; value |= common_flags & SOCAM_VSYNC_ACTIVE_LOW ? 1 << 1 : 0; value |= common_flags & SOCAM_HSYNC_ACTIVE_LOW ? 1 << 0 : 0; value |= buswidth == 16 ? 1 << 12 : 0; diff --git a/include/media/sh_mobile_ceu.h b/include/media/sh_mobile_ceu.h index 0f3524c..1549401 100644 --- a/include/media/sh_mobile_ceu.h +++ b/include/media/sh_mobile_ceu.h @@ -3,6 +3,8 @@ #define SH_CEU_FLAG_USE_8BIT_BUS (1 << 0) /* use 8bit bus width */ #define SH_CEU_FLAG_USE_16BIT_BUS (1 << 1) /* use 16bit bus width */ +#define SH_CEU_FLAG_USE_FLDPOL_HIGH (1 << 2) /* top field if FLD is high */ +#define SH_CEU_FLAG_USE_FLDPOL_LOW (1 << 3) /* top field if FLD is low */ struct sh_mobile_ceu_info { unsigned long flags;