return ret;
}
+ if (!vsp1->pdata.uapi)
+ return 0;
+
for (i = 0; i < vsp1->pdata.rpf_count; ++i) {
struct vsp1_rwpf *rpf = vsp1->rpf[i];
}
for (i = 0; i < vsp1->pdata.rpf_count; ++i) {
- struct vsp1_video *video;
struct vsp1_rwpf *rpf;
rpf = vsp1_rpf_create(vsp1, i);
vsp1->rpf[i] = rpf;
list_add_tail(&rpf->entity.list_dev, &vsp1->entities);
- video = vsp1_video_create(vsp1, rpf);
- if (IS_ERR(video)) {
- ret = PTR_ERR(video);
- goto done;
- }
+ if (vsp1->pdata.uapi) {
+ struct vsp1_video *video = vsp1_video_create(vsp1, rpf);
- list_add_tail(&video->list, &vsp1->videos);
+ if (IS_ERR(video)) {
+ ret = PTR_ERR(video);
+ goto done;
+ }
+
+ list_add_tail(&video->list, &vsp1->videos);
+ }
}
if (vsp1->pdata.features & VSP1_HAS_SRU) {
}
for (i = 0; i < vsp1->pdata.wpf_count; ++i) {
- struct vsp1_video *video;
struct vsp1_rwpf *wpf;
wpf = vsp1_wpf_create(vsp1, i);
vsp1->wpf[i] = wpf;
list_add_tail(&wpf->entity.list_dev, &vsp1->entities);
- video = vsp1_video_create(vsp1, wpf);
- if (IS_ERR(video)) {
- ret = PTR_ERR(video);
- goto done;
- }
+ if (vsp1->pdata.uapi) {
+ struct vsp1_video *video = vsp1_video_create(vsp1, wpf);
- list_add_tail(&video->list, &vsp1->videos);
- wpf->entity.sink = &video->video.entity;
+ if (IS_ERR(video)) {
+ ret = PTR_ERR(video);
+ goto done;
+ }
+
+ list_add_tail(&video->list, &vsp1->videos);
+ wpf->entity.sink = &video->video.entity;
+ }
}
/* Register all subdevs. */
if (ret < 0)
goto done;
- ret = v4l2_device_register_subdev_nodes(&vsp1->v4l2_dev);
- if (ret < 0)
- goto done;
+ if (vsp1->pdata.uapi) {
+ ret = v4l2_device_register_subdev_nodes(&vsp1->v4l2_dev);
+ if (ret < 0)
+ goto done;
+ }
ret = media_device_register(mdev);
pdata->features |= VSP1_HAS_BRU;
pdata->num_bru_inputs = 4;
+ pdata->uapi = true;
return 0;
}
/* Take the control handler lock to ensure that the CTRL0 value won't be
* changed behind our back by a set control operation.
*/
- mutex_lock(sru->ctrls.lock);
+ if (sru->entity.vsp1->pdata.uapi)
+ mutex_lock(sru->ctrls.lock);
ctrl0 |= vsp1_sru_read(sru, VI6_SRU_CTRL0)
& (VI6_SRU_CTRL0_PARAM0_MASK | VI6_SRU_CTRL0_PARAM1_MASK);
vsp1_sru_write(sru, VI6_SRU_CTRL0, ctrl0);
- mutex_unlock(sru->ctrls.lock);
+ if (sru->entity.vsp1->pdata.uapi)
+ mutex_unlock(sru->ctrls.lock);
vsp1_sru_write(sru, VI6_SRU_CTRL1, VI6_SRU_CTRL1_PARAM5);
/* Take the control handler lock to ensure that the PDV value won't be
* changed behind our back by a set control operation.
*/
- mutex_lock(wpf->ctrls.lock);
+ if (vsp1->pdata.uapi)
+ mutex_lock(wpf->ctrls.lock);
outfmt |= vsp1_wpf_read(wpf, VI6_WPF_OUTFMT) & VI6_WPF_OUTFMT_PDV_MASK;
vsp1_wpf_write(wpf, VI6_WPF_OUTFMT, outfmt);
- mutex_unlock(wpf->ctrls.lock);
+ if (vsp1->pdata.uapi)
+ mutex_unlock(wpf->ctrls.lock);
vsp1_write(vsp1, VI6_DPR_WPF_FPORCH(wpf->entity.index),
VI6_DPR_WPF_FPORCH_FP_WPFN);