From patchwork Wed May 15 12:52:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2572331 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by patchwork2.kernel.org (Postfix) with ESMTP id C4E24DF2A2 for ; Wed, 15 May 2013 12:53:05 +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 r4FCr5b6024795 for ; Wed, 15 May 2013 07:53:05 -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 r4FCr44S005738 for ; Wed, 15 May 2013 07:53:05 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Wed, 15 May 2013 07:53:04 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id r4FCr4RR028790 for ; Wed, 15 May 2013 07:53:04 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 4B8238064A for ; Wed, 15 May 2013 07:53:04 -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 61A0680626 for ; Wed, 15 May 2013 07:52:56 -0500 (CDT) Received: from medina.ext.ti.com (medina.ext.ti.com [192.91.81.31]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id r4FCquJv018215 for ; Wed, 15 May 2013 07:52:56 -0500 (CDT) Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by medina.ext.ti.com (8.13.7/8.13.7) with ESMTP id r4FCqtb9021803 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 15 May 2013 07:52:55 -0500 Received: from [216.82.253.147:24970] by server-5.bemta-7.messagelabs.com id 54/13-11504-72583915; Wed, 15 May 2013 12:52:55 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-7.tower-165.messagelabs.com!1368622374!10346043!1 X-Originating-IP: [209.85.220.46] 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 24405 invoked from network); 15 May 2013 12:52:54 -0000 Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by server-7.tower-165.messagelabs.com with RC4-SHA encrypted SMTP; 15 May 2013 12:52:54 -0000 Received: by mail-pa0-f46.google.com with SMTP id fa10so1487373pad.19 for ; Wed, 15 May 2013 05:52:54 -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=1kZjLeyAniKJdgFNmFP2Wa1MCk3pLSEE1qoCN7j26BM=; b=jWr3Z2ZU81hODaAImyK+Oj3ogTTH8sAzkDjl22UCLUFKDFeTI2Z3/gjfVJNSnNWxif Lt2r77bInIBoxCRbxB9sq7epmbnx3HDKejx5ZstENrt3y5XfxMJP9mn/vUyVqfjRpHEh IDC8xUiLfU1/vE+eUCJ1LzGwJcSb310AZZAlkmGkAetsWU6Lw7zUKkg+wurLniUPZTOd t8xnE/rTAvuXVs1UTsmxYg6wGntRG3PGFnQ3ULByQ+Z1i3o+y33gWxoMREfj6eiD1blt tSbl+4sw5HG/W7lumTwjmR4LYk3j7Cl4raRL4X95+5tmWSuvz1g19o7yornKFe+U+gWq HNFg== X-Received: by 10.66.74.170 with SMTP id u10mr39621762pav.202.1368622373959; Wed, 15 May 2013 05:52:53 -0700 (PDT) Received: from localhost.localdomain ([59.98.240.128]) by mx.google.com with ESMTPSA id vb8sm2777089pbc.11.2013.05.15.05.52.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 15 May 2013 05:52:52 -0700 (PDT) From: Lad Prabhakar To: LMML Subject: [PATCH RFC] media: OF: add field-active and sync-on-green endpoint properties Date: Wed, 15 May 2013 18:22:29 +0530 Message-ID: <1368622349-32185-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+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com From: Lad, Prabhakar This patch adds "field-active" and "sync-on-green" 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 --- .../devicetree/bindings/media/video-interfaces.txt | 4 ++++ drivers/media/v4l2-core/v4l2-of.c | 6 ++++++ include/media/v4l2-mediabus.h | 2 ++ 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt index e022d2d..6bf87d0 100644 --- a/Documentation/devicetree/bindings/media/video-interfaces.txt +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt @@ -101,6 +101,10 @@ Optional endpoint properties array contains only one entry. - clock-noncontinuous: a boolean property to allow MIPI CSI-2 non-continuous clock mode. +-field-active: a boolean property indicating active high filed ID output + polarity is inverted. +-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..1d59455 100644 --- a/drivers/media/v4l2-core/v4l2-of.c +++ b/drivers/media/v4l2-core/v4l2-of.c @@ -100,6 +100,12 @@ 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, "field-active", &v)) + flags |= V4L2_MBUS_FIELD_ACTIVE; + + if (of_get_property(node, "sync-on-green", &v)) + flags |= V4L2_MBUS_SOG; + bus->flags = flags; } diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index 83ae07e..b95553d 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h @@ -40,6 +40,8 @@ #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_FIELD_ACTIVE (1 << 12) +#define V4L2_MBUS_SOG (1 << 13) /* Serial flags */ /* How many lanes the client can use */