Lines Matching refs:subdev
113 static inline struct xtpg_device *to_tpg(struct v4l2_subdev *subdev) in to_tpg() argument
115 return container_of(subdev, struct xtpg_device, xvip.subdev); in to_tpg()
170 static int xtpg_s_stream(struct v4l2_subdev *subdev, int enable) in xtpg_s_stream() argument
172 struct xtpg_device *xtpg = to_tpg(subdev); in xtpg_s_stream()
262 return v4l2_subdev_get_try_format(&xtpg->xvip.subdev, cfg, pad); in __xtpg_get_pad_format()
270 static int xtpg_get_format(struct v4l2_subdev *subdev, in xtpg_get_format() argument
274 struct xtpg_device *xtpg = to_tpg(subdev); in xtpg_get_format()
281 static int xtpg_set_format(struct v4l2_subdev *subdev, in xtpg_set_format() argument
285 struct xtpg_device *xtpg = to_tpg(subdev); in xtpg_set_format()
323 static int xtpg_enum_frame_size(struct v4l2_subdev *subdev, in xtpg_enum_frame_size() argument
329 format = v4l2_subdev_get_try_format(subdev, cfg, fse->pad); in xtpg_enum_frame_size()
352 static int xtpg_open(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) in xtpg_open() argument
354 struct xtpg_device *xtpg = to_tpg(subdev); in xtpg_open()
357 format = v4l2_subdev_get_try_format(subdev, fh->pad, 0); in xtpg_open()
361 format = v4l2_subdev_get_try_format(subdev, fh->pad, 1); in xtpg_open()
368 static int xtpg_close(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) in xtpg_close() argument
770 struct v4l2_subdev *subdev; in xtpg_probe() local
830 subdev = &xtpg->xvip.subdev; in xtpg_probe()
831 v4l2_subdev_init(subdev, &xtpg_ops); in xtpg_probe()
832 subdev->dev = &pdev->dev; in xtpg_probe()
833 subdev->internal_ops = &xtpg_internal_ops; in xtpg_probe()
834 strlcpy(subdev->name, dev_name(&pdev->dev), sizeof(subdev->name)); in xtpg_probe()
835 v4l2_set_subdevdata(subdev, xtpg); in xtpg_probe()
836 subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; in xtpg_probe()
837 subdev->entity.ops = &xtpg_media_ops; in xtpg_probe()
839 ret = media_entity_init(&subdev->entity, xtpg->npads, xtpg->pads, 0); in xtpg_probe()
864 subdev->ctrl_handler = &xtpg->ctrl_handler; in xtpg_probe()
878 ret = v4l2_async_register_subdev(subdev); in xtpg_probe()
888 media_entity_cleanup(&subdev->entity); in xtpg_probe()
898 struct v4l2_subdev *subdev = &xtpg->xvip.subdev; in xtpg_remove() local
900 v4l2_async_unregister_subdev(subdev); in xtpg_remove()
902 media_entity_cleanup(&subdev->entity); in xtpg_remove()