linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 00/19] Async sub-notifiers and how to use them
@ 2017-07-18 19:03 Sakari Ailus
  2017-07-18 19:03 ` [RFC 01/19] device property: Introduce fwnode_property_get_reference_args Sakari Ailus
                   ` (19 more replies)
  0 siblings, 20 replies; 50+ messages in thread
From: Sakari Ailus @ 2017-07-18 19:03 UTC (permalink / raw)
  To: linux-media; +Cc: linux-leds, laurent.pinchart, niklas.soderlund, hverkuil

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 4782 bytes --]

Hi folks,

This RFC patchset achieves a number of things which I've put to the same
patchset for they need to be show together to demonstrate the use cases.

I don't really intend this to compete with Niklas's patchset but much of
the problem area addressed by the two is the same.

Comments would be welcome.

- Add AS3645A LED flash class driver.

- Add async notifiers (by Niklas).

- V4L2 sub-device node registration is moved to take place at the same time
  with the registration of the sub-device itself. With this change,
  sub-device node registration behaviour is aligned with video node
  registration.

- The former is made possible by moving the bound() callback after
  sub-device registration.

- As all the device node registration and link creation is done as the
  respective devices are probed, there is no longer dependency to the
  notifier complete callback which as itself is seen problematic. The
  complete callback still exists but there's no need to use it, pending
  changes in individual drivers.

  See:
  <URL:http://www.spinics.net/lists/linux-media/msg118323.html>

  As a result, if a part of the media device fails to initialise because it
  is e.g. physically broken, it will be possible to use what works.

- Finally, the use of the async sub-notifier is hidden in the framework and
  all a driver (such as smiapp) needs to do is to call
  v4l2_subdev_fwnode_reference_parse_sensor_common() in its probe()
  function to find out the associated devices (lens and flash). This
  approach makes it possible to later on to rework the sub-notifier
  implementation without touching driver code. Endpoints can be parsed
  similarly by simply calling v4l2_subdev_fwnode_endpoints_parse() for
  driver's probe function.

The patches depend on this branch currently:

<URL:https://git.linuxtv.org/sailus/media_tree.git/log/?h=as3645a-leds-base>

It's essentially the V4L2 flash class patches I've posted earlier today and
a stash of fwnode property API improvements.


Niklas Söderlund (1):
  v4l: async: add subnotifier registration for subdevices

Sakari Ailus (18):
  device property: Introduce fwnode_property_get_reference_args
  dt: bindings: Add a binding for flash devices associated to a sensor
  dt: bindings: Add lens-focus binding for image sensors
  leds: as3645a: Add LED flash class driver
  leds: as3645a: Separate flash and indicator LED sub-devices
  v4l: fwnode: Support generic parsing of graph endpoints in V4L2
  arm: dts: omap3: N9/N950: Add AS3645A camera flash
  v4l2-fwnode: Add conveniences function for parsing generic references
  v4l2-fwnode: Add convenience function for parsing common external refs
  v4l2-async: Register sub-devices before calling bound callback
  v4l2-subdev: Support registering V4L2 sub-device nodes one by one
  v4l2-device: Register sub-device nodes at sub-device registration time
  omap3isp: Move sub-device link creation to notifier bound callback
  omap3isp: Initialise "crashed" media entity enum in probe
  omap3isp: Move media device registration to probe
  omap3isp: Drop the async notifier callback
  v4l2-fwnode: Add abstracted sub-device notifiers
  smiapp: Add support for flash and lens devices

 .../devicetree/bindings/media/video-interfaces.txt |  10 +
 Documentation/media/kapi/v4l2-subdev.rst           |  20 +
 MAINTAINERS                                        |   6 +
 arch/arm/boot/dts/omap3-n9.dts                     |   1 +
 arch/arm/boot/dts/omap3-n950-n9.dtsi               |  14 +
 arch/arm/boot/dts/omap3-n950.dts                   |   1 +
 drivers/acpi/property.c                            |  27 +
 drivers/base/property.c                            |  12 +
 drivers/leds/Kconfig                               |   8 +
 drivers/leds/Makefile                              |   1 +
 drivers/leds/leds-as3645a.c                        | 762 +++++++++++++++++++++
 drivers/media/i2c/smiapp/smiapp-core.c             |   5 +
 drivers/media/platform/omap3isp/isp.c              | 144 ++--
 drivers/media/platform/omap3isp/isp.h              |   3 -
 drivers/media/v4l2-core/v4l2-async.c               |  96 ++-
 drivers/media/v4l2-core/v4l2-device.c              | 139 ++--
 drivers/media/v4l2-core/v4l2-fwnode.c              | 174 +++++
 drivers/media/v4l2-core/v4l2-subdev.c              |  44 +-
 drivers/of/property.c                              |  31 +
 include/linux/fwnode.h                             |  19 +
 include/linux/property.h                           |   4 +
 include/media/v4l2-async.h                         |  26 +-
 include/media/v4l2-fwnode.h                        |  21 +
 include/media/v4l2-subdev.h                        |  11 +
 24 files changed, 1388 insertions(+), 191 deletions(-)
 create mode 100644 drivers/leds/leds-as3645a.c

-- 
2.11.0

^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2017-08-23 15:40 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-18 19:03 [RFC 00/19] Async sub-notifiers and how to use them Sakari Ailus
2017-07-18 19:03 ` [RFC 01/19] device property: Introduce fwnode_property_get_reference_args Sakari Ailus
2017-07-18 19:03 ` [RFC 02/19] v4l: async: add subnotifier registration for subdevices Sakari Ailus
2017-07-18 21:28   ` Niklas Söderlund
2017-07-18 19:03 ` [RFC 03/19] dt: bindings: Add a binding for flash devices associated to a sensor Sakari Ailus
2017-07-18 19:03 ` [RFC 04/19] dt: bindings: Add lens-focus binding for image sensors Sakari Ailus
2017-07-28  8:53   ` Hans Verkuil
2017-07-28 12:45     ` Pavel Machek
2017-08-15 11:24     ` Sakari Ailus
2017-07-18 19:03 ` [RFC 05/19] leds: as3645a: Add LED flash class driver Sakari Ailus
2017-07-19 20:17   ` Jacek Anaszewski
2017-07-19 21:21     ` Sakari Ailus
2017-07-18 19:03 ` [RFC 06/19] leds: as3645a: Separate flash and indicator LED sub-devices Sakari Ailus
2017-07-18 19:03 ` [RFC 07/19] v4l: fwnode: Support generic parsing of graph endpoints in V4L2 Sakari Ailus
2017-07-18 19:03 ` [RFC 08/19] arm: dts: omap3: N9/N950: Add AS3645A camera flash Sakari Ailus
2017-07-18 19:16   ` Sakari Ailus
2017-07-22  9:40   ` Pavel Machek
2017-07-18 19:03 ` [RFC 09/19] v4l2-fwnode: Add conveniences function for parsing generic references Sakari Ailus
2017-07-18 19:03 ` [RFC 10/19] v4l2-fwnode: Add convenience function for parsing common external refs Sakari Ailus
2017-07-18 19:03 ` [RFC 11/19] v4l2-async: Register sub-devices before calling bound callback Sakari Ailus
2017-07-19 11:24   ` Hans Verkuil
2017-07-20 16:09     ` Sakari Ailus
2017-07-20 16:23       ` Hans Verkuil
2017-07-20 19:23         ` Sakari Ailus
2017-07-21  7:14           ` Hans Verkuil
2017-07-20 23:53         ` Kieran Bingham
2017-07-18 19:03 ` [RFC 12/19] v4l2-subdev: Support registering V4L2 sub-device nodes one by one Sakari Ailus
2017-07-18 19:03 ` [RFC 13/19] v4l2-device: Register sub-device nodes at sub-device registration time Sakari Ailus
2017-07-18 19:03 ` [RFC 14/19] omap3isp: Move sub-device link creation to notifier bound callback Sakari Ailus
2017-07-18 19:03 ` [RFC 15/19] omap3isp: Initialise "crashed" media entity enum in probe Sakari Ailus
2017-07-18 19:03 ` [RFC 16/19] omap3isp: Move media device registration to probe Sakari Ailus
2017-07-18 19:03 ` [RFC 17/19] omap3isp: Drop the async notifier callback Sakari Ailus
2017-07-18 19:04 ` [RFC 18/19] v4l2-fwnode: Add abstracted sub-device notifiers Sakari Ailus
2017-07-18 21:19   ` Niklas Söderlund
2017-07-19 22:20     ` Sakari Ailus
2017-07-19 22:33     ` [RFC 1/1] v4l2-subdev: Add a function to set sub-device notifier callbacks Sakari Ailus
2017-07-26 17:48       ` Mauro Carvalho Chehab
2017-07-18 19:04 ` [RFC 19/19] smiapp: Add support for flash and lens devices Sakari Ailus
2017-07-19 11:42 ` [RFC 00/19] Async sub-notifiers and how to use them Hans Verkuil
2017-07-20 16:14   ` Sakari Ailus
2017-07-21  6:57     ` Niklas Söderlund
2017-08-04 18:25       ` Sakari Ailus
2017-08-23  9:09         ` Hans Verkuil
2017-08-23 11:34           ` Pavel Machek
2017-08-23 12:02             ` Hans Verkuil
2017-08-23 12:29           ` Laurent Pinchart
2017-08-23 15:40             ` Hans Verkuil
2017-08-23 12:59           ` Niklas Söderlund
2017-08-23 13:32             ` Laurent Pinchart
2017-08-23 15:23               ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).