[PATCH] v4l: rcar-csi2: Don't bail out from probe on no ep

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

 



When rcar-csi interface is not connected to any endpoint, it fails and
bails out from probe before registering its own video subdevice.
This prevents rcar-vin registered notifier from completing and no
subdevice is ever registered, also for other properly connected csi
interfaces.

Fix this not returning an error when no endpoint is connected to a csi
interface and let the driver complete its probe function and register its
own video subdevice.

---
Niklas,
   please squash this patch in your next rcar-csi2 series (if you like it ;)

As we have discussed this is particularly useful for gmsl setup, where adv748x
is connected to CSI20 and max9286 to CSI40/CSI41. If we disable adv748x from DTS
we need CSI20 probe to complete anyhow otherwise no subdevice gets registered
for the two deserializers.

Please note we cannot disable CSI20 entirely otherwise VIN's graph parsing
breaks.

Thanks
   j

---
 drivers/media/platform/rcar-vin/rcar-csi2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c
index 2793efb..90c4062 100644
--- a/drivers/media/platform/rcar-vin/rcar-csi2.c
+++ b/drivers/media/platform/rcar-vin/rcar-csi2.c
@@ -928,8 +928,8 @@ static int rcar_csi2_parse_dt(struct rcar_csi2 *priv)

 	ep = of_graph_get_endpoint_by_regs(priv->dev->of_node, 0, 0);
 	if (!ep) {
-		dev_err(priv->dev, "Not connected to subdevice\n");
-		return -EINVAL;
+		dev_dbg(priv->dev, "Not connected to subdevice\n");
+		return 0;
 	}

 	ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &v4l2_ep);
--
2.7.4




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux