From patchwork Mon Jun 19 17:04:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9796947 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF00F6020B for ; Mon, 19 Jun 2017 17:05:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C484D1FE5F for ; Mon, 19 Jun 2017 17:05:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B996027CEA; Mon, 19 Jun 2017 17:05:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B9A91FE5F for ; Mon, 19 Jun 2017 17:05:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752670AbdFSRFg (ORCPT ); Mon, 19 Jun 2017 13:05:36 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:40165 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752648AbdFSRFd (ORCPT ); Mon, 19 Jun 2017 13:05:33 -0400 Received: from w540.lan (unknown [IPv6:2001:b07:6442:1ac4:44f0:b1d4:5e6a:3ac1]) (Authenticated sender: jacopo@jmondi.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id BCFF2172095; Mon, 19 Jun 2017 19:05:31 +0200 (CEST) From: Jacopo Mondi To: laurent.pinchart@ideasonboard.com, niklas.soderlund@ragnatech.se Cc: Jacopo Mondi , linux-renesas-soc@vger.kernel.org Subject: [PATCH v1 06/12] media: rcar: vin: Accept parallel input on Gen3 Date: Mon, 19 Jun 2017 19:04:43 +0200 Message-Id: <1497891889-8038-7-git-send-email-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497891889-8038-1-git-send-email-jacopo+renesas@jmondi.org> References: <1497891889-8038-1-git-send-email-jacopo+renesas@jmondi.org> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Accept parallel/BT.565 bus types when parsing OF on Gen3. Signed-off-by: Jacopo Mondi --- drivers/media/platform/rcar-vin/rcar-core.c | 37 +++++++++++++---------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c index ef61bcc..6738825 100644 --- a/drivers/media/platform/rcar-vin/rcar-core.c +++ b/drivers/media/platform/rcar-vin/rcar-core.c @@ -360,29 +360,24 @@ static int rvin_parse_v4l2(struct rvin_dev *vin, } mbus_cfg->type = v4l2_ep.bus_type; + mbus_cfg->flags = 0; - if (vin->info->chip == RCAR_GEN3) { - switch (mbus_cfg->type) { - case V4L2_MBUS_CSI2: - vin_dbg(vin, "Found CSI-2 media bus\n"); - mbus_cfg->flags = 0; - return 0; - default: - break; - } - } else { - switch (mbus_cfg->type) { - case V4L2_MBUS_PARALLEL: - vin_dbg(vin, "Found PARALLEL media bus\n"); - mbus_cfg->flags = v4l2_ep.bus.parallel.flags; - return 0; - case V4L2_MBUS_BT656: - vin_dbg(vin, "Found BT656 media bus\n"); - mbus_cfg->flags = 0; - return 0; - default: + switch (mbus_cfg->type) { + case V4L2_MBUS_CSI2: + if (vin->info->chip < RCAR_GEN3) break; - } + + vin_dbg(vin, "Found CSI-2 media bus\n"); + return 0; + case V4L2_MBUS_PARALLEL: + vin_dbg(vin, "Found PARALLEL media bus\n"); + mbus_cfg->flags = v4l2_ep.bus.parallel.flags; + return 0; + case V4L2_MBUS_BT656: + vin_dbg(vin, "Found BT656 media bus\n"); + return 0; + default: + break; } vin_err(vin, "Unknown media bus type\n");