Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] v4l2-framework.txt: document debug attribute

The debug attribute in /sys/class/video4linux/<devX>/debug was never
documented. Add this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
88f414f4 17028cdb

+23 -2
+23 -2
Documentation/video4linux/v4l2-framework.txt
··· 793 793 794 794 Whenever a device node is created some attributes are also created for you. 795 795 If you look in /sys/class/video4linux you see the devices. Go into e.g. 796 - video0 and you will see 'name' and 'index' attributes. The 'name' attribute 797 - is the 'name' field of the video_device struct. 796 + video0 and you will see 'name', 'debug' and 'index' attributes. The 'name' 797 + attribute is the 'name' field of the video_device struct. The 'debug' attribute 798 + can be used to enable core debugging. See the next section for more detailed 799 + information on this. 798 800 799 801 The 'index' attribute is the index of the device node: for each call to 800 802 video_register_device() the index is just increased by 1. The first video ··· 818 816 be called if the registration failed, nor should you ever attempt to 819 817 unregister the device if the registration failed. 820 818 819 + video device debugging 820 + ---------------------- 821 + 822 + The 'debug' attribute that is created for each video, vbi, radio or swradio 823 + device in /sys/class/video4linux/<devX>/ allows you to enable logging of 824 + file operations. 825 + 826 + It is a bitmask and the following bits can be set: 827 + 828 + 0x01: Log the ioctl name and error code. VIDIOC_(D)QBUF ioctls are only logged 829 + if bit 0x08 is also set. 830 + 0x02: Log the ioctl name arguments and error code. VIDIOC_(D)QBUF ioctls are 831 + only logged if bit 0x08 is also set. 832 + 0x04: Log the file operations open, release, read, write, mmap and 833 + get_unmapped_area. The read and write operations are only logged if 834 + bit 0x08 is also set. 835 + 0x08: Log the read and write file operations and the VIDIOC_QBUF and 836 + VIDIOC_DQBUF ioctls. 837 + 0x10: Log the poll file operation. 821 838 822 839 video_device cleanup 823 840 --------------------