From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Hans Verkuil <hverkuil@xs4all.nl>,
Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
linux-media@vger.kernel.org, linux-sh@vger.kernel.org,
Magnus Damm <magnus.damm@gmail.com>,
Sakari Ailus <sakari.ailus@iki.fi>,
Prabhakar Lad <prabhakar.lad@ti.com>,
Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH v10 16/21] V4L2: support asynchronous subdevice registration
Date: Fri, 14 Jun 2013 14:58:48 +0200 [thread overview]
Message-ID: <1401621.8faXML07Vy@avalon> (raw)
In-Reply-To: <51BAE4FC.4080400@samsung.com>
Hi Sylwester,
On Friday 14 June 2013 11:40:12 Sylwester Nawrocki wrote:
> On 06/14/2013 11:14 AM, Guennadi Liakhovetski wrote:
> > On Fri, 14 Jun 2013, Hans Verkuil wrote:
> >> On Fri 14 June 2013 09:14:48 Guennadi Liakhovetski wrote:
> >>> On Thu, 13 Jun 2013, Sylwester Nawrocki wrote:
> >>>> On 06/11/2013 10:23 AM, Guennadi Liakhovetski wrote:
> [...]
>
> >>>>> + * @v4l2_dev: pointer to struct v4l2_device
> >>>>> + * @waiting: list of struct v4l2_async_subdev, waiting for their
> >>>>> drivers
> >>>>> + * @done: list of struct v4l2_async_subdev_list, already probed
> >>>>> + * @list: member in a global list of notifiers
> >>>>> + * @bound: a subdevice driver has successfully probed one of
> >>>>> subdevices
> >>>>> + * @complete: all subdevices have been probed successfully
> >>>>> + * @unbind: a subdevice is leaving
> >>>>> + */
> >>>>> +struct v4l2_async_notifier {
> >>>>> + unsigned int subdev_num;
> >>>>> + struct v4l2_async_subdev **subdev;
> >>>>> + struct v4l2_device *v4l2_dev;
> >>>>> + struct list_head waiting;
> >>>>> + struct list_head done;
> >>>>> + struct list_head list;
> >>>>> + int (*bound)(struct v4l2_async_notifier *notifier,
> >>>>> + struct v4l2_subdev *subdev,
> >>>>> + struct v4l2_async_subdev *asd);
> >>>>> + int (*complete)(struct v4l2_async_notifier *notifier);
> >>>>> + void (*unbind)(struct v4l2_async_notifier *notifier,
> >>>>> + struct v4l2_subdev *subdev,
> >>>>> + struct v4l2_async_subdev *asd);
> >>>>> +};
> >>>>> +
> >>>>> +int v4l2_async_notifier_register(struct v4l2_device *v4l2_dev,
> >>>>> + struct v4l2_async_notifier *notifier);
> >>>>> +void v4l2_async_notifier_unregister(struct v4l2_async_notifier
> >>>>> *notifier);
> >>>>> +int v4l2_async_register_subdev(struct v4l2_subdev *sd);
> >>>>> +void v4l2_async_unregister_subdev(struct v4l2_subdev *sd);
> >>>>
> >>>> I still think "async_" in this public API is unnecessary, since we
> >>>> register/ unregister a subdev with the core and notifiers are
> >>>> intrinsically
> >>>> asynchronous.
> >>>> But your preference seems be otherwise, what could I do... :) At most
> >>>> it just means one less happy user of this interface.
> >>
> >> I think v4l2_register_subdev looks awfully similar to
> >> v4l2_device_register_subdev. It becomes very confusing naming it like
> >> that. I prefer v4l2_async where 'async' refers to the v4l2-async module.
>
> Ok, let's leave v4l2_async then.
>
> > And v4l2(_async)_notifier_(un)register()?
>
> I guess it would be better to have all or none of the functions
> with that prefix. So either:
>
> v4l2_async_notifier_register
> v4l2_async_notifier_unregister
> v4l2_async_register_subdev
> v4l2_async_unregister_subdev
>
> or
>
> v4l2_subdev_notifier_register
> v4l2_subdev_notifier_unregister
> v4l2_subdev_register
> v4l2_subdev_unregister
I prefer the section option, but I'm fine with the first one for now. As Hans
pointed out, it would be pretty easy to confuse v4l2_subdev_register with
v4l2_device_register_subdev. In the long term we want to move all drivers to
asynchronous registration. When that happens it won't be difficult to revisit
the API to remove unused functions and rename v4l2_aysnc_* to just v4l2_*.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-06-14 12:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 8:23 [PATCH v10 00/21] V4L2 clock and asynchronous probing Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 01/21] soc-camera: move common code to soc_camera.c Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 02/21] soc-camera: add host clock callbacks to start and stop the master clock Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 03/21] pxa-camera: move interface activation and deactivation to clock callbacks Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 04/21] omap1-camera: " Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 05/21] atmel-isi: " Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 06/21] mx3-camera: " Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 07/21] mx2-camera: " Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 08/21] mx1-camera: " Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 09/21] sh-mobile-ceu-camera: " Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 10/21] soc-camera: make .clock_{start,stop} compulsory, .add / .remove optional Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 11/21] soc-camera: don't attach the client to the host during probing Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 12/21] sh-mobile-ceu-camera: add primitive OF support Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 13/21] sh-mobile-ceu-driver: support max width and height in DT Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 14/21] V4L2: add temporary clock helpers Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 15/21] V4L2: add a device pointer to struct v4l2_subdev Guennadi Liakhovetski
2013-06-12 17:16 ` Prabhakar Lad
2013-06-13 10:32 ` Hans Verkuil
2013-06-11 8:23 ` [PATCH v10 16/21] V4L2: support asynchronous subdevice registration Guennadi Liakhovetski
2013-06-12 17:18 ` Prabhakar Lad
2013-06-13 21:37 ` Sylwester Nawrocki
2013-06-14 7:14 ` Guennadi Liakhovetski
2013-06-14 9:07 ` Hans Verkuil
2013-06-14 9:14 ` Guennadi Liakhovetski
2013-06-14 9:40 ` Sylwester Nawrocki
2013-06-14 9:44 ` Guennadi Liakhovetski
2013-06-14 12:58 ` Laurent Pinchart [this message]
2013-06-14 13:03 ` Laurent Pinchart
2013-06-13 21:39 ` [PATCH] V4L2: Merge struct v4l2_async_subdev_list with struct v4l2_subdev Sylwester Nawrocki
2013-06-11 8:23 ` [PATCH v10 17/21] soc-camera: switch I2C subdevice drivers to use v4l2-clk Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 18/21] soc-camera: add V4L2-async support Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 19/21] sh_mobile_ceu_camera: add asynchronous subdevice probing support Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 20/21] imx074: support asynchronous probing Guennadi Liakhovetski
2013-06-11 8:23 ` [PATCH v10 21/21] ARM: shmobile: convert ap4evb to asynchronously register camera subdevices Guennadi Liakhovetski
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=1401621.8faXML07Vy@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=g.liakhovetski@gmx.de \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=prabhakar.lad@ti.com \
--cc=s.hauer@pengutronix.de \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@iki.fi \
--cc=sylvester.nawrocki@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