From patchwork Thu May 16 13:18:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 2578111 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by patchwork1.kernel.org (Postfix) with ESMTP id 497683FE1F for ; Thu, 16 May 2013 13:20:02 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r4GDINO1024720; Thu, 16 May 2013 08:18:23 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r4GDIN20002484; Thu, 16 May 2013 08:18:23 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Thu, 16 May 2013 08:18:23 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r4GDINYo001522; Thu, 16 May 2013 08:18:23 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 4D4C580627; Thu, 16 May 2013 08:18:23 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 6483680626 for ; Thu, 16 May 2013 08:18:21 -0500 (CDT) Received: from white.ext.ti.com (white.ext.ti.com [192.94.93.38]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id r4GDIKKm019674 for ; Thu, 16 May 2013 08:18:20 -0500 (CDT) Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by white.ext.ti.com (8.13.7/8.13.7) with ESMTP id r4GDIK3h032069 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 16 May 2013 08:18:20 -0500 Received: from [216.82.250.51:7479] by server-12.bemta-12.messagelabs.com id 7B/92-24760-C9CD4915; Thu, 16 May 2013 13:18:20 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-5.tower-108.messagelabs.com!1368710298!3538231!1 X-Originating-IP: [209.85.210.43] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG, ML_RADAR_SPEW_LINKS_14,spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19295 invoked from network); 16 May 2013 13:18:19 -0000 Received: from mail-da0-f43.google.com (HELO mail-da0-f43.google.com) (209.85.210.43) by server-5.tower-108.messagelabs.com with RC4-SHA encrypted SMTP; 16 May 2013 13:18:19 -0000 Received: by mail-da0-f43.google.com with SMTP id u7so1674034dae.16 for ; Thu, 16 May 2013 06:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=4T3vWhCObqwO5oWImGRj0c1pGNhcA2JDaQ7P/HELOIk=; b=hgCupSrwD/0UFHb2sxx1Z9ELVErhPraUqlFx2iMUsGNhxEqhgMTLsGBvjrNc/TaX2Y e4Jux8yIxGsYMYW8fqbuRsk+lxjhLe4CgYct6kan21NoyprkooWZM42OKF9huMFew4UN obkKYA9IrzGL9VMGeihEqWb44mfqTHbqN4qRyWQq+vJTWQF8yQryLf5D8UDIWgThuOuw SBiy6wY7xGvSXoZ5ZqSO9j1ydgrWraXKhXYCYo6zOdmwQoro1LRc7fFFT0I5wy8WDa/2 s5xdoMcWC9u4zGBgXjq90BU0ViVdZQG/R6h9bugCkbED20dTHq3HmYx4c+uGRm7+9sf9 VBDw== X-Received: by 10.68.6.168 with SMTP id c8mr23249517pba.184.1368710298165; Thu, 16 May 2013 06:18:18 -0700 (PDT) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPSA id zy5sm6751152pbb.43.2013.05.16.06.18.11 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 16 May 2013 06:18:17 -0700 (PDT) From: Lad Prabhakar To: LMML Subject: [PATCH RFC v2] media: OF: add sync-on-green endpoint property Date: Thu, 16 May 2013 18:48:07 +0530 Message-ID: <1368710287-8741-1-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.4.1 CC: Rob Landley , Kyungmin Park , DLOS , Mauro Carvalho Chehab , , , LKML , Rob Herring , Grant Likely , Hans Verkuil , Laurent Pinchart , Sylwester Nawrocki , Sakari Ailus , Guennadi Liakhovetski X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Lad, Prabhakar This patch adds "sync-on-green" property as part of endpoint properties and also support to parse them in the parser. Signed-off-by: Lad, Prabhakar Cc: Hans Verkuil Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Guennadi Liakhovetski Cc: Sylwester Nawrocki Cc: Sakari Ailus Cc: Grant Likely Cc: Rob Herring Cc: Rob Landley Cc: devicetree-discuss@lists.ozlabs.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: davinci-linux-open-source@linux.davincidsp.com Cc: Kyungmin Park --- Changes for v2: 1: Dropped "field-active" property as it same as existing "field-even-active" property. .../devicetree/bindings/media/video-interfaces.txt | 2 ++ drivers/media/v4l2-core/v4l2-of.c | 3 +++ include/media/v4l2-mediabus.h | 1 + 3 files changed, 6 insertions(+), 0 deletions(-) diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt index e022d2d..f91821f 100644 --- a/Documentation/devicetree/bindings/media/video-interfaces.txt +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt @@ -101,6 +101,8 @@ Optional endpoint properties array contains only one entry. - clock-noncontinuous: a boolean property to allow MIPI CSI-2 non-continuous clock mode. +-sync-on-green: a boolean property indicating to sync with the green signal in + RGB. Example diff --git a/drivers/media/v4l2-core/v4l2-of.c b/drivers/media/v4l2-core/v4l2-of.c index aa59639..b51d61f 100644 --- a/drivers/media/v4l2-core/v4l2-of.c +++ b/drivers/media/v4l2-core/v4l2-of.c @@ -100,6 +100,9 @@ static void v4l2_of_parse_parallel_bus(const struct device_node *node, if (!of_property_read_u32(node, "data-shift", &v)) bus->data_shift = v; + if (of_get_property(node, "sync-on-green", &v)) + flags |= V4L2_MBUS_SYNC_ON_GREEN; + bus->flags = flags; } diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index 83ae07e..cf2c66f9 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h @@ -40,6 +40,7 @@ #define V4L2_MBUS_FIELD_EVEN_HIGH (1 << 10) /* FIELD = 1/0 - Field1 (odd)/Field2 (even) */ #define V4L2_MBUS_FIELD_EVEN_LOW (1 << 11) +#define V4L2_MBUS_SYNC_ON_GREEN (1 << 12) /* Serial flags */ /* How many lanes the client can use */