基于RV1126平台imx291分析 --- media部件注册 mipi csi
作者:互联网
Linux v4l2架构学习总链接
rv1126 架构如下
这里分析mipi csi
#define CSI2_SINK_PAD 0
#define CSI2_NUM_SINK_PADS 1
#define CSI2_NUM_SRC_PADS 4
#define CSI2_NUM_PADS 5
#define CSI2_NUM_PADS_SINGLE_LINK 2
static int csi2_probe(struct platform_device *pdev)
{
...
csi2->sd.entity.ops = &csi2_entity_ops;
...
csi2_media_init(&csi2->sd);
}
static int csi2_media_init(struct v4l2_subdev *sd)
{
struct csi2_dev *csi2 = sd_to_dev(sd);
int i = 0, num_pads = 0;
/*
* num_pads = 5
*/
num_pads = csi2->match_data->num_pads;
for (i = 0; i < num_pads; i++) {
csi2->pad[i].flags = (i == CSI2_SINK_PAD) ?
MEDIA_PAD_FL_SINK : MEDIA_PAD_FL_SOURCE;
}
csi2->pad[RK_CSI2X_PAD_SOURCE0].flags =
MEDIA_PAD_FL_SOURCE | MEDIA_PAD_FL_MUST_CONNECT;
csi2->pad[RK_CSI2_PAD_SINK].flags =
MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_MUST_CONNECT;
...
return media_entity_pads_init(&sd->entity, num_pads, csi2->pad);
}
可以看到mipi csi entity有5个pad,1个sink pad,4个source pad
标签:CSI2,csi,num,---,pads,mipi,PAD,pad,csi2 来源: https://blog.csdn.net/ldl617/article/details/115694818