Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2372104pxk; Mon, 14 Sep 2020 11:29:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1+yAKXeepR7ds0nkjCfolEuwTMDJbYxtP2z+SE+/61UYYTYWPJOmVm/Bvg9vLtjx6AGJI X-Received: by 2002:a17:906:cec9:: with SMTP id si9mr15667158ejb.351.1600108189174; Mon, 14 Sep 2020 11:29:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600108189; cv=none; d=google.com; s=arc-20160816; b=iuUm8b6cYxOAeR3PlXGiz0tWq57Z8KE3oLMM7mD/fdxKOuG0p2bM7qn1CvmLgsK5PY BQB9x8qkuUDRi5KYJBkRY/O28RmluCzaCiuhfgHAA9bvgNKhGAgmeivuTQ6QL4ys7IHK Ea6430IOS6MfSim4JtAV0LxAZM2LJ2zpNIwaGRZ6vRlpgIBEf6WvZSUSVH4u1GokdkYs /9dRc5SQocS70IUanrhdPoBjRz/QwFiLoXQVb5sAugjWzVnVLGvBk3RpwLg52sAi+VGn Wn1OsztuL3+QcDzqfH1lLYMDE91h1FJbKgp/PNeMchozTdRzIIlVCfcSOUUG5Wd3IEkO s5tw== 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=orsG+I+8/k9sx4wSScsBpY6FXaWOiunslMG52trpArQ=; b=r4ZwMNgVrudTjCKcSjbhblD1Oo96X/LsghZoidNqatbdIHF4tyPzIdTN6eLvwnSTqs 57zeRkwLIy9UxYs+hTUDUqRvx0kMFU3sFNpLEzN4ZbLhX0TB7EL/OsDHgYOogtOLPqHm UL/qGuPtCpmmqrbmUWaIzxexbpyA9jx2z1e1gQ6vOh0QuR1jTe74HcFmabrIwXAIhoXj A2HjXGQsC7/2MyyWQLDRgDbOSFtaJooGIkWo+gBfp7k6Tg416dhc6rZR1FTU8fL3SHSU TAebHTyjq4cQ31p7I9Qzd1TywBWzGY4A1ORXvFoErB+OSKSuF9/iQc0kg2S3w7oPEi8O 7S9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PsMLBBfs; 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 jo8si7342041ejb.524.2020.09.14.11.29.26; Mon, 14 Sep 2020 11:29:49 -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=PsMLBBfs; 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 S1726072AbgINS1B (ORCPT + 99 others); Mon, 14 Sep 2020 14:27:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726048AbgINS0r (ORCPT ); Mon, 14 Sep 2020 14:26:47 -0400 Received: from mail-yb1-xb41.google.com (mail-yb1-xb41.google.com [IPv6:2607:f8b0:4864:20::b41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE064C06178A; Mon, 14 Sep 2020 11:26:46 -0700 (PDT) Received: by mail-yb1-xb41.google.com with SMTP id p81so560669ybc.12; Mon, 14 Sep 2020 11:26:46 -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=orsG+I+8/k9sx4wSScsBpY6FXaWOiunslMG52trpArQ=; b=PsMLBBfsKcpnPHJNGDfWdPwaIPbSmT+6lwaJphJURdI124bvLiEYBfhbGovIVXhfnQ E0zfi357NZVQWAPDChaKEunbAkTXBeasXdE5miKI69BltTA7nj6wGoTEiNGQs82YJ4no BUd+E2CdOzzph6GQnuV1Q5oLnwPA9ZKSlr7X77BhSdxHpK9eKt0AeVKwd3qOjK5Et2f+ HN3j+AxREIx00+XCdLgvUncxrdGCHWjdPqDHz2nCnRRUZcIl0TnxtQiBRR118+uM7GJz InYFEKZDJzTxQnhOLj2DZOyEb/syj6PjJcvGVWJ7vpA7YLapaYpOd6munu5vcuoSN5+k ehkw== 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=orsG+I+8/k9sx4wSScsBpY6FXaWOiunslMG52trpArQ=; b=Xc15CZrypad56yOFx04QXETOVSE7UKk1qy6aVYxB/mLVzDFv2R/0G9t65WHem86jXm 88wakfdfA+TpXI4R4zhr1JMV1cnr+yz5hGehu5Rc8yinY1/RYn7bAMPYe/bLi2ylLNSw yZGtRPTj9iQHwWVAl2PSCUJJ9n0eTvlfzzVryGtCnQLD4WnlMmzlW+Dt7IvHWXWlLF+Z YmxkWtURyWK/7/OtASejW8U9Mu70K5LqsTZy+EMKnnnWVAFss1x5YJvzNp+rdmQq+vT9 1zBY9aJBA61/3Rm6MyYKw6FD5F1/IyjkYv6BV1Lf6QxhcB5xismn8fvuFQwxpiYzPbUG vW2g== X-Gm-Message-State: AOAM532H7rX5PE128qvZcZP/wtlmalypKBNPjMDczCn/WWUERxZ4iL6c z0Z/PqZd+aokpIqO9xaXR0esXzzpe6BjhemTQHHTk6tl2ELrBg== X-Received: by 2002:a25:aba1:: with SMTP id v30mr3965574ybi.518.1600108005948; Mon, 14 Sep 2020 11:26:45 -0700 (PDT) MIME-Version: 1.0 References: <20200913184247.618-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20200913184247.618-2-prabhakar.mahadev-lad.rj@bp.renesas.com> <20200914065415.GK26842@paasikivi.fi.intel.com> In-Reply-To: <20200914065415.GK26842@paasikivi.fi.intel.com> From: "Lad, Prabhakar" Date: Mon, 14 Sep 2020 19:26:19 +0100 Message-ID: Subject: Re: [PATCH v4 1/3] media: i2c: ov772x: Parse endpoint properties To: Sakari Ailus Cc: Lad Prabhakar , Jacopo Mondi , Laurent Pinchart , Mauro Carvalho Chehab , linux-media , LKML , Linux-Renesas , Biju Das 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 Mon, Sep 14, 2020 at 7:54 AM Sakari Ailus wrote: > > Hi Prabhakar, > > Thanks for the patchset. > > On Sun, Sep 13, 2020 at 07:42:45PM +0100, Lad Prabhakar wrote: > > Parse endpoint properties using v4l2_fwnode_endpoint_alloc_parse() > > to determine bus-type and store it locally in priv data. > > > > Also for backward compatibility with the existing DT where bus-type > > isnt specified fallback to V4L2_MBUS_PARALLEL. > > > > Signed-off-by: Lad Prabhakar > > --- > > drivers/media/i2c/ov772x.c | 24 ++++++++++++++++++++++++ > > 1 file changed, 24 insertions(+) > > > > diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c > > index 2cc6a678069a..551082aa7026 100644 > > --- a/drivers/media/i2c/ov772x.c > > +++ b/drivers/media/i2c/ov772x.c > > @@ -31,6 +31,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > > > @@ -434,6 +435,7 @@ struct ov772x_priv { > > #ifdef CONFIG_MEDIA_CONTROLLER > > struct media_pad pad; > > #endif > > + enum v4l2_mbus_type bus_type; > > }; > > > > /* > > @@ -1354,6 +1356,8 @@ static const struct v4l2_subdev_ops ov772x_subdev_ops = { > > > > static int ov772x_probe(struct i2c_client *client) > > { > > + struct v4l2_fwnode_endpoint bus_cfg = { .bus_type = 0 }; > > + struct fwnode_handle *ep; > > struct ov772x_priv *priv; > > int ret; > > static const struct regmap_config ov772x_regmap_config = { > > @@ -1415,6 +1419,26 @@ static int ov772x_probe(struct i2c_client *client) > > goto error_clk_put; > > } > > > > + ep = fwnode_graph_get_next_endpoint(dev_fwnode(&client->dev), > > + NULL); > > + if (!ep) { > > + dev_err(&client->dev, "endpoint node not found\n"); > > + ret = -EINVAL; > > + goto error_clk_put; > > + } > > + > > + bus_cfg.bus_type = V4L2_MBUS_PARALLEL; > > + ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg); > > + priv->bus_type = bus_cfg.bus_type; > > + v4l2_fwnode_endpoint_free(&bus_cfg); > > + if (ret) { > > + /* For backward compatibility with the existing DT where > > + * bus-type isnt specified fallback to V4L2_MBUS_PARALLEL > > "isn't", "fall back", and a period, please. > Will fix that. > > + */ > > + priv->bus_type = V4L2_MBUS_PARALLEL; > > + dev_notice(&client->dev, "Falling back to V4L2_MBUS_PARALLEL mode\n"); > > I'd just use dev_dbg(). > OK will switch to dev_dbg() Cheers, Prabhakar