media: sun8i-a83t-mipi-csi2: Require both pads to be connected for streaming
[platform/kernel/linux-starfive.git] / drivers / media / platform / sunxi / sun8i-a83t-mipi-csi2 / sun8i_a83t_mipi_csi2.c
index b032ec1..5e1c25d 100644 (file)
@@ -557,8 +557,10 @@ sun8i_a83t_mipi_csi2_bridge_setup(struct sun8i_a83t_mipi_csi2_device *csi2_dev)
 
        /* Media Pads */
 
-       pads[SUN8I_A83T_MIPI_CSI2_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
-       pads[SUN8I_A83T_MIPI_CSI2_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
+       pads[SUN8I_A83T_MIPI_CSI2_PAD_SINK].flags = MEDIA_PAD_FL_SINK |
+                                                   MEDIA_PAD_FL_MUST_CONNECT;
+       pads[SUN8I_A83T_MIPI_CSI2_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE |
+                                                     MEDIA_PAD_FL_MUST_CONNECT;
 
        ret = media_entity_pads_init(&subdev->entity,
                                     SUN8I_A83T_MIPI_CSI2_PAD_COUNT, pads);