Re: [PATCH 07/13] media: soc_camera pad-aware driver initialisation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

On 7/23/2015 2:21 PM, William Towle wrote:

Add detection of source pad number for drivers aware of the media
controller API, so that the combination of soc_camera and rcar_vin
can create device nodes to support modern drivers such as adv7604.c
(for HDMI on Lager) and the converted adv7180.c (for composite)
underneath.

Building rcar_vin gains a dependency on CONFIG_MEDIA_CONTROLLER, in
line with requirements for building the drivers associated with it.

Signed-off-by: William Towle <william.towle@xxxxxxxxxxxxxxx>
Signed-off-by: Rob Taylor <rob.taylor@xxxxxxxxxxxxxxx>
---
  drivers/media/platform/soc_camera/Kconfig      |    1 +
  drivers/media/platform/soc_camera/rcar_vin.c   |    1 +

   This driver no longer exists. What did you base on?

  drivers/media/platform/soc_camera/soc_camera.c |   36 ++++++++++++++++++++++++
  include/media/soc_camera.h                     |    1 +
  4 files changed, 39 insertions(+)
[...]
@@ -1310,8 +1313,33 @@ static int soc_camera_probe_finish(struct soc_camera_device *icd)
  		return ret;
  	}
+ icd->src_pad_idx = 0;
+#if defined(CONFIG_MEDIA_CONTROLLER)
  	/* At this point client .probe() should have run already */
+	ret = media_entity_init(&icd->vdev->entity, 1, &pad, 0);
+	if (ret < 0) {
+		goto eusrfmt;
+	} else {
+		int pad_idx;
+
+		for (pad_idx = 0; pad_idx < sd->entity.num_pads; pad_idx++)
+			if (sd->entity.pads[pad_idx].flags
+					== MEDIA_PAD_FL_SOURCE)

   Please leave == on the previous line...

[...]

MBR, Sergei



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux