Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp134160pxa; Tue, 4 Aug 2020 01:20:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6WDXnFlDiLJ7b4W98AeQmWsVBlvhC/OX3Y7s9159Ctee/T//NoZhPtvYEht08uoj7K/kL X-Received: by 2002:a05:6402:297:: with SMTP id l23mr2594026edv.145.1596529234000; Tue, 04 Aug 2020 01:20:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596529233; cv=none; d=google.com; s=arc-20160816; b=SDNlKkaffLTXhJKqH47ocYaI1AmIIjKYgC9XHe3mmdr7/H+xYTp1zm73UBBMmWfU0s ezIY/upK4h+nWfnXn6JGxSkBiM5lIBz59VhTgKD7mjiaLxY5XB1bhvKkjURhw5BQFHIP bc1MIuw7QhFboH66GBypuKNnDhla7s5G5Ypffg2Q9jlTM18vRhRsArTlLUhCSlwAIclu EogJ1qORbex/QywEGjrpLix2MpAEYUbx7nTG29Lmr0O6RjIWthdrJmtqTlhoT+B8Zb7q zItFN2TXjft9pkXHltHCDvVeZwdkXhCVrJlTNroENUBLdPS0GzPpwNC3vQ/7hPz/S2ly AOmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=RyzcPprUmdOK1l/YPbG5CThGoSa2NgcFrw+fgIak19Y=; b=gdhH69kDfS1IzJ9KAFavhfDBtOmhLW1sWB3dD0fQMdQ0Rh8bORpB2ODvhiSHyqNT9z F2CruMq1OpsG0dWlGRPVTfvWI5XPVSUmUyyC0ANa4sHupLksJTNMUcmfqGKO+Fko9Pe7 6xZTLNVPs7i2APAr4sa8IfbRfinvbgcOY+i5f1KEP4eBdSlHFaXIBZeW8sTnISJhzZGk yiIj2kOfE4+jz2vRycjDjG2R9BgjJojMtS4rEQoUMQtuakEfLDEJw3x9K0FP11m3NofH kt0dUU63QajjLPW3Xpttrhn0kYpHTiJNhoepcttzPnQM2ubxeA2YWUDZCe+z8xWrCpKh nM4w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i1si12300020edn.445.2020.08.04.01.20.10; Tue, 04 Aug 2020 01:20:33 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729584AbgHDISH (ORCPT + 99 others); Tue, 4 Aug 2020 04:18:07 -0400 Received: from mga12.intel.com ([192.55.52.136]:20181 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726793AbgHDISH (ORCPT ); Tue, 4 Aug 2020 04:18:07 -0400 IronPort-SDR: PK9eileLvzXHNVXQMTIVmNvyg7mAQ+KduJd+B03hK1GpoyUlIPCc6zXj8hc2gD132cDIhRjgFI wZ0aOJdpAs6Q== X-IronPort-AV: E=McAfee;i="6000,8403,9702"; a="131840845" X-IronPort-AV: E=Sophos;i="5.75,433,1589266800"; d="scan'208";a="131840845" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2020 01:18:06 -0700 IronPort-SDR: lIPKwjOwt6Z/dHXBMxc2tUMS7VrggARADIVhJLj8dxURiyIUymmGIKXCbXECFxFk6hkn6KZVS2 6EsbiN6ViElg== X-IronPort-AV: E=Sophos;i="5.75,433,1589266800"; d="scan'208";a="330528978" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2020 01:18:03 -0700 Received: by paasikivi.fi.intel.com (Postfix, from userid 1000) id F148D20686; Tue, 4 Aug 2020 11:18:01 +0300 (EEST) Date: Tue, 4 Aug 2020 11:18:01 +0300 From: Sakari Ailus To: Lad Prabhakar Cc: Jacopo Mondi , Steve Longerbeam , Hugues Fruchet , Mauro Carvalho Chehab , Rob Herring , Hans Verkuil , Laurent Pinchart , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Biju Das , Prabhakar , linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH v2 4/4] media: i2c: ov5640: Fallback to parallel mode Message-ID: <20200804081801.GD13316@paasikivi.fi.intel.com> References: <1596465107-14251-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> <1596465107-14251-5-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1596465107-14251-5-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Prabhakar, On Mon, Aug 03, 2020 at 03:31:47PM +0100, Lad Prabhakar wrote: > 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; You basically need the type from the v4l2_fwnode_endpoint_parse(), and if you don't have any of the above bus types, probe should fail. The old bindings were documented in a way that either parallel or CSI-2 bus will be used, and there were no defaults. So all should be well. -- Sakari Ailus