About the bindings: There are bindings for the MIPI CSI-2 receiver: Documentation/devicetree/bindings/media/imx.txt I think here it's not necessary to make the bus-type property mandatory as the imx6-mipi-csi2 driver enforces V4L2_MBUS_CSI2_DPHY anyhow (see drivers/staging/media/imx/imx6-mipi-csi2.c#L677). For the case of a camera with parallel bus, the camera endpoint is connected to a video-mux and not directly to the CSI. Therefore, we cannot make the bus-type property mandatory on this endpoint as it this wouldn't apply to other use-cases of video-mux. > > > > > > > > > > > > > > > int ret; > > > > > > > > > > > > if (!priv->src_sd) > > > > > > @@ -210,11 +212,37 @@ static int csi_get_upstream_mbus_config(struct csi_priv *priv, > > > > > > > > > > > > ret = v4l2_subdev_call(remote_sd, pad, get_mbus_config, > > > > > > remote_pad->index, mbus_cfg); > > > > > > - if (ret == -ENOIOCTLCMD) > > > > > > - v4l2_err(&priv->sd, > > > > > > - "entity %s does not implement get_mbus_config()\n", > > > > > > - remote_pad->entity->name); > > > > > > + if (ret == -ENOIOCTLCMD) { > > > > > > > > > > if (!ret) > > > > > return 0; > > > > > > > > > > And you can unindent the rest. > > > > > > > > I was going to say this too but then I thought actually this needs to > > > > be: > > > > > > > > if (ret != -ENOIOCTLCMD) > > > > return ret; > > > > > > > > Which is weird. Better to break all the new code into a separate > > > > helper function. > > > > > > > > if (ret == -ENOIOCTLCMD) > > > > ret = parse_fw_link_config_stuff(); > > > > > > > > return ret; > > > > Good point. I factored out a helper function as suggested. > > > > > > > > Indeed. get_mbus_config() presumably wouldn't return an error but > > > correctness is usually a good idea. > > > > > -- > Regards, > > Sakari Ailus Best regards, Mathis Foerst