Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2103661pxa; Mon, 3 Aug 2020 07:34:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5TADZVkAsECxGxjnRf+Trim0lZ9x8qoJrf76xMgRx021WzzcmDrx3prgBIicq71SsA8tc X-Received: by 2002:a17:907:7090:: with SMTP id yj16mr2860697ejb.73.1596465299277; Mon, 03 Aug 2020 07:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596465299; cv=none; d=google.com; s=arc-20160816; b=hV/0ltX3zAS9qUi2XHjBZxEm5Pd3xNR2bv1hQ6lxuJzqTLPOuhKgvz93uWvyjKO++M RSbCVtYCAC+AH1+l27QLV5HxBbQ64E70NVXqmyZX+S4CO62PgF/YpmrYn+Z4tM1ypEke udAUTYKhvnrJ4iqmZCZNxQZ8ZRuLEN1gsRK4UjwwrVyI+hvxmJu80RM30/e4z0JQ+WTX MUFPYBChrEuKBfEKpdbiPCZ5dJ9SZsVDlDTdUhip9ckiDKFEKOcekZzXmFxp+i/8xaoi DWiK3kmsu5ZNfNVU0pOfP7jH8igz+XCEQA8dnnXs+/xdZyCgOdPjGoAt5d9mAnbO1EdB g6uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=jnxvwGUlqnY3VmNetP6B/Ve6mZjOLlkTO2pbIlO5RUQ=; b=MihHJ34wNthkgkU4RulAuLxUUmv9oNlVF76XgEfyoiuRzde0uF1VARIpULFzOpItFq 9U7vAJWyYJx4sPYoZTG+x0VN/JB3Y4r4Dh6WaDZPIwayOB1+Un5zbcAUQfQWjy2/52vZ 5DGWW6bo55rVjMhGcqs2nCByu+ZLVXplqm1CcJ9/CXZPXo2YB9SvNR9UKnpN9V8LnHRj nS7kifmUj9UXd+AvCvSKDGTybX7pcUTxIeKwHr7RlsRsc7zFWUPWi5UhoYK2xH7GRoJF YfXko0KHAIoyF6vBnF7suWhMldWsCZdAeVnWHjTZ2mVyROoNibEzFJP2uq5M6tDuG6zk RVgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si10426107edv.44.2020.08.03.07.34.37; Mon, 03 Aug 2020 07:34:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728367AbgHCOc0 (ORCPT + 99 others); Mon, 3 Aug 2020 10:32:26 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:8624 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726358AbgHCOcY (ORCPT ); Mon, 3 Aug 2020 10:32:24 -0400 X-IronPort-AV: E=Sophos;i="5.75,430,1589209200"; d="scan'208";a="53537274" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 03 Aug 2020 23:32:23 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id C0BAC42AD685; Mon, 3 Aug 2020 23:32:20 +0900 (JST) From: Lad Prabhakar To: Jacopo Mondi , Steve Longerbeam , Sakari Ailus , Hugues Fruchet , Mauro Carvalho Chehab , Rob Herring , Hans Verkuil , Laurent Pinchart , linux-media@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Biju Das , Prabhakar , linux-renesas-soc@vger.kernel.org, Lad Prabhakar Subject: [PATCH v2 4/4] media: i2c: ov5640: Fallback to parallel mode Date: Mon, 3 Aug 2020 15:31:47 +0100 Message-Id: <1596465107-14251-5-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1596465107-14251-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <1596465107-14251-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fallback to parallel mode if bus_type doesn't match the supported interfaces by the driver. Signed-off-by: Lad Prabhakar --- drivers/media/i2c/ov5640.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index 08c67250042f..4e88b0540740 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -3074,6 +3074,12 @@ static int ov5640_probe(struct i2c_client *client) return ret; } + /* fallback to parallel mode */ + if (sensor->ep.bus_type != V4L2_MBUS_PARALLEL && + sensor->ep.bus_type != V4L2_MBUS_CSI2_DPHY && + sensor->ep.bus_type != V4L2_MBUS_BT656) + sensor->ep.bus_type = V4L2_MBUS_PARALLEL; + /* get system clock (xclk) */ sensor->xclk = devm_clk_get(dev, "xclk"); if (IS_ERR(sensor->xclk)) { -- 2.17.1