All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/5] Unified fwnode endpoint parser
@ 2017-08-29 11:03 ` Sakari Ailus
  0 siblings, 0 replies; 27+ messages in thread
From: Sakari Ailus @ 2017-08-29 11:03 UTC (permalink / raw)
  To: linux-media-u79uwXL29TY76Z2rM5mHXA
  Cc: niklas.soderlund-1zkq55x86MTxsAP9Fp7wbw,
	robh-DgEjT+Ai2ygdnm+yROfE0A, hverkuil-qWit8jRvyhVmR6Xm/wNWPw,
	laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi folks,

We have a large influx of new, unmerged, drivers that are now parsing
fwnode endpoints and each one of them is doing this a little bit
differently. The needs are still exactly the same for the graph data
structure is device independent. This is still a non-trivial task and the
majority of the driver implementations are buggy, just buggy in different
ways.

Facilitate parsing endpoints by adding a convenience function for parsing
the endpoints, and make the omap3isp and rcar-vin drivers use them as an
example.

since v4:

- Prepend the set with three documentation fixes.

- The driver's async struct must begin with struct v4l2_async_subdev. Fix this
  for omap3isp and document it.

- Improve documentation for new functions.

- Don't use devm_ family of functions for allocating memory. Introduce
  v4l2_async_notifier_release() to release memory resources.

- Rework both v4l2_async_notifier_fwnode_parse_endpoints() and
  v4l2_async_notifier_fwnode_parse_endpoint() and the local functions they
  call. This should make the code cleaner. Despite the name, for linking
  and typical usage reasons the functions remain in v4l2-fwnode.c.

- Convert rcar-vin to use v4l2_async_notifier_fwnode_parse_endpoint().

- Use kvmalloc() for allocating the notifier's subdevs array.

- max_subdevs argument for notifier_realloc is now the total maximum
  number of subdevs, not the number of available subdevs.

- Use fwnode_device_is_available() to make sure the device actually
  exists.

- Move the note telling v4l2_async_notifier_fwnode_parse_endpoints()
  should not be used by new drivers to the last patch adding
  v4l2_async_notifier_fwnode_parse_endpoint().

since v3:

- Rebase on current mediatree master.

since v2:

- Rebase on CCP2 support patches.

- Prepend a patch cleaning up omap3isp driver a little.

since v1:

- The first patch has been merged (it was a bugfix).

- In anticipation that the parsing can take place over several iterations,
  take the existing number of async sub-devices into account when
  re-allocating an array of async sub-devices.

- Rework the first patch to better anticipate parsing single endpoint at a
  time by a driver.

- Add a second patch that adds a function for parsing endpoints one at a
  time based on port and endpoint numbers.

Sakari Ailus (5):
  v4l: fwnode: Move KernelDoc documentation to the header
  v4l: async: Add V4L2 async documentation to the documentation build
  docs-rst: v4l: Include Qualcomm CAMSS in documentation build
  v4l: fwnode: Support generic parsing of graph endpoints in a device
  v4l: fwnode: Support generic parsing of graph endpoints in a single
    port

 Documentation/media/kapi/v4l2-async.rst     |   3 +
 Documentation/media/kapi/v4l2-core.rst      |   1 +
 Documentation/media/v4l-drivers/index.rst   |   1 +
 drivers/media/platform/omap3isp/isp.c       | 115 ++++---------
 drivers/media/platform/omap3isp/isp.h       |   5 +-
 drivers/media/platform/rcar-vin/rcar-core.c | 111 ++++--------
 drivers/media/platform/rcar-vin/rcar-dma.c  |  10 +-
 drivers/media/platform/rcar-vin/rcar-v4l2.c |  14 +-
 drivers/media/platform/rcar-vin/rcar-vin.h  |   4 +-
 drivers/media/v4l2-core/v4l2-async.c        |  16 ++
 drivers/media/v4l2-core/v4l2-fwnode.c       | 254 ++++++++++++++++++++--------
 include/media/v4l2-async.h                  |  20 ++-
 include/media/v4l2-fwnode.h                 | 159 ++++++++++++++++-
 13 files changed, 459 insertions(+), 254 deletions(-)
 create mode 100644 Documentation/media/kapi/v4l2-async.rst

-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-09-01  9:04 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29 11:03 [PATCH v5 0/5] Unified fwnode endpoint parser Sakari Ailus
2017-08-29 11:03 ` Sakari Ailus
     [not found] ` <20170829110313.19538-1-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-08-29 11:03   ` [PATCH v5 1/5] v4l: fwnode: Move KernelDoc documentation to the header Sakari Ailus
2017-08-29 11:03     ` Sakari Ailus
     [not found]     ` <20170829110313.19538-2-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-08-29 12:50       ` Niklas Söderlund
2017-08-29 12:50         ` Niklas Söderlund
2017-08-29 13:15     ` Laurent Pinchart
2017-08-29 13:20       ` Sakari Ailus
2017-08-29 13:20         ` Sakari Ailus
2017-08-29 13:22         ` Sakari Ailus
2017-08-29 11:03   ` [PATCH v5 2/5] v4l: async: Add V4L2 async documentation to the documentation build Sakari Ailus
2017-08-29 11:03     ` Sakari Ailus
2017-08-29 12:52     ` Niklas Söderlund
2017-08-29 11:03   ` [PATCH v5 4/5] v4l: fwnode: Support generic parsing of graph endpoints in a device Sakari Ailus
2017-08-29 11:03     ` Sakari Ailus
     [not found]     ` <20170829110313.19538-5-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-08-29 14:02       ` Laurent Pinchart
2017-08-29 14:02         ` Laurent Pinchart
2017-08-29 14:31         ` Sakari Ailus
2017-08-29 14:31           ` Sakari Ailus
     [not found]           ` <20170829143121.6sjdx3lgcoxm6mva-S+BSfZ9RZZmRSg0ZkenSGLdO1Tsj/99ntUK59QYPAWc@public.gmane.org>
2017-09-01  8:55             ` Laurent Pinchart
2017-09-01  8:55               ` Laurent Pinchart
2017-09-01  9:04               ` Sakari Ailus
2017-08-29 11:03 ` [PATCH v5 3/5] docs-rst: v4l: Include Qualcomm CAMSS in documentation build Sakari Ailus
     [not found]   ` <20170829110313.19538-4-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-08-29 13:32     ` Laurent Pinchart
2017-08-29 13:32       ` Laurent Pinchart
2017-08-29 11:03 ` [PATCH v5 5/5] v4l: fwnode: Support generic parsing of graph endpoints in a single port Sakari Ailus
2017-08-29 12:57   ` Niklas Söderlund

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.