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.7 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,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 3E9E3C3A59B for ; Mon, 2 Sep 2019 09:36:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 11314215EA for ; Mon, 2 Sep 2019 09:36:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VWDSDXNG"; 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 11314215EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date: In-reply-to:Subject:To:From:References:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=bs4LqaAesiKjWuBTq9/ibHlzQ4SNltFtHKXf0rGNeOI=; b=VWDSDXNG32RxERRc6vSBQnxrEL EjIB1d7V0VWYPizTdpuFw4mdoBcG2uB3ltyKZ3VtCvRYH7K5sUAPmDW7oPpjs8KcV4M94jL1k0dNZ fqyBRk0iBlRdq+47Uwq5eOpSvsEUU7k3qWKRM8t0sM/q2CvJQWQACZw4hq3yHCv1JR5l3sM8ADEg3 AHqfD+tUQF3rR4NCaGEDRNjYxWI67Tz2qQpGL5xZ1sMNR88ftn4W8JKHtEYG3Clomf0OM8fFSkLou b0GkAkOexgyDvChLU61XSyN7wHl/eaQvi3ddgxDB454iohDeb9ZtBIj9+KmROIr4ckH0rcpF4CK3K iQKQGGtg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i4ilL-0003HQ-G0; Mon, 02 Sep 2019 09:36:39 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i4ilG-0003GQ-Px for linux-arm-kernel@lists.infradead.org; Mon, 02 Sep 2019 09:36:37 +0000 Received: by mail-wr1-x443.google.com with SMTP id b16so13249189wrq.9 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=XCUDgb+CtgiM1J1gwebXhQB10sVEMW9uAK6zjfpU6aep8SzuO1LLi0IP7alg29BggF vxUNEqMfBcFgl37KaaxEMfMKL4ZfpepKuvcO+X8YSKOWVQVVYFeqWZiBr1NIy8Ocnbi6 QAjFmV79wUKSYYgmDOe0kh89hQKbf3UmpQGHi3gc7od0JivgzFiHgCW+ri5Jwbn0d+ej NN6c5o3BPXJpWgTaHr8kbr/Xyv1HEBUjsEwjbNoqwSjtNM3tBn5q5JxGaCdq9NqZGaB2 G+u1ZJ6LwWCQ6l4d+s+BZ6a4DO/WQHuv7KqmsnOW9WId8/3AP2S8dpatVMyk5+x0ZDtl b2sg== X-Gm-Message-State: APjAAAXVvd+oygO6WFvE7TwjmfZbUUbMquOlLxDhoVdtXvJP1fablH3T IFVBwQluH3hnqtn2+ezRMsA= 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190902_023636_364915_CC1BC148 X-CRM114-Status: GOOD ( 15.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:STAGING SUBSYSTEM" , Fabio Estevam , 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel