Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp312554pxa; Wed, 5 Aug 2020 01:36:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7My/0ORPQr7+613HxnqtDDHthSp2JtI9GGiIaPwW7Rb8L7OhmIVjpRI4g9FEw48Eybigj X-Received: by 2002:a05:6402:b26:: with SMTP id bo6mr1791337edb.104.1596616588310; Wed, 05 Aug 2020 01:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596616588; cv=none; d=google.com; s=arc-20160816; b=kkB51mUuZHxl6SAyyErQfZpGvRmOIfArrODqN7vM5K7rOWcWgOCE9SLgmu8XpCArRd QCVn3VNfBTt6Qpp83nHY5v0U4rJNTVUFmrOCBo2ptlmo+bE11Ur0uATlZ5jw2m3U00xP FawbWnzZJlFasrE8LUT1WXjC06wNeSl83+IRPVElGiNNDgv8+rGXae3vjwg3BJJAzm3q PW88azhiUyYe9opgB/YXWubFfMgwoythHMk3UtAjaupyWlJT2Gvn0ire9EIuaLRzcgyu UfQkkmk7HUNDfd2eKo/kXcU2ZSbG8xKOh8goIVfDjMvB/ez26eWefcinOx12DjuVOqY4 HtZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QMUv2ojLbgkbNjy8R8PZ7qLfqmfzFtBoqOYdedJ2bnc=; b=y2NGTFPayMxyKnLybEG2X2fqEHZcxzbMa8wIiUYVPWnP39hxfmxl1NhUmfqdCTFqAS 58fBtu8tmPdLk39/vqtC/Wpqqx0L+AYeok+A7SQ6+4z6w5OH+AOdOjTQCwVj50qR+I6Y 4MDTEWG9TvnJ4lWZs8gzjtk+aZjmCGUpKcbqs4VOHRwraJzv7RnWofkAw8H7lUoVf5wj lA2ZCE8cjjdNYyG8ifqvmVoMMmXufxQpn3YSDe/GEb6IlvP/WJxxL9Zn62KKY1kU9Rn8 lZamYx+SmcJEpM8DSgStJammgCkfPOjnA7c10LRVJt0eLm+7DRV1QSK7IKClhK304l8X Q+Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aqR4DbID; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si790432eds.102.2020.08.05.01.36.05; Wed, 05 Aug 2020 01:36:28 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aqR4DbID; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726841AbgHEIcx (ORCPT + 99 others); Wed, 5 Aug 2020 04:32:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbgHEIcv (ORCPT ); Wed, 5 Aug 2020 04:32:51 -0400 Received: from mail-yb1-xb42.google.com (mail-yb1-xb42.google.com [IPv6:2607:f8b0:4864:20::b42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DF67C06174A; Wed, 5 Aug 2020 01:32:51 -0700 (PDT) Received: by mail-yb1-xb42.google.com with SMTP id q16so21193929ybk.6; Wed, 05 Aug 2020 01:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QMUv2ojLbgkbNjy8R8PZ7qLfqmfzFtBoqOYdedJ2bnc=; b=aqR4DbID7bj/Ery02pr0Zf1tqbYdGDFS8QdtlRqESrS0bfzPQwuaFomo0JlB199P7A f0b0Gk8kKsv4uyOmA45UfAOzMHUD4iZEk/KZSjZ6dWlB1Fuz+cImvVsSBYiQj0lrNhEs Z2j46vIST2amb3nh1Au2pDcdsp+XTcqkLo7+JGKhrpA5+tWhMcgW4JnOMEpmtlaxhBRj hbtlv8k9iV6fMcIsfxzeO3VNg4LpBCUSFqawcC/azblq9r+t8MYMnNzSEl21d52XE8hb kMst3jFoocBfbJXd4uyb9qa7t9qUB8cHL3yoGyfb/r5egn8zixHhK0iOpknUSVcZENXJ 1PRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QMUv2ojLbgkbNjy8R8PZ7qLfqmfzFtBoqOYdedJ2bnc=; b=Q1XHLJLvfH+bl5GVuBqUo80KHnX6Z6pYVpyd1X5vaOusotGHaOzx59QBkp1zDQeZTB enWWeELzjwqSyDDQmjdGjxldtFb6NVnXAW9POJB3t8V9D/9n+2tnbJWvEQo3XBkjnEpI smm1j0QlyK7cPzoEQdm0EHgMAA7AnLoV4iUDjtvm9IQhi1vFedbIHn3T2+Pa2/neZ+ja 6A2qeo7z6IWiWcAoSbfm2YCs6dJTlDYWxzR30vx396EuGhRY1L29o2VWaJHc7gAySQ8K wszmvsE3xM+J5Evd8FFgQEvKRu0ZrsLLKTyY6bH8+ys8I7SfXaHL/kErqg71CUQDkC3b Grcw== X-Gm-Message-State: AOAM5310+GdIbgV19FSr/uYbRC2XvVT3dhepdbApYuuCe3UOvHeLEwao 8bMOYVkPrplplTVSFVxxB3udn8Y+ftUlppsIHdU= X-Received: by 2002:a25:3355:: with SMTP id z82mr3233231ybz.445.1596616370390; Wed, 05 Aug 2020 01:32:50 -0700 (PDT) MIME-Version: 1.0 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> <20200804081801.GD13316@paasikivi.fi.intel.com> In-Reply-To: <20200804081801.GD13316@paasikivi.fi.intel.com> From: "Lad, Prabhakar" Date: Wed, 5 Aug 2020 09:32:24 +0100 Message-ID: Subject: Re: [PATCH v2 4/4] media: i2c: ov5640: Fallback to parallel mode To: Sakari Ailus Cc: Lad Prabhakar , Jacopo Mondi , Steve Longerbeam , Hugues Fruchet , Mauro Carvalho Chehab , Rob Herring , Hans Verkuil , Laurent Pinchart , linux-media , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , Biju Das , Linux-Renesas Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sakari, Thank you for the review. On Tue, Aug 4, 2020 at 9:18 AM Sakari Ailus wrote: > > 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. > The bus_type is coming from v4l2_fwnode_endpoint_parse(), I'll add the check to fail if type doesn't match the supported interfaces and drop the above check. Cheers, Prabhakar > -- > Sakari Ailus