Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2158556rwl; Mon, 26 Dec 2022 09:44:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXvTRVZbrjLGvWpP5HjMK/ONYGAxKqYFDgw2S5y3f4Bw9pMO51gy+ThVr0Lh5V6WlqrZKCoa X-Received: by 2002:a62:8208:0:b0:580:d2d3:ef18 with SMTP id w8-20020a628208000000b00580d2d3ef18mr10956386pfd.29.1672076694655; Mon, 26 Dec 2022 09:44:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672076694; cv=none; d=google.com; s=arc-20160816; b=SSxxT+RLHJnwotcwjAX7aABq7ekVKMANZdhpNFTh3it89Ykfdi5Xz83b0/3QGBAyXE 7oxfTDdpw/vNgwIlCIrAxHbNLDvOzUuKZeKT2JnO05PuLHnq8AxH2A3n8AsDvLu4PGUK +aSV4CJ+2+cUX8CxG10ZXXk09w7IBwlRHnnk5OgX3NBLIf0igdwUgtg0SmVb8Z92DG2i JO9XlILcTX3zg7aUP81/aTiAWxsngeVBSoKuHKWh49grp8ccu547qt9LLtt0Wzcenza6 Y/bOwahtW81rW2FtDjpHojo58C3MRGAJmKeePNS7MJb1F2wAnH+OnfQLnOo9m7XeJf/V Tqiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rL0nDPRwMGruXHQW63BLVQ5XgHwi13MEssVaeHrdNhw=; b=dGDR9oG/k+uYU75Gk+VFoXduluXFCdb8B5gCOvHsqyjAhpcbLSME/Uz3Ks7gdjyhJa pIsWwDvimm0oFvAALUuHMfylZZBb0XBkKh3FDDWRokf0kREKZg33edNvxvJXnAbiHmeh V0dy6fz2LbujN0U4Pf2EcnlfYWfXkKBT3fUc6MSMimm5+DzDpSnXDN3Am/UHCNp2vb0V lYyizrH8yYHa/1iXVbieER6l4sYD5lbaLNJpuy6ISlbbZggZ2JuUQEPQX8xJozCG4Vz+ 4j17BIIS4khjaI4iaPFCuiu0juN1FAvF6iRTLTQ/QclYRGVAiBM89VwwWrePQfONSVIE vNAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=UwbNYJNX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020a056a00240d00b0056be3585c3asi12378669pfh.266.2022.12.26.09.44.45; Mon, 26 Dec 2022 09:44:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=UwbNYJNX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231835AbiLZRBU (ORCPT + 66 others); Mon, 26 Dec 2022 12:01:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbiLZRBS (ORCPT ); Mon, 26 Dec 2022 12:01:18 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45600C2B; Mon, 26 Dec 2022 09:01:17 -0800 (PST) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2A2A0A1C; Mon, 26 Dec 2022 18:01:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1672074075; bh=irlftFZ6CQR1KhY24DKXhiPsC4bMOa8WIpYTJayoAko=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UwbNYJNX9mUQw62WXtxT7GocsxtkWmIttmo9rMCNgN3YbY3abYEM8CZb2E9XpkLFi M6C7YpKJs/gWFrjk137hF75hdYg4j37D0bBoObHOdyuGj1sGMlaXO/nuv2bdnZzbED Mk3La9FZVU1h65y+mCwkLyzsX17UDfYvazEcJTus= Date: Mon, 26 Dec 2022 19:01:11 +0200 From: Laurent Pinchart To: Tomi Valkeinen Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Wolfram Sang , Luca Ceresoli , Andy Shevchenko , Matti Vaittinen , Mauro Carvalho Chehab , Peter Rosin , Liam Girdwood , Mark Brown , Sakari Ailus , Michael Tretter , Shawn Tu , Hans Verkuil , Mike Pagano , Krzysztof =?utf-8?Q?Ha=C5=82asa?= , Marek Vasut Subject: Re: [PATCH v5 7/8] media: i2c: add DS90UB913 driver Message-ID: References: <20221208104006.316606-1-tomi.valkeinen@ideasonboard.com> <20221208104006.316606-8-tomi.valkeinen@ideasonboard.com> <4d349785-ca37-d930-db3c-2581bba9fde0@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4d349785-ca37-d930-db3c-2581bba9fde0@ideasonboard.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tomi, On Wed, Dec 14, 2022 at 08:29:48AM +0200, Tomi Valkeinen wrote: > On 11/12/2022 20:33, Laurent Pinchart wrote: > > On Thu, Dec 08, 2022 at 12:40:05PM +0200, Tomi Valkeinen wrote: > >> Add driver for TI DS90UB913 FPDLink-3 Serializer. > >> > >> Signed-off-by: Tomi Valkeinen > >> --- > >> drivers/media/i2c/Kconfig | 13 + > >> drivers/media/i2c/Makefile | 2 +- > >> drivers/media/i2c/ds90ub913.c | 892 ++++++++++++++++++++++++++++++++++ > >> 3 files changed, 906 insertions(+), 1 deletion(-) > >> create mode 100644 drivers/media/i2c/ds90ub913.c [snip] > >> diff --git a/drivers/media/i2c/ds90ub913.c b/drivers/media/i2c/ds90ub913.c > >> new file mode 100644 > >> index 000000000000..6001a622e622 > >> --- /dev/null > >> +++ b/drivers/media/i2c/ds90ub913.c > >> @@ -0,0 +1,892 @@ [snip] > >> +static int ub913_notify_bound(struct v4l2_async_notifier *notifier, > >> + struct v4l2_subdev *source_subdev, > >> + struct v4l2_async_subdev *asd) > >> +{ > >> + struct ub913_data *priv = sd_to_ub913(notifier->sd); > >> + struct device *dev = &priv->client->dev; > >> + unsigned int src_pad; > >> + int ret; > >> + > >> + dev_dbg(dev, "Bind %s\n", source_subdev->name); > > > > I'd drop this message. > > Why is that? Do we get this easily from the v4l2 core? These debug > prints in the bind/unbind process have been valuable for me. Because debug messages are not meant to be a tracing infrastructure, and because, if we want to keep this message, it would be best handled in the v4l2-async core instead of being duplicated across drivers. Same for the messages at the end of the function. > >> + > >> + ret = media_entity_get_fwnode_pad(&source_subdev->entity, > >> + source_subdev->fwnode, > >> + MEDIA_PAD_FL_SOURCE); > >> + if (ret < 0) { > >> + dev_err(dev, "Failed to find pad for %s\n", > >> + source_subdev->name); > >> + return ret; > >> + } > >> + > >> + priv->source_sd = source_subdev; > >> + src_pad = ret; > >> + > >> + ret = media_create_pad_link(&source_subdev->entity, src_pad, > >> + &priv->sd.entity, 0, > > > > &priv->sd.entity, UB913_PAD_SINK, > > Yep. > > >> + MEDIA_LNK_FL_ENABLED | > >> + MEDIA_LNK_FL_IMMUTABLE); > >> + if (ret) { > >> + dev_err(dev, "Unable to link %s:%u -> %s:0\n", > >> + source_subdev->name, src_pad, priv->sd.name); > >> + return ret; > >> + } > >> + > >> + dev_dbg(dev, "Bound %s:%u\n", source_subdev->name, src_pad); > >> + > >> + dev_dbg(dev, "All subdevs bound\n"); > > > > I'd drop this message. > > > >> + > >> + return 0; > >> +} > >> + > >> +static void ub913_notify_unbind(struct v4l2_async_notifier *notifier, > >> + struct v4l2_subdev *source_subdev, > >> + struct v4l2_async_subdev *asd) > >> +{ > >> + struct ub913_data *priv = sd_to_ub913(notifier->sd); > >> + struct device *dev = &priv->client->dev; > >> + > >> + dev_dbg(dev, "Unbind %s\n", source_subdev->name); > >> +} > > > > This is a no-op so you can drop it. > > This has been useful for development, but, yes, perhaps it's time to > drop it. > > >> + > >> +static const struct v4l2_async_notifier_operations ub913_notify_ops = { > >> + .bound = ub913_notify_bound, > >> + .unbind = ub913_notify_unbind, > >> +}; [snip] -- Regards, Laurent Pinchart