From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Tommaso Merciai <tomm.merciai@gmail.com>,
linuxfancy@googlegroups.com, julien.massot@collabora.com,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] media: i2c: max96714: add HAS_EVENTS subdev flag
Date: Thu, 12 Sep 2024 15:18:16 +0300 [thread overview]
Message-ID: <20240912121816.GC25276@pendragon.ideasonboard.com> (raw)
In-Reply-To: <ZuLbPMluhB4NL7ty@kekkonen.localdomain>
On Thu, Sep 12, 2024 at 12:14:52PM +0000, Sakari Ailus wrote:
> On Thu, Sep 12, 2024 at 03:05:10PM +0300, Laurent Pinchart wrote:
> > On Thu, Sep 12, 2024 at 01:11:13PM +0200, Tommaso Merciai wrote:
> > > On Thu, Sep 12, 2024 at 01:44:09PM +0300, Laurent Pinchart wrote:
> > > > On Tue, Sep 10, 2024 at 03:44:27PM +0200, Tommaso Merciai wrote:
> > > > > Controls can be exposed to userspace via a v4l-subdevX device, and
> > > > > userspace has to be able to subscribe to control events so that it is
> > > > > notified when the control changes value. Add missing HAS_EVENTS flag.
> > > >
> > > > How is this supposed to work, given that the driver doesn't implement
> > > > .subscribe_event() ?
> > >
> > > You are completely right, sorry.
> > > I think in both cases I'm missing:
> > >
> > > diff --git a/drivers/media/i2c/max96714.c b/drivers/media/i2c/max96714.c
> > > index 94b1bc000e48..2257b6b807ea 100644
> > > --- a/drivers/media/i2c/max96714.c
> > > +++ b/drivers/media/i2c/max96714.c
> > > @@ -17,6 +17,7 @@
> > >
> > > #include <media/v4l2-cci.h>
> > > #include <media/v4l2-ctrls.h>
> > > +#include <media/v4l2-event.h>
> > > #include <media/v4l2-fwnode.h>
> > > #include <media/v4l2-subdev.h>
> > >
> > > @@ -488,6 +489,8 @@ static int max96714_log_status(struct v4l2_subdev *sd)
> > >
> > > static const struct v4l2_subdev_core_ops max96714_subdev_core_ops = {
> > > .log_status = max96714_log_status,
> > > + .subscribe_event = v4l2_ctrl_subdev_subscribe_event,
> > > + .unsubscribe_event = v4l2_event_subdev_unsubscribe,
> > > };
> > >
> > > static const struct v4l2_subdev_video_ops max96714_video_ops = {
> > >
> > > Like you suggest. Or I'm wrong?
> >
> > That looks better :-)
> >
> > Out of curiosity, what's your use case for control events ?
>
> I'm not sure if there's a use case, however control event should be
> supported when a driver supports controls.
Not disputing that. That's why I asked "out of curiosity".
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2024-09-12 12:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 13:44 [PATCH 0/2] media: i2c: max96714/max96717 Tommaso Merciai
2024-09-10 13:44 ` [PATCH 1/2] media: i2c: max96714: add HAS_EVENTS subdev flag Tommaso Merciai
2024-09-12 10:44 ` Laurent Pinchart
2024-09-12 11:11 ` Tommaso Merciai
2024-09-12 12:05 ` Laurent Pinchart
2024-09-12 12:14 ` Sakari Ailus
2024-09-12 12:18 ` Laurent Pinchart [this message]
2024-09-12 12:52 ` Tommaso Merciai
2024-09-10 13:44 ` [PATCH 2/2] media: i2c: max96717: " Tommaso Merciai
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=20240912121816.GC25276@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=julien.massot@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linuxfancy@googlegroups.com \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tomm.merciai@gmail.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
all inboxes | Powered by JetHome®