From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Marek Vasut <marex@denx.de>
Cc: linux-media@vger.kernel.org,
Alain Volmat <alain.volmat@foss.st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Amelie DELAUNAY <amelie.delaunay@foss.st.com>,
Hugues FRUCHET <hugues.fruchet@foss.st.com>,
Philippe CORNU <philippe.cornu@foss.st.com>,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] media: stm32: dcmi: Register V4L2 subdev nodes
Date: Sun, 19 Jun 2022 02:20:21 +0300 [thread overview]
Message-ID: <Yq5dtc3MHz5gp5BK@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220618222335.478205-1-marex@denx.de>
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 <marex@denx.de>
> Cc: Alain Volmat <alain.volmat@foss.st.com>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Cc: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
> Cc: Hugues FRUCHET <hugues.fruchet@foss.st.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Philippe CORNU <philippe.cornu@foss.st.com>
> 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
next prev parent reply other threads:[~2022-06-18 23:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-18 22:23 [PATCH] media: stm32: dcmi: Register V4L2 subdev nodes Marek Vasut
2022-06-18 23:20 ` Laurent Pinchart [this message]
2022-06-19 0:28 ` Marek Vasut
2022-06-19 0:33 ` Laurent Pinchart
2022-06-19 0:43 ` Marek Vasut
2022-06-27 8:52 ` Hugues FRUCHET
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yq5dtc3MHz5gp5BK@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=hugues.fruchet@foss.st.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=marex@denx.de \
--cc=philippe.cornu@foss.st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox