Skip to content

media: intel-cio2-bridge: Add shared intel-cio2-bridge code, rework VCM instantiation

Hans de Goede linux-media 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12media: ipu3-cio2: Do not use on stack memory for software_node.name fielddrivers/media/pci/intel/ipu3/cio2-bridge.c drivers/media/pci/intel/ipu3/cio2-bridge.h+4 -40 replies
2/12media: ipu3-cio2: Move initialization of node_names.vcm to cio2_bridge_init_swnode_names()drivers/media/pci/intel/ipu3/cio2-bridge.c+7 -70 replies
3/12media: ipu3-cio2: Make cio2_bridge_init() take a regular struct device as argumentdrivers/media/pci/intel/ipu3/cio2-bridge.c drivers/media/pci/intel/ipu3/ipu3-cio2-main.c drivers/media/pci/intel/ipu3/ipu3-cio2.h+10 -120 replies
4/12media: ipu3-cio2: Store dev pointer in struct cio2_bridgedrivers/media/pci/intel/ipu3/cio2-bridge.c drivers/media/pci/intel/ipu3/cio2-bridge.h+8 -80 replies
5/12media: ipu3-cio2: Only keep PLD around while parsingdrivers/media/pci/intel/ipu3/cio2-bridge.c drivers/media/pci/intel/ipu3/cio2-bridge.h+30 -230 replies
6/12media: ipu3-cio2: Add a cio2_bridge_parse_sensor_fwnode() helper functiondrivers/media/pci/intel/ipu3/cio2-bridge.c drivers/media/pci/intel/ipu3/cio2-bridge.h+56 -441 reply
7/12media: ipu3-cio2: Add a parse_sensor_fwnode callback to cio2_bridge_init()drivers/media/pci/intel/ipu3/cio2-bridge.c drivers/media/pci/intel/ipu3/cio2-bridge.h+17 -30 replies
8/12media: ipu3-cio2: Add supported_sensors parameter to cio2_bridge_init()drivers/media/pci/intel/ipu3/cio2-bridge.c drivers/media/pci/intel/ipu3/cio2-bridge.h+14 -90 replies
9/12media: ipu3-cio2: Move cio2_bridge_init() code into a new shared intel-cio2-bridge.koMAINTAINERS drivers/media/common/Kconfig drivers/media/common/Makefile +5 more+237 -7042 replies
10/12media: atomisp: csi2-bridge: Switch to new common cio2_bridge_init()drivers/staging/media/atomisp/Kconfig drivers/staging/media/atomisp/pci/atomisp_csi2.h drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c +1 more+43 -3340 replies
11/12media: intel-cio2-bridge: Add a runtime-pm device-link between VCM and sensordrivers/media/common/intel-cio2-bridge.c drivers/media/pci/intel/ipu3/ipu3-cio2-main.c drivers/media/pci/intel/ipu3/ipu3-cio2.h +1 more+111 -6111 replies
12/12media: dw9719: Drop hack to enable "vsio" regulatordrivers/media/i2c/dw9719.c+7 -200 replies

Reviews trailers per patch

None of the 12 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndy Shevchenko
SeriesR-b
1/12
2/12
3/12
4/12
5/12
6/12
7/12
8/12
9/12
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/12] media: intel-cio2-bridge: Add shared intel-cio2-bridge code, rework VCM instantiation

Hi All,

While working on adding (proper) VCM support to the atomisp code I found myself copying yet more code from drivers/media/pci/intel/ipu3/cio2-bridge.c into the atomisp code.

So I decided that it really was time to factor out the common code (most of the code) from intel/ipu3/cio2-bridge.c into its own helper library and then share it between the atomisp and IPU3 code.

This will hopefully also be useful for the ongoing work to upstream IPU6 input system support which also needs this functionality and currently contains a 3th copy of this code in the out of tree driver.

This set consists of the following parts:

Patch 1 A bugfix for a recent change to the cio2-bridge code
Patches 2-8 Cleanup / preparation patches
Patch 9 Move the main body of the cio2-bridge.c code into
a new shared intel-cio2-bridge module
Patch 10 Drop cio2-bridge code copy from atomisp, switching to
the shared intel-cio2-bridge module
Patch 11 Rework how VCM client instantiation is done so that
a device-link can be added from VCM to sensor to fix issues with the VCM power-state being tied to the sensor power state
Patch 12 Example patch to show how patch 11 avoids the need
for hacks in VCM drivers caused by the shared power state (not intended for merging)

Regards,

Hans

Hans de Goede (12):
media: ipu3-cio2: Do not use on stack memory for software_node.name
field
media: ipu3-cio2: Move initialization of node_names.vcm to
cio2_bridge_init_swnode_names()
media: ipu3-cio2: Make cio2_bridge_init() take a regular struct device
as argument
media: ipu3-cio2: Store dev pointer in struct cio2_bridge
media: ipu3-cio2: Only keep PLD around while parsing
media: ipu3-cio2: Add a cio2_bridge_parse_sensor_fwnode() helper
function
media: ipu3-cio2: Add a parse_sensor_fwnode callback to

    cio2_bridge_init()
  media: ipu3-cio2: Add supported_sensors parameter to
    cio2_bridge_init()

media: ipu3-cio2: Move cio2_bridge_init() code into a new shared
intel-cio2-bridge.ko
media: atomisp: csi2-bridge: Switch to new common cio2_bridge_init()
media: intel-cio2-bridge: Add a runtime-pm device-link between VCM and
sensor
[RFC] media: dw9719: Drop hack to enable "vsio" regulator

 MAINTAINERS                                   |   9 +
 drivers/media/common/Kconfig                  |   4 +
 drivers/media/common/Makefile                 |   1 +
 drivers/media/common/intel-cio2-bridge.c      | 464 ++++++++++++++++++
 drivers/media/i2c/dw9719.c                    |  27 +-
 drivers/media/pci/intel/ipu3/Kconfig          |   1 +
 drivers/media/pci/intel/ipu3/cio2-bridge.c    | 464 +++---------------
 drivers/media/pci/intel/ipu3/cio2-bridge.h    | 146 ------
 drivers/media/pci/intel/ipu3/ipu3-cio2-main.c |   7 +-
 drivers/media/pci/intel/ipu3/ipu3-cio2.h      |   7 +-
 drivers/staging/media/atomisp/Kconfig         |   2 +
 .../staging/media/atomisp/pci/atomisp_csi2.h  |  67 ---
 .../media/atomisp/pci/atomisp_csi2_bridge.c   | 307 ++----------
 include/media/intel-cio2-bridge.h             | 105 ++++
 14 files changed, 723 insertions(+), 888 deletions(-)
 create mode 100644 drivers/media/common/intel-cio2-bridge.c
 delete mode 100644 drivers/media/pci/intel/ipu3/cio2-bridge.h
 create mode 100644 include/media/intel-cio2-bridge.h
Signature · 1 line
2.41.0