From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECAD4C3A59B for ; Mon, 2 Sep 2019 09:36:35 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C026521874 for ; Mon, 2 Sep 2019 09:36:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SdLltcIq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C026521874 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9EDDE2052B; Mon, 2 Sep 2019 09:36:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BvDlfnRz-ULS; Mon, 2 Sep 2019 09:36:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 8388B20533; Mon, 2 Sep 2019 09:36:34 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 44DD41BF23C for ; Mon, 2 Sep 2019 09:36:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3FD1085D8F for ; Mon, 2 Sep 2019 09:36:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qx2AkRItZFX4 for ; Mon, 2 Sep 2019 09:36:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 869C685D6F for ; Mon, 2 Sep 2019 09:36:32 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id c3so13272481wrd.7 for ; Mon, 02 Sep 2019 02:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=7S+vZhVc5zHeiLc/DC6Z2xOOWxBDBUvpp/e3pBI1NHw=; b=SdLltcIqfSTbhoDBqB0JMt9oUEV92Oj/pOU/Ob14cQsQPj+tVBpl3Rr/9U2efcxzSw G8V7L49e6FUh7X+XY0Pg/NAWU3hPUVh0bflsweMM8+44JIlZC41qyHKccjz9hEOHtKhY /QRuBI2cRf2dQ7DB1g4J4239lW7vLw2cgwLL1JxWT7n/w6icES8esjSDU3uL6EVcGoSN i+6J3BjMyq3zpw/INszfY/hWVYhfXhS323KJNFt4RJY0spsQRPWWQys/InPvU+ohDXba m9DYKI8EqZolY7g8hH/XWLgJB1E0iNyLz/UxqPT+3QFN1mecQQkw6V9VJz79skA3pCjJ 44IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=7S+vZhVc5zHeiLc/DC6Z2xOOWxBDBUvpp/e3pBI1NHw=; b=hjzrdS7cG5BcCOjqeIb++/oHilWkCmn4MjkR8g75Xti2hFDqIQ2TFUPNSpxual75tR mVsih89ELDfkOTcFUi69wRKgeK/F7lJboXsTzIqvmM584eBIKSj0M0VZ5y/9ihsql2X/ 7lbJr8o8B6D6+tl6Tkw7RE4XpNsBUs3oQRgGuDyXX1Dfi2GGxtf8Fnb04ISpsAkGUlxT hBXUemCDXWOGw0IyyqQ7keiIFknZdgqUmdn34OOWgW4jbSK08jTVjT87SqF9pJksQN+E 6HMaUs5Y/zYwQnN9Uvb9ruJbT7UCSOrMSPoUsjWSFDB2dIBX6P6aWKyDGBXEWGJCYbdN lbKw== X-Gm-Message-State: APjAAAWwj0gH9jaVYBlvgwq+pX93Flu56Ium9wWKqT6MQIFiAIt9jmCg EptUFal7r5Bmcuh+74BEARw= X-Google-Smtp-Source: APXvYqwnZx3UsFw9tXhL1LKY1pc0SI7+G9To5dGcweMEWFrJ8hdLdd2oaTaKuKhIo7cilHZxWPmycw== X-Received: by 2002:adf:d187:: with SMTP id v7mr36485204wrc.33.1567416990962; Mon, 02 Sep 2019 02:36:30 -0700 (PDT) Received: from arch-late (87-196-73-69.net.novis.pt. [87.196.73.69]) by smtp.gmail.com with ESMTPSA id r6sm14586137wmf.0.2019.09.02.02.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 02:36:28 -0700 (PDT) References: <20190805233505.21167-1-slongerbeam@gmail.com> <20190805233505.21167-15-slongerbeam@gmail.com> User-agent: mu4e 1.2.0; emacs 27.0.50 From: Rui Miguel Silva To: Steve Longerbeam Subject: Re: [PATCH 14/22] media: imx7-mipi-csis: Create media links in bound notifier In-reply-to: <20190805233505.21167-15-slongerbeam@gmail.com> Date: Mon, 02 Sep 2019 10:36:20 +0100 Message-ID: MIME-Version: 1.0 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:STAGING SUBSYSTEM" , Pengutronix Kernel Team , Greg Kroah-Hartman , Sascha Hauer , open list , NXP Linux Team , Philipp Zabel , Mauro Carvalho Chehab , Shawn Guo , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" Hi Steve, Just to let you know that this series no longer apply clean after your other series: media: imx: Fix subdev unregister/register issues And since you will need to send a new one, some notes... On Tue 06 Aug 2019 at 00:34, Steve Longerbeam wrote: > Implement a notifier bound op to register media links from the remote > sub-device's source pad(s) to the mipi csi-2 receiver sink pad. > > Signed-off-by: Steve Longerbeam > --- > drivers/staging/media/imx/imx7-mipi-csis.c | 25 ++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c > index f71d9183cad2..e03b2317a1ac 100644 > --- a/drivers/staging/media/imx/imx7-mipi-csis.c > +++ b/drivers/staging/media/imx/imx7-mipi-csis.c > @@ -259,6 +259,12 @@ struct csi_state { > bool sink_linked; > }; > > +static inline struct csi_state * > +notifier_to_csis_state(struct v4l2_async_notifier *n) > instead of adding this between structs declaration can you move it down near the similar converter: static struct csi_state *mipi_sd_to_csis_state(struct v4l2_subdev *sdev) and remove the inline since the compiler should do this and add namespacing function name like the other functions, something like: static struct csi_state * mipi_notifier_to_csis_state(struct v4l2_async_notifier *n) Just to coherency. Other than this, looks good to me. Cheers, Rui > +{ > + return container_of(n, struct csi_state, notifier); > +} > + > struct csis_pix_format { > unsigned int pix_width_alignment; > u32 code; > @@ -863,6 +869,23 @@ static int mipi_csis_parse_endpoint(struct device *dev, > return 0; > } > > +static int mipi_csis_notify_bound(struct v4l2_async_notifier *notifier, > + struct v4l2_subdev *sd, > + struct v4l2_async_subdev *asd) > +{ > + struct csi_state *state = notifier_to_csis_state(notifier); > + struct media_pad *sink = &state->mipi_sd.entity.pads[CSIS_PAD_SINK]; > + > + return media_create_fwnode_pad_links(sink, > + dev_fwnode(state->mipi_sd.dev), > + &sd->entity, > + dev_fwnode(sd->dev), 0); > +} > + > +static const struct v4l2_async_notifier_operations mipi_csis_notify_ops = { > + .bound = mipi_csis_notify_bound, > +}; > + > static int mipi_csis_subdev_init(struct v4l2_subdev *mipi_sd, > struct platform_device *pdev, > const struct v4l2_subdev_ops *ops) > @@ -895,6 +918,8 @@ static int mipi_csis_subdev_init(struct v4l2_subdev *mipi_sd, > > v4l2_async_notifier_init(&state->notifier); > > + state->notifier.ops = &mipi_csis_notify_ops; > + > ret = v4l2_async_register_fwnode_subdev(mipi_sd, &state->notifier, > sizeof(struct v4l2_async_subdev), > &sink_port, 1, _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel