From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Manivannan Sadhasivam <mani@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org,
Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>
Subject: Re: [PATCH 03/11] media: i2c: imx290: Add V4L2_SUBDEV_FL_HAS_EVENTS and subscribe hooks
Date: Fri, 03 Feb 2023 09:54:46 +0100 [thread overview]
Message-ID: <38083473.10thIPus4b@steina-w> (raw)
In-Reply-To: <20230131192016.3476937-4-dave.stevenson@raspberrypi.com>
Hi Dave,
thanks for the patch.
Am Dienstag, 31. Januar 2023, 20:20:08 CET schrieb Dave Stevenson:
> Any V4L2 subdevice that implements controls and declares
> V4L2_SUBDEV_FL_HAS_DEVNODE should also declare V4L2_SUBDEV_FL_HAS_EVENTS
> and implement subscribe_event and unsubscribe_event hooks.
>
> This driver didn't and would therefore fail v4l2-compliance
> testing.
>
> Add the relevant hooks.
>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> drivers/media/i2c/imx290.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
> index bf96fd914303..12946ca9d8d2 100644
> --- a/drivers/media/i2c/imx290.c
> +++ b/drivers/media/i2c/imx290.c
> @@ -20,6 +20,7 @@
> #include <media/media-entity.h>
> #include <media/v4l2-ctrls.h>
> #include <media/v4l2-device.h>
> +#include <media/v4l2-event.h>
> #include <media/v4l2-fwnode.h>
> #include <media/v4l2-subdev.h>
>
> @@ -977,6 +978,11 @@ static int imx290_entity_init_cfg(struct v4l2_subdev
> *subdev, return 0;
> }
>
> +static const struct v4l2_subdev_core_ops imx290_core_ops = {
> + .subscribe_event = v4l2_ctrl_subdev_subscribe_event,
> + .unsubscribe_event = v4l2_event_subdev_unsubscribe,
> +};
> +
> static const struct v4l2_subdev_video_ops imx290_video_ops = {
> .s_stream = imx290_set_stream,
> };
> @@ -991,6 +997,7 @@ static const struct v4l2_subdev_pad_ops imx290_pad_ops =
> { };
>
> static const struct v4l2_subdev_ops imx290_subdev_ops = {
> + .core = &imx290_core_ops,
> .video = &imx290_video_ops,
> .pad = &imx290_pad_ops,
> };
> @@ -1009,7 +1016,8 @@ static int imx290_subdev_init(struct imx290 *imx290)
> imx290->current_mode = &imx290_modes_ptr(imx290)[0];
>
> v4l2_i2c_subdev_init(&imx290->sd, client, &imx290_subdev_ops);
> - imx290->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
> + imx290->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
> + V4L2_SUBDEV_FL_HAS_EVENTS;
> imx290->sd.dev = imx290->dev;
> imx290->sd.entity.ops = &imx290_subdev_entity_ops;
> imx290->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
next prev parent reply other threads:[~2023-02-03 8:54 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 19:20 [PATCH 00/11] imx290: Minor fixes, support for alternate INCK, and more ctrls Dave Stevenson
2023-01-31 19:20 ` [PATCH 01/11] media: i2c: imx290: Match kernel coding style on whitespace Dave Stevenson
2023-02-02 0:21 ` Laurent Pinchart
2023-01-31 19:20 ` [PATCH 02/11] media: i2c: imx290: Set the colorspace fields in the format Dave Stevenson
2023-02-02 0:29 ` Laurent Pinchart
2023-01-31 19:20 ` [PATCH 03/11] media: i2c: imx290: Add V4L2_SUBDEV_FL_HAS_EVENTS and subscribe hooks Dave Stevenson
2023-02-02 0:29 ` Laurent Pinchart
2023-02-03 8:54 ` Alexander Stein [this message]
2023-01-31 19:20 ` [PATCH 04/11] media: i2c: imx290: Fix the pixel rate at 148.5Mpix/s Dave Stevenson
2023-02-02 8:13 ` Laurent Pinchart
2023-01-31 19:20 ` [PATCH 05/11] media: i2c: imx290: Support 60fps in 2 lane operation Dave Stevenson
2023-02-02 10:50 ` Laurent Pinchart
2023-02-03 8:50 ` Alexander Stein
2023-01-31 19:20 ` [PATCH 06/11] media: i2c: imx290: Use CSI timings as per datasheet Dave Stevenson
2023-02-02 14:36 ` Laurent Pinchart
2023-02-03 8:04 ` Alexander Stein
2023-02-03 9:09 ` Dave Stevenson
2023-01-31 19:20 ` [PATCH 07/11] media: i2c: imx290: Convert V4L2_CID_HBLANK to read/write Dave Stevenson
2023-02-02 14:58 ` Laurent Pinchart
2023-02-02 15:48 ` Dave Stevenson
2023-02-02 22:14 ` Laurent Pinchart
2023-02-03 7:19 ` Alexander Stein
2023-02-03 8:05 ` Dave Stevenson
2023-02-03 8:39 ` Alexander Stein
2023-01-31 19:20 ` [PATCH 08/11] media: i2c: imx290: Convert V4L2_CID_VBLANK " Dave Stevenson
2023-02-02 15:40 ` Alexander Stein
2023-02-02 16:04 ` Dave Stevenson
2023-02-02 17:42 ` Dave Stevenson
2023-02-03 7:16 ` Alexander Stein
2023-02-02 16:01 ` Laurent Pinchart
2023-01-31 19:20 ` [PATCH 09/11] media: i2c: imx290: Remove duplicated write to IMX290_CTRL_07 Dave Stevenson
2023-02-02 16:04 ` Laurent Pinchart
2023-02-03 7:45 ` Alexander Stein
2023-01-31 19:20 ` [PATCH 10/11] media: i2c: imx290: Add support for 74.25MHz external clock Dave Stevenson
2023-02-02 22:03 ` Laurent Pinchart
2023-02-03 17:04 ` Dave Stevenson
2023-02-03 18:04 ` Laurent Pinchart
2023-02-03 7:44 ` Alexander Stein
2023-02-03 8:59 ` Laurent Pinchart
2023-02-03 9:30 ` Dave Stevenson
2023-01-31 19:20 ` [PATCH 11/11] media: i2c: imx290: Add support for H & V Flips Dave Stevenson
2023-02-02 22:10 ` Laurent Pinchart
2023-02-03 10:21 ` Dave Stevenson
2023-02-03 18:01 ` Laurent Pinchart
2023-02-03 7:35 ` Alexander Stein
2023-02-03 7:57 ` Dave Stevenson
2023-02-03 8:33 ` Alexander Stein
2023-02-03 9:47 ` Dave Stevenson
2023-02-02 22:16 ` [PATCH 00/11] imx290: Minor fixes, support for alternate INCK, and more ctrls Laurent Pinchart
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=38083473.10thIPus4b@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mchehab@kernel.org \
/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