All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] V4L2 Async notifier API cleanup
@ 2021-01-12 13:23 Ezequiel Garcia
  2021-01-12 13:23 ` [PATCH 01/13] media: v4l2-async: Clean v4l2_async_notifier_add_fwnode_remote_subdev semantics Ezequiel Garcia
                   ` (12 more replies)
  0 siblings, 13 replies; 41+ messages in thread
From: Ezequiel Garcia @ 2021-01-12 13:23 UTC (permalink / raw)
  To: linux-media, Hans Verkuil
  Cc: kernel, Laurent Pinchart, Sakari Ailus, Ezequiel Garcia

The goal of this series is to make the API more consistent,
also fixing all the drivers which are currently misusing the API.

With this change, the v4l2-async functions that add subdevices
to a notifier have the same semantics, that is they all
allocate a struct v4l2_async_subdev, and take a size argument
for drivers to embed struct v4l2_async_subdev in a larger
struct.

This makes the struct v4l2_async_subdev allocation model
more consistent, simpler to understand, and harder to misuse.

The V4L2 sub-devices documentation, as well as the kernel-doc
are also improved a bit, clarifying the API.

Finally, all the drivers previously using v4l2_async_notifier_add_subdev
are converted to proper helpers,

I have tried to convert the drivers in the least invasive way,
keeping the original code as much as possible. In many cases,
specially the old drivers, there is some bitrot and some room
for more cleanups, which is beyond the scope of this patchset.

I'd like to make v4l2_async_notifier_add_subdev() internal, which
might be possible once the (currently deprecated)
v4l2_async_notifier_parse_fwnode_endpoints() function
is removed. For the time being, I'm proposing to rename
v4l2_async_notifier_add_subdev to __v4l2_async_notifier_add_subdev,
so it's clearer the function is not really meant for drivers to use.

Ezequiel Garcia (13):
  media: v4l2-async: Clean v4l2_async_notifier_add_fwnode_remote_subdev semantics
  media: stm32-dcmi: Use v4l2_async_notifier_add_fwnode_remote_subdev helpers
  media: renesas-ceu: Use v4l2_async_notifier_add_{i2c,fwnode_remote}_subdev helpers
  media: exynos4-is: Use v4l2_async_notifier_add_fwnode_remote_subdev
  media: st-mipid02: Use v4l2_async_notifier_add_fwnode_remote_subdev helpers
  media: atmel: Use v4l2_async_notifier_add_fwnode_remote_subdev helpers
  media: cdns-csi2rx: Use v4l2_async_notifier_add_fwnode_remote_subdev helpers
  media: marvell-ccic: Use v4l2_async_notifier_add_{i2c,fwnode_remote}_subdev helpers
  media: pxa-camera: Use v4l2_async_notifier_add_{i2c,fwnode_remote}_subdev helpers
  media: davinci: vpif_display: Remove unused v4l2-async code
  media: v4l2-async: Drop v4l2_fwnode_reference_parse_sensor_common mention
  media: Clarify v4l2-async subdevice addition API
  media: v4l2-async: Discourage use of v4l2_async_notifier_add_subdev

 .../driver-api/media/v4l2-subdev.rst          | 38 ++++++--
 drivers/media/i2c/st-mipid02.c                | 16 ++--
 drivers/media/pci/intel/ipu3/ipu3-cio2.c      | 17 ++--
 drivers/media/platform/atmel/atmel-isc.h      |  1 +
 drivers/media/platform/atmel/atmel-isi.c      | 46 +++-------
 .../media/platform/atmel/atmel-sama5d2-isc.c  | 44 ++++-----
 drivers/media/platform/cadence/cdns-csi2rx.c  | 16 ++--
 drivers/media/platform/davinci/vpif_display.c | 86 ++++--------------
 drivers/media/platform/davinci/vpif_display.h |  1 -
 drivers/media/platform/exynos4-is/media-dev.c | 25 +++---
 drivers/media/platform/exynos4-is/media-dev.h |  2 +-
 .../media/platform/marvell-ccic/cafe-driver.c | 14 ++-
 .../media/platform/marvell-ccic/mcam-core.c   | 10 ---
 .../media/platform/marvell-ccic/mcam-core.h   |  1 -
 .../media/platform/marvell-ccic/mmp-driver.c  | 11 ++-
 drivers/media/platform/omap3isp/isp.c         | 78 +++++++---------
 drivers/media/platform/pxa_camera.c           | 53 +++++------
 drivers/media/platform/renesas-ceu.c          | 89 +++++++------------
 .../platform/rockchip/rkisp1/rkisp1-dev.c     | 15 ++--
 drivers/media/platform/stm32/stm32-dcmi.c     | 86 +++++++-----------
 .../platform/sunxi/sun4i-csi/sun4i_csi.c      |  9 +-
 .../platform/sunxi/sun4i-csi/sun4i_csi.h      |  1 -
 drivers/media/platform/video-mux.c            | 14 +--
 drivers/media/v4l2-core/v4l2-async.c          | 34 +++----
 drivers/media/v4l2-core/v4l2-fwnode.c         |  2 +-
 drivers/staging/media/imx/imx-media-csi.c     | 14 +--
 drivers/staging/media/imx/imx6-mipi-csi2.c    | 19 ++--
 drivers/staging/media/imx/imx7-media-csi.c    | 16 ++--
 drivers/staging/media/imx/imx7-mipi-csis.c    | 15 +---
 include/media/davinci/vpif_types.h            |  2 -
 include/media/v4l2-async.h                    | 40 ++++++---
 31 files changed, 323 insertions(+), 492 deletions(-)

-- 
2.29.2


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

end of thread, other threads:[~2021-01-17 17:59 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 13:23 [PATCH 00/13] V4L2 Async notifier API cleanup Ezequiel Garcia
2021-01-12 13:23 ` [PATCH 01/13] media: v4l2-async: Clean v4l2_async_notifier_add_fwnode_remote_subdev semantics Ezequiel Garcia
2021-01-14  1:59   ` Laurent Pinchart
2021-01-14 13:47     ` Sakari Ailus
2021-01-14 14:46       ` Ezequiel Garcia
2021-01-14 16:11         ` Sakari Ailus
2021-01-14 16:22           ` Ezequiel Garcia
2021-01-12 13:23 ` [PATCH 02/13] media: stm32-dcmi: Use v4l2_async_notifier_add_fwnode_remote_subdev helpers Ezequiel Garcia
2021-01-16 15:35   ` Jacopo Mondi
2021-01-16 16:27     ` Ezequiel Garcia
2021-01-12 13:23 ` [PATCH 03/13] media: renesas-ceu: Use v4l2_async_notifier_add_{i2c,fwnode_remote}_subdev helpers Ezequiel Garcia
2021-01-14  2:06   ` Laurent Pinchart
2021-01-14 13:36     ` Ezequiel Garcia
2021-01-15 12:12     ` Ezequiel Garcia
2021-01-16 15:56   ` Jacopo Mondi
2021-01-12 13:23 ` [PATCH 04/13] media: exynos4-is: Use v4l2_async_notifier_add_fwnode_remote_subdev Ezequiel Garcia
2021-01-16 16:07   ` Jacopo Mondi
2021-01-16 16:55     ` Ezequiel Garcia
2021-01-12 13:23 ` [PATCH 05/13] media: st-mipid02: Use v4l2_async_notifier_add_fwnode_remote_subdev helpers Ezequiel Garcia
2021-01-16 16:23   ` Jacopo Mondi
2021-01-12 13:23 ` [PATCH 06/13] media: atmel: " Ezequiel Garcia
2021-01-16 17:21   ` Jacopo Mondi
2021-01-17 17:57     ` Ezequiel Garcia
2021-01-12 13:23 ` [PATCH 07/13] media: cdns-csi2rx: " Ezequiel Garcia
2021-01-16 17:23   ` Jacopo Mondi
2021-01-12 13:23 ` [PATCH 08/13] media: marvell-ccic: Use v4l2_async_notifier_add_{i2c,fwnode_remote}_subdev helpers Ezequiel Garcia
2021-01-16 17:36   ` Jacopo Mondi
2021-01-12 13:23 ` [PATCH 09/13] media: pxa-camera: " Ezequiel Garcia
2021-01-12 13:23 ` [PATCH 10/13] media: davinci: vpif_display: Remove unused v4l2-async code Ezequiel Garcia
2021-01-12 13:23 ` [PATCH 11/13] media: v4l2-async: Drop v4l2_fwnode_reference_parse_sensor_common mention Ezequiel Garcia
2021-01-14  2:14   ` Laurent Pinchart
2021-01-14 13:36     ` Ezequiel Garcia
2021-01-15  6:56       ` Laurent Pinchart
2021-01-12 13:23 ` [PATCH 12/13] media: Clarify v4l2-async subdevice addition API Ezequiel Garcia
2021-01-14  2:21   ` Laurent Pinchart
2021-01-14 13:39     ` Ezequiel Garcia
2021-01-15  8:47       ` Sakari Ailus
2021-01-12 13:23 ` [PATCH 13/13] media: v4l2-async: Discourage use of v4l2_async_notifier_add_subdev Ezequiel Garcia
2021-01-14  2:27   ` Laurent Pinchart
2021-01-14 13:47     ` Ezequiel Garcia
2021-01-15  6:57       ` Laurent Pinchart

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.