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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id CC93CC43334 for ; Sat, 18 Jun 2022 23:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tu3L5VC2aIvyVBoVoMD7Fzc9Nc7HvQPFxnRSHQAuteM=; b=O1wrkbgptCQS55 S4ie40Jc6SfmHmLSoUlByU3KvxEH11ULDs7kLUHu5KmGrHWHRotq8aQ3bCjdiWQBqbBI7APZpwUEf Oi07JWY2slwlvmFyLgTxhTGMrp2D17hOBjfUGpTi4FZVOcPJu7S1uptTsw0Q5moaxRdK2DDEXuF+M wwbMRq0Or31uuHHaDDJWmWUiQNOSyx5oG0BFviDzJh4SSsYDSNIPB/1yasSd2OkcRITIPjJlqq5fS fgSWvL4YipbsKw7SQxbQdStZ48noa384QRo9yrTPxTLLal1gPnq4wAv1nGOvUB+2kw2TOpAPE5Sk+ 7mbuSUDzo0uOYCwYlZvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2hk8-00CY2E-12; Sat, 18 Jun 2022 23:20:40 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2hk5-00CY1V-6I for linux-arm-kernel@lists.infradead.org; Sat, 18 Jun 2022 23:20:38 +0000 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 373E0993; Sun, 19 Jun 2022 01:20:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1655594435; bh=HW//KFvb3Uk1kTukT6WoPhd8syVLHG4jvIVfhXbA0xg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pOim59snAyG18oMGuvXRytr9N1CrqP/+U0vv5GplDY/sj8Sppywrql/6qEBiSPa0M ixcBxm2tmcQcb+aq9A8oAW61YbfYK3Ao3lnG7aA34UoZ1JYrVfcsDp47DnDGlDBfR8 tlklJYqTOCEY5/CnxwaY/SLcLZn/AkPPukWXCamI= Date: Sun, 19 Jun 2022 02:20:21 +0300 From: Laurent Pinchart To: Marek Vasut Cc: linux-media@vger.kernel.org, Alain Volmat , Alexandre Torgue , Amelie DELAUNAY , Hugues FRUCHET , Philippe CORNU , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] media: stm32: dcmi: Register V4L2 subdev nodes Message-ID: References: <20220618222335.478205-1-marex@denx.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220618222335.478205-1-marex@denx.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220618_162037_423845_481DF2C5 X-CRM114-Status: GOOD ( 16.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Marek, Thank you for the patch. On Sun, Jun 19, 2022 at 12:23:35AM +0200, Marek Vasut wrote: > Unless the V4L2 device calls v4l2_device_register_subdev_nodes(), > the /dev/v4l-subdev* sub-device nodes are not registered and thus > not created. Add the missing call. This driver configures the subdevs internally. Exposing the subdev nodes to userspace would conflict with driver operation. If you need the subdev nodes only to query subdev information, you can use v4l2_device_register_ro_subdev_nodes(). Ideally I'd prefer this driver to expose subdev nodes to userspace and stop propagating formats internally, but that may break applications :-( > Signed-off-by: Marek Vasut > Cc: Alain Volmat > Cc: Alexandre Torgue > Cc: Amelie DELAUNAY > Cc: Hugues FRUCHET > Cc: Laurent Pinchart > Cc: Philippe CORNU > Cc: linux-stm32@st-md-mailman.stormreply.com > Cc: linux-arm-kernel@lists.infradead.org > --- > drivers/media/platform/st/stm32/stm32-dcmi.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c > index 5f08ba47ea96b..56f4e04bc7c49 100644 > --- a/drivers/media/platform/st/stm32/stm32-dcmi.c > +++ b/drivers/media/platform/st/stm32/stm32-dcmi.c > @@ -1805,6 +1805,12 @@ static int dcmi_graph_notify_complete(struct v4l2_async_notifier *notifier) > > dcmi->vdev->ctrl_handler = dcmi->source->ctrl_handler; > > + ret = v4l2_device_register_subdev_nodes(&dcmi->v4l2_dev); > + if (ret) { > + dev_err(dcmi->dev, "Count not register subdev nodes\n"); > + return ret; > + } > + > ret = dcmi_formats_init(dcmi); > if (ret) { > dev_err(dcmi->dev, "No supported mediabus format found\n"); -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel