All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: Jacopo Mondi <jacopo+renesas@jmondi.org>
Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [RFC 2/4] media: v4l2-async: Add notifier flags
Date: Tue, 6 Jul 2021 09:47:34 +0200	[thread overview]
Message-ID: <1a8bcd93-bb03-45f5-dd57-9732463584dd@xs4all.nl> (raw)
In-Reply-To: <20210617171611.80542-3-jacopo+renesas@jmondi.org>

On 17/06/2021 19:16, Jacopo Mondi wrote:
> Add a 'flags' field to the async notifier structure and define the
> V4L2_ASYNC_NOTIFIER_SKIP_POST_REGISTER flag.
> 
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> ---
>  drivers/media/v4l2-core/v4l2-async.c |  1 +
>  include/media/v4l2-async.h           | 10 ++++++++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> index cd9e78c63791..0836e01e59ca 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -472,6 +472,7 @@ static int v4l2_async_notifier_asd_valid(struct v4l2_async_notifier *notifier,
>  void v4l2_async_notifier_init(struct v4l2_async_notifier *notifier)
>  {
>  	INIT_LIST_HEAD(&notifier->asd_list);
> +	notifier->flags = 0;
>  }
>  EXPORT_SYMBOL(v4l2_async_notifier_init);
>  
> diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h
> index 5b275a845c20..3f0627bf8894 100644
> --- a/include/media/v4l2-async.h
> +++ b/include/media/v4l2-async.h
> @@ -92,6 +92,13 @@ struct v4l2_async_notifier_operations {
>  		       struct v4l2_async_subdev *asd);
>  };
>  
> +/*
> + * Set this flag to instruct the core framework not to call the post_register()
> + * core operation. The driver that registered the notifier will take care to
> + * do so eventually.
> + */
> +#define V4L2_ASYNC_NOTIFIER_SKIP_POST_REGISTER		(1U << 0)

How about: V4L2_ASYNC_NOTIFIER_DEFER_POST_REGISTER

I think that's a better name: it is not skipped, it is just called later.

Regards,

	Hans

> +
>  /**
>   * struct v4l2_async_notifier - v4l2_device notifier data
>   *
> @@ -103,6 +110,8 @@ struct v4l2_async_notifier_operations {
>   * @waiting:	list of struct v4l2_async_subdev, waiting for their drivers
>   * @done:	list of struct v4l2_subdev, already probed
>   * @list:	member in a global list of notifiers
> + * @flags:	notifier's flags. Can be:
> + * 	%V4L2_ASYNC_NOTIFIER_SKIP_POST_REGISTER
>   */
>  struct v4l2_async_notifier {
>  	const struct v4l2_async_notifier_operations *ops;
> @@ -113,6 +122,7 @@ struct v4l2_async_notifier {
>  	struct list_head waiting;
>  	struct list_head done;
>  	struct list_head list;
> +	u32 flags;
>  };
>  
>  /**
> 


  reply	other threads:[~2021-07-06  7:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 17:16 [RFC 0/4] media: Introduce post_register() subdev operation Jacopo Mondi
2021-06-17 17:16 ` [RFC 1/4] media: v4l2-subdev: Introduce post_register() core op Jacopo Mondi
2021-06-17 17:16 ` [RFC 2/4] media: v4l2-async: Add notifier flags Jacopo Mondi
2021-07-06  7:47   ` Hans Verkuil [this message]
2021-06-17 17:16 ` [RFC 3/4] media: v4l2-async: Call post_register() subdev op Jacopo Mondi
2021-06-17 17:16 ` [RFC 4/4] media: i2c: gmsl: Defer camera intialization Jacopo Mondi
2021-06-18 10:21 ` [RFC 0/4] media: Introduce post_register() subdev operation Hans Verkuil
2021-07-05 14:58   ` Jacopo Mondi

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=1a8bcd93-bb03-45f5-dd57-9732463584dd@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=jacopo+renesas@jmondi.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --subject='Re: [RFC 2/4] media: v4l2-async: Add notifier flags' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.