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

[media] doc-rst: Fix conversion for v4l2 core functions

The conversion from DocBook lead into some conversion issues,
basically due to the lack of proper support at kernel-doc.

So, address them:

- Now, the C files with the exported symbols also need to be
added. So, all headers need to be included twice: one to
get the structs/enums/.. and another one for the functions;

- Notes should use the ReST tag, as kernel-doc doesn't
recognizes it anymore;

- Identation needs to be fixed, as ReST uses it to identify
when a format "tag" ends.

- kernel-doc doesn't escape things like *pointer, so we
need to manually add a escape char before it.

- On some cases, kernel-doc conversion requires violating
the 80-cols, as otherwise it won't properly parse the
source code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

+70 -24
+21
Documentation/media/kapi/v4l2-core.rst
··· 34 34 .. kernel-doc:: include/media/videobuf2-v4l2.h 35 35 36 36 .. kernel-doc:: include/media/videobuf2-memops.h 37 + 38 + 39 + 40 + 41 + .. kernel-doc:: include/media/tveeprom.h 42 + :export: drivers/media/common/tveeprom.c 43 + 44 + .. kernel-doc:: include/media/v4l2-ctrls.h 45 + :export: drivers/media/v4l2-core/v4l2-ctrls.c 46 + 47 + .. kernel-doc:: include/media/v4l2-dv-timings.h 48 + :export: drivers/media/v4l2-core/v4l2-dv-timings.c 49 + 50 + .. kernel-doc:: include/media/v4l2-flash-led-class.h 51 + :export: drivers/media/v4l2-core/v4l2-flash-led-class.c 52 + 53 + .. kernel-doc:: include/media/v4l2-mc.h 54 + :export: drivers/media/v4l2-core/v4l2-mc.c 55 + 56 + .. kernel-doc:: include/media/videobuf2-core.h 57 + :export: drivers/media/v4l2-core/videobuf2-core.c
+6 -2
include/media/tuner-types.h
··· 35 35 * those ranges, as they're defined inside the driver. This is used by 36 36 * analog tuners that are compatible with the "Philips way" to setup the 37 37 * tuners. On those devices, the tuner set is done via 4 bytes: 38 - * divider byte1 (DB1), divider byte 2 (DB2), Control byte (CB) and 39 - * band switch byte (BB). 38 + * 39 + * #) divider byte1 (DB1) 40 + * #) divider byte 2 (DB2) 41 + * #) Control byte (CB) 42 + * #) band switch byte (BB) 43 + * 40 44 * Some tuners also have an additional optional Auxiliary byte (AB). 41 45 */ 42 46 struct tuner_range {
+15 -3
include/media/tveeprom.h
··· 27 27 * struct tveeprom - Contains the fields parsed from Hauppauge eeproms 28 28 * 29 29 * @has_radio: 1 if the device has radio; 0 otherwise. 30 + * 30 31 * @has_ir: If has_ir == 0, then it is unknown what the IR 31 32 * capabilities are. Otherwise: 32 - * bit 0) 1 (= IR capabilities are known); 33 - * bit 1) IR receiver present; 34 - * bit 2) IR transmitter (blaster) present. 33 + * bit 0) 1 (= IR capabilities are known); 34 + * bit 1) IR receiver present; 35 + * bit 2) IR transmitter (blaster) present. 36 + * 35 37 * @has_MAC_address: 0: no MAC, 1: MAC present, 2: unknown. 36 38 * @tuner_type: type of the tuner (TUNER_*, as defined at 37 39 * include/media/tuner.h). 40 + * 38 41 * @tuner_formats: Supported analog TV standards (V4L2_STD_*). 39 42 * @tuner_hauppauge_model: Hauppauge's code for the device model number. 40 43 * @tuner2_type: type of the second tuner (TUNER_*, as defined 41 44 * at include/media/tuner.h). 45 + * 42 46 * @tuner2_formats: Tuner 2 supported analog TV standards 43 47 * (V4L2_STD_*). 48 + * 44 49 * @tuner2_hauppauge_model: tuner 2 Hauppauge's code for the device model 45 50 * number. 51 + * 46 52 * @audio_processor: analog audio decoder, as defined by enum 47 53 * tveeprom_audio_processor. 54 + * 48 55 * @decoder_processor: Hauppauge's code for the decoder chipset. 49 56 * Unused by the drivers, as they probe the 50 57 * decoder based on the PCI or USB ID. 58 + * 51 59 * @model: Hauppauge's model number 60 + * 52 61 * @revision: Card revision number 62 + * 53 63 * @serial_number: Card's serial number 64 + * 54 65 * @rev_str: Card revision converted to number 66 + * 55 67 * @MAC_address: MAC address for the network interface 56 68 */ 57 69 struct tveeprom {
+8 -5
include/media/v4l2-mc.h
··· 114 114 * Add links between the entities commonly found on PC customer's hardware at 115 115 * the V4L2 side: camera sensors, audio and video PLL-IF decoders, tuners, 116 116 * analog TV decoder and I/O entities (video, VBI and Software Defined Radio). 117 - * NOTE: webcams are modelled on a very simple way: the sensor is 118 - * connected directly to the I/O entity. All dirty details, like 119 - * scaler and crop HW are hidden. While such mapping is enough for v4l2 120 - * interface centric PC-consumer's hardware, V4L2 subdev centric camera 121 - * hardware should not use this routine, as it will not build the right graph. 117 + * 118 + * .. note:: 119 + * 120 + * Webcams are modelled on a very simple way: the sensor is 121 + * connected directly to the I/O entity. All dirty details, like 122 + * scaler and crop HW are hidden. While such mapping is enough for v4l2 123 + * interface centric PC-consumer's hardware, V4L2 subdev centric camera 124 + * hardware should not use this routine, as it will not build the right graph. 122 125 */ 123 126 int v4l2_mc_create_media_graph(struct media_device *mdev); 124 127
+2 -2
include/media/v4l2-subdev.h
··· 225 225 * 226 226 * @g_frequency: callback for VIDIOC_G_FREQUENCY ioctl handler code. 227 227 * freq->type must be filled in. Normally done by video_ioctl2 228 - * or the bridge driver. 228 + * or the bridge driver. 229 229 * 230 230 * @enum_freq_bands: callback for VIDIOC_ENUM_FREQ_BANDS ioctl handler code. 231 231 * ··· 233 233 * 234 234 * @s_tuner: callback for VIDIOC_S_TUNER ioctl handler code. vt->type must be 235 235 * filled in. Normally done by video_ioctl2 or the 236 - * bridge driver. 236 + * bridge driver. 237 237 * 238 238 * @g_modulator: callback for VIDIOC_G_MODULATOR ioctl handler code. 239 239 *
+18 -12
include/media/videobuf2-core.h
··· 86 86 * @mmap: setup a userspace mapping for a given memory buffer under 87 87 * the provided virtual memory region. 88 88 * 89 - * Required ops for USERPTR types: get_userptr, put_userptr. 90 - * Required ops for MMAP types: alloc, put, num_users, mmap. 91 - * Required ops for read/write access types: alloc, put, num_users, vaddr. 92 - * Required ops for DMABUF types: attach_dmabuf, detach_dmabuf, map_dmabuf, 93 - * unmap_dmabuf. 89 + * Those operations are used by the videobuf2 core to implement the memory 90 + * handling/memory allocators for each type of supported streaming I/O method. 91 + * 92 + * .. note:: 93 + * #) Required ops for USERPTR types: get_userptr, put_userptr. 94 + * 95 + * #) Required ops for MMAP types: alloc, put, num_users, mmap. 96 + * 97 + * #) Required ops for read/write access types: alloc, put, num_users, vaddr. 98 + * 99 + * #) Required ops for DMABUF types: attach_dmabuf, detach_dmabuf, map_dmabuf, unmap_dmabuf. 94 100 */ 95 101 struct vb2_mem_ops { 96 102 void *(*alloc)(void *alloc_ctx, unsigned long size, ··· 285 279 * second time with the actually allocated number of 286 280 * buffers to verify if that is OK. 287 281 * The driver should return the required number of buffers 288 - * in *num_buffers, the required number of planes per 289 - * buffer in *num_planes, the size of each plane should be 282 + * in \*num_buffers, the required number of planes per 283 + * buffer in \*num_planes, the size of each plane should be 290 284 * set in the sizes[] array and optional per-plane 291 285 * allocator specific context in the alloc_ctxs[] array. 292 - * When called from VIDIOC_REQBUFS, *num_planes == 0, the 286 + * When called from VIDIOC_REQBUFS, \*num_planes == 0, the 293 287 * driver has to use the currently configured format to 294 - * determine the plane sizes and *num_buffers is the total 288 + * determine the plane sizes and \*num_buffers is the total 295 289 * number of buffers that are being allocated. When called 296 - * from VIDIOC_CREATE_BUFS, *num_planes != 0 and it 290 + * from VIDIOC_CREATE_BUFS, \*num_planes != 0 and it 297 291 * describes the requested number of planes and sizes[] 298 292 * contains the requested plane sizes. If either 299 - * *num_planes or the requested sizes are invalid callback 300 - * must return -EINVAL. In this case *num_buffers are 293 + * \*num_planes or the requested sizes are invalid callback 294 + * must return -EINVAL. In this case \*num_buffers are 301 295 * being allocated additionally to q->num_buffers. 302 296 * @wait_prepare: release any locks taken while calling vb2 functions; 303 297 * it is called before an ioctl needs to wait for a new