mbox series

[RFC,0/4] media: Introduce post_register() subdev operation

Message ID 20210617171611.80542-1-jacopo+renesas@jmondi.org (mailing list archive)
Headers show
Series media: Introduce post_register() subdev operation | expand

Message

Jacopo Mondi June 17, 2021, 5:16 p.m. UTC
Hello Hans,
   this is the result of the discussion we had yesterday, sent out just to
have a taste of how it looks like.

I won't pretend I like the outcome: it feels a bit hackish and meant to support
this precise use case.

Compared to the proposal to resurect 'init()' it indeed has the advantage that
the subdevice driver works in both deffered and non-deferred mode, but the
notifier flags seems really custom.

Also, being the new flag part of the notifier it won't be available for i2c
subdevs.

What do you think ? Does the result match your understanding ?

Thanks
  j

Jacopo Mondi (4):
  media: v4l2-subdev: Introduce post_register() core op
  media: v4l2-async: Add notifier flags
  media: v4l2-async: Call post_register() subdev op
  media: i2c: gmsl: Defer camera intialization

 drivers/media/i2c/max9286.c          | 21 ++++++--
 drivers/media/i2c/rdacm20.c          | 81 ++++++++++++++++------------
 drivers/media/v4l2-core/v4l2-async.c | 11 ++++
 include/media/v4l2-async.h           | 10 ++++
 include/media/v4l2-subdev.h          |  3 ++
 5 files changed, 89 insertions(+), 37 deletions(-)

--
2.31.1

Comments

Hans Verkuil June 18, 2021, 10:21 a.m. UTC | #1
On 17/06/2021 19:16, Jacopo Mondi wrote:
> Hello Hans,
>    this is the result of the discussion we had yesterday, sent out just to
> have a taste of how it looks like.
> 
> I won't pretend I like the outcome: it feels a bit hackish and meant to support
> this precise use case.
> 
> Compared to the proposal to resurect 'init()' it indeed has the advantage that
> the subdevice driver works in both deffered and non-deferred mode, but the
> notifier flags seems really custom.
> 
> Also, being the new flag part of the notifier it won't be available for i2c
> subdevs.
> 
> What do you think ? Does the result match your understanding ?

That's what I came up with, yes. I think some of the names can be improved,
but otherwise the mechanism is what I had in mind.

Regards,

	Hans

> 
> Thanks
>   j
> 
> Jacopo Mondi (4):
>   media: v4l2-subdev: Introduce post_register() core op
>   media: v4l2-async: Add notifier flags
>   media: v4l2-async: Call post_register() subdev op
>   media: i2c: gmsl: Defer camera intialization
> 
>  drivers/media/i2c/max9286.c          | 21 ++++++--
>  drivers/media/i2c/rdacm20.c          | 81 ++++++++++++++++------------
>  drivers/media/v4l2-core/v4l2-async.c | 11 ++++
>  include/media/v4l2-async.h           | 10 ++++
>  include/media/v4l2-subdev.h          |  3 ++
>  5 files changed, 89 insertions(+), 37 deletions(-)
> 
> --
> 2.31.1
>
Jacopo Mondi July 5, 2021, 2:58 p.m. UTC | #2
Hi Hans,

On Fri, Jun 18, 2021 at 12:21:43PM +0200, Hans Verkuil wrote:
> On 17/06/2021 19:16, Jacopo Mondi wrote:
> > Hello Hans,
> >    this is the result of the discussion we had yesterday, sent out just to
> > have a taste of how it looks like.
> >
> > I won't pretend I like the outcome: it feels a bit hackish and meant to support
> > this precise use case.
> >
> > Compared to the proposal to resurect 'init()' it indeed has the advantage that
> > the subdevice driver works in both deffered and non-deferred mode, but the
> > notifier flags seems really custom.
> >
> > Also, being the new flag part of the notifier it won't be available for i2c
> > subdevs.
> >
> > What do you think ? Does the result match your understanding ?
>
> That's what I came up with, yes. I think some of the names can be improved,
> but otherwise the mechanism is what I had in mind.

Great then! Do you have any suggestions on names that can help moving
forward ?

Thanks
  j

>
> Regards,
>
> 	Hans
>
> >
> > Thanks
> >   j
> >
> > Jacopo Mondi (4):
> >   media: v4l2-subdev: Introduce post_register() core op
> >   media: v4l2-async: Add notifier flags
> >   media: v4l2-async: Call post_register() subdev op
> >   media: i2c: gmsl: Defer camera intialization
> >
> >  drivers/media/i2c/max9286.c          | 21 ++++++--
> >  drivers/media/i2c/rdacm20.c          | 81 ++++++++++++++++------------
> >  drivers/media/v4l2-core/v4l2-async.c | 11 ++++
> >  include/media/v4l2-async.h           | 10 ++++
> >  include/media/v4l2-subdev.h          |  3 ++
> >  5 files changed, 89 insertions(+), 37 deletions(-)
> >
> > --
> > 2.31.1
> >
>