OSDN Git Service

media: v4l2-subdev: add VIDIOC_SUBDEV_QUERYCAP ioctl
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 7 May 2020 15:12:52 +0000 (17:12 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 12 May 2020 15:05:31 +0000 (17:05 +0200)
commit6446ec6cbf46483737e832cd6050885fa8eb87fa
treeaa755171f8db869b92ecf646023c1d9e48cae10a
parentfb15db8c0060e73317a7872986b909343504eb84
media: v4l2-subdev: add VIDIOC_SUBDEV_QUERYCAP ioctl

While normal video/radio/vbi/swradio nodes have a proper QUERYCAP ioctl
that apps can call to determine that it is indeed a V4L2 device, there
is currently no equivalent for v4l-subdev nodes. Adding this ioctl will
solve that, and it will allow utilities like v4l2-compliance to be used
with these devices as well.

SUBDEV_QUERYCAP currently returns the version and capabilities of the
subdevice. Define a capability flag to report if the subdevice is
registered in read-only mode.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/v4l2-core/v4l2-subdev.c
include/uapi/linux/v4l2-subdev.h