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

V4L/DVB (12247): tvp514x: formatting comments as per kernel documentation

Fix documentation style based on comments from Mauro.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Muralidharan Karicheri and committed by
Mauro Carvalho Chehab
c1c9d09c 62ef80a1

+157 -118
+157 -118
drivers/media/video/tvp514x.c
··· 56 56 MODULE_DESCRIPTION("TVP514X linux decoder driver"); 57 57 MODULE_LICENSE("GPL"); 58 58 59 - /* 60 - * enum tvp514x_std - enum for supported standards 61 - */ 59 + /* enum tvp514x_std - enum for supported standards */ 62 60 enum tvp514x_std { 63 61 STD_NTSC_MJ = 0, 64 62 STD_PAL_BDGHIN, 65 63 STD_INVALID 66 64 }; 67 65 68 - /* 66 + /** 69 67 * struct tvp514x_std_info - Structure to store standard informations 70 68 * @width: Line width in pixels 71 69 * @height:Number of active lines ··· 78 80 }; 79 81 80 82 static struct tvp514x_reg tvp514x_reg_list_default[0x40]; 81 - /* 83 + /** 82 84 * struct tvp514x_decoder - TVP5146/47 decoder object 83 85 * @sd: Subdevice Slave handle 84 86 * @tvp514x_regs: copy of hw's regs with preset values. ··· 109 111 enum tvp514x_std current_std; 110 112 int num_stds; 111 113 struct tvp514x_std_info *std_list; 112 - /* 113 - * Input and Output Routing parameters 114 - */ 114 + /* Input and Output Routing parameters */ 115 115 u32 input; 116 116 u32 output; 117 117 }; 118 118 119 119 /* TVP514x default register values */ 120 120 static struct tvp514x_reg tvp514x_reg_list_default[] = { 121 - {TOK_WRITE, REG_INPUT_SEL, 0x05}, /* Composite selected */ 121 + /* Composite selected */ 122 + {TOK_WRITE, REG_INPUT_SEL, 0x05}, 122 123 {TOK_WRITE, REG_AFE_GAIN_CTRL, 0x0F}, 123 - {TOK_WRITE, REG_VIDEO_STD, 0x00}, /* Auto mode */ 124 + /* Auto mode */ 125 + {TOK_WRITE, REG_VIDEO_STD, 0x00}, 124 126 {TOK_WRITE, REG_OPERATION_MODE, 0x00}, 125 127 {TOK_SKIP, REG_AUTOSWITCH_MASK, 0x3F}, 126 128 {TOK_WRITE, REG_COLOR_KILLER, 0x10}, ··· 133 135 {TOK_WRITE, REG_HUE, 0x00}, 134 136 {TOK_WRITE, REG_CHROMA_CONTROL1, 0x00}, 135 137 {TOK_WRITE, REG_CHROMA_CONTROL2, 0x0E}, 136 - {TOK_SKIP, 0x0F, 0x00}, /* Reserved */ 138 + /* Reserved */ 139 + {TOK_SKIP, 0x0F, 0x00}, 137 140 {TOK_WRITE, REG_COMP_PR_SATURATION, 0x80}, 138 141 {TOK_WRITE, REG_COMP_Y_CONTRAST, 0x80}, 139 142 {TOK_WRITE, REG_COMP_PB_SATURATION, 0x80}, 140 - {TOK_SKIP, 0x13, 0x00}, /* Reserved */ 143 + /* Reserved */ 144 + {TOK_SKIP, 0x13, 0x00}, 141 145 {TOK_WRITE, REG_COMP_Y_BRIGHTNESS, 0x80}, 142 - {TOK_SKIP, 0x15, 0x00}, /* Reserved */ 143 - {TOK_SKIP, REG_AVID_START_PIXEL_LSB, 0x55}, /* NTSC timing */ 146 + /* Reserved */ 147 + {TOK_SKIP, 0x15, 0x00}, 148 + /* NTSC timing */ 149 + {TOK_SKIP, REG_AVID_START_PIXEL_LSB, 0x55}, 144 150 {TOK_SKIP, REG_AVID_START_PIXEL_MSB, 0x00}, 145 151 {TOK_SKIP, REG_AVID_STOP_PIXEL_LSB, 0x25}, 146 152 {TOK_SKIP, REG_AVID_STOP_PIXEL_MSB, 0x03}, 147 - {TOK_SKIP, REG_HSYNC_START_PIXEL_LSB, 0x00}, /* NTSC timing */ 153 + /* NTSC timing */ 154 + {TOK_SKIP, REG_HSYNC_START_PIXEL_LSB, 0x00}, 148 155 {TOK_SKIP, REG_HSYNC_START_PIXEL_MSB, 0x00}, 149 156 {TOK_SKIP, REG_HSYNC_STOP_PIXEL_LSB, 0x40}, 150 157 {TOK_SKIP, REG_HSYNC_STOP_PIXEL_MSB, 0x00}, 151 - {TOK_SKIP, REG_VSYNC_START_LINE_LSB, 0x04}, /* NTSC timing */ 158 + /* NTSC timing */ 159 + {TOK_SKIP, REG_VSYNC_START_LINE_LSB, 0x04}, 152 160 {TOK_SKIP, REG_VSYNC_START_LINE_MSB, 0x00}, 153 161 {TOK_SKIP, REG_VSYNC_STOP_LINE_LSB, 0x07}, 154 162 {TOK_SKIP, REG_VSYNC_STOP_LINE_MSB, 0x00}, 155 - {TOK_SKIP, REG_VBLK_START_LINE_LSB, 0x01}, /* NTSC timing */ 163 + /* NTSC timing */ 164 + {TOK_SKIP, REG_VBLK_START_LINE_LSB, 0x01}, 156 165 {TOK_SKIP, REG_VBLK_START_LINE_MSB, 0x00}, 157 166 {TOK_SKIP, REG_VBLK_STOP_LINE_LSB, 0x15}, 158 167 {TOK_SKIP, REG_VBLK_STOP_LINE_MSB, 0x00}, 159 - {TOK_SKIP, 0x26, 0x00}, /* Reserved */ 160 - {TOK_SKIP, 0x27, 0x00}, /* Reserved */ 168 + /* Reserved */ 169 + {TOK_SKIP, 0x26, 0x00}, 170 + /* Reserved */ 171 + {TOK_SKIP, 0x27, 0x00}, 161 172 {TOK_SKIP, REG_FAST_SWTICH_CONTROL, 0xCC}, 162 - {TOK_SKIP, 0x29, 0x00}, /* Reserved */ 173 + /* Reserved */ 174 + {TOK_SKIP, 0x29, 0x00}, 163 175 {TOK_SKIP, REG_FAST_SWTICH_SCART_DELAY, 0x00}, 164 - {TOK_SKIP, 0x2B, 0x00}, /* Reserved */ 176 + /* Reserved */ 177 + {TOK_SKIP, 0x2B, 0x00}, 165 178 {TOK_SKIP, REG_SCART_DELAY, 0x00}, 166 179 {TOK_SKIP, REG_CTI_DELAY, 0x00}, 167 180 {TOK_SKIP, REG_CTI_CONTROL, 0x00}, 168 - {TOK_SKIP, 0x2F, 0x00}, /* Reserved */ 169 - {TOK_SKIP, 0x30, 0x00}, /* Reserved */ 170 - {TOK_SKIP, 0x31, 0x00}, /* Reserved */ 171 - {TOK_WRITE, REG_SYNC_CONTROL, 0x00}, /* HS, VS active high */ 172 - {TOK_WRITE, REG_OUTPUT_FORMATTER1, 0x00}, /* 10-bit BT.656 */ 173 - {TOK_WRITE, REG_OUTPUT_FORMATTER2, 0x11}, /* Enable clk & data */ 174 - {TOK_WRITE, REG_OUTPUT_FORMATTER3, 0xEE}, /* Enable AVID & FLD */ 175 - {TOK_WRITE, REG_OUTPUT_FORMATTER4, 0xAF}, /* Enable VS & HS */ 181 + /* Reserved */ 182 + {TOK_SKIP, 0x2F, 0x00}, 183 + /* Reserved */ 184 + {TOK_SKIP, 0x30, 0x00}, 185 + /* Reserved */ 186 + {TOK_SKIP, 0x31, 0x00}, 187 + /* HS, VS active high */ 188 + {TOK_WRITE, REG_SYNC_CONTROL, 0x00}, 189 + /* 10-bit BT.656 */ 190 + {TOK_WRITE, REG_OUTPUT_FORMATTER1, 0x00}, 191 + /* Enable clk & data */ 192 + {TOK_WRITE, REG_OUTPUT_FORMATTER2, 0x11}, 193 + /* Enable AVID & FLD */ 194 + {TOK_WRITE, REG_OUTPUT_FORMATTER3, 0xEE}, 195 + /* Enable VS & HS */ 196 + {TOK_WRITE, REG_OUTPUT_FORMATTER4, 0xAF}, 176 197 {TOK_WRITE, REG_OUTPUT_FORMATTER5, 0xFF}, 177 198 {TOK_WRITE, REG_OUTPUT_FORMATTER6, 0xFF}, 178 - {TOK_WRITE, REG_CLEAR_LOST_LOCK, 0x01}, /* Clear status */ 199 + /* Clear status */ 200 + {TOK_WRITE, REG_CLEAR_LOST_LOCK, 0x01}, 179 201 {TOK_TERM, 0, 0}, 180 202 }; 181 203 182 - /* 204 + /** 183 205 * List of image formats supported by TVP5146/47 decoder 184 206 * Currently we are using 8 bit mode only, but can be 185 207 * extended to 10/20 bit mode. ··· 214 196 }, 215 197 }; 216 198 217 - /* 199 + /** 218 200 * Supported standards - 219 201 * 220 202 * Currently supports two standards only, need to add support for rest of the ··· 257 239 } 258 240 259 241 260 - /* 261 - * Read a value from a register in an TVP5146/47 decoder device. 242 + /** 243 + * tvp514x_read_reg() - Read a value from a register in an TVP5146/47. 244 + * @sd: ptr to v4l2_subdev struct 245 + * @reg: TVP5146/47 register address 246 + * 262 247 * Returns value read if successful, or non-zero (-1) otherwise. 263 248 */ 264 249 static int tvp514x_read_reg(struct v4l2_subdev *sd, u8 reg) ··· 284 263 return err; 285 264 } 286 265 266 + /** 267 + * dump_reg() - dump the register content of TVP5146/47. 268 + * @sd: ptr to v4l2_subdev struct 269 + * @reg: TVP5146/47 register address 270 + */ 287 271 static void dump_reg(struct v4l2_subdev *sd, u8 reg) 288 272 { 289 273 u32 val; ··· 297 271 v4l2_info(sd, "Reg(0x%.2X): 0x%.2X\n", reg, val); 298 272 } 299 273 300 - /* 274 + /** 275 + * tvp514x_write_reg() - Write a value to a register in TVP5146/47 276 + * @sd: ptr to v4l2_subdev struct 277 + * @reg: TVP5146/47 register address 278 + * @val: value to be written to the register 279 + * 301 280 * Write a value to a register in an TVP5146/47 decoder device. 302 281 * Returns zero if successful, or non-zero otherwise. 303 282 */ ··· 326 295 return err; 327 296 } 328 297 329 - /* 330 - * tvp514x_write_regs : Initializes a list of TVP5146/47 registers 298 + /** 299 + * tvp514x_write_regs() : Initializes a list of TVP5146/47 registers 300 + * @sd: ptr to v4l2_subdev struct 301 + * @reglist: list of TVP5146/47 registers and values 302 + * 303 + * Initializes a list of TVP5146/47 registers:- 331 304 * if token is TOK_TERM, then entire write operation terminates 332 305 * if token is TOK_DELAY, then a delay of 'val' msec is introduced 333 306 * if token is TOK_SKIP, then the register write is skipped 334 307 * if token is TOK_WRITE, then the register write is performed 335 - * 336 - * reglist - list of registers to be written 337 308 * Returns zero if successful, or non-zero otherwise. 338 309 */ 339 310 static int tvp514x_write_regs(struct v4l2_subdev *sd, ··· 362 329 return 0; 363 330 } 364 331 365 - /* 366 - * tvp514x_get_current_std: 367 - * Returns the current standard detected by TVP5146/47 332 + /** 333 + * tvp514x_get_current_std() : Get the current standard detected by TVP5146/47 334 + * @sd: ptr to v4l2_subdev struct 335 + * 336 + * Get current standard detected by TVP5146/47, STD_INVALID if there is no 337 + * standard detected. 368 338 */ 369 339 static enum tvp514x_std tvp514x_get_current_std(struct v4l2_subdev *sd) 370 340 { ··· 378 342 /* use the standard status register */ 379 343 std_status = tvp514x_read_reg(sd, REG_VIDEO_STD_STATUS); 380 344 else 381 - std_status = std; /* use the standard register itself */ 345 + /* use the standard register itself */ 346 + std_status = std; 382 347 383 348 switch (std_status & VIDEO_STD_MASK) { 384 349 case VIDEO_STD_NTSC_MJ_BIT: ··· 395 358 return STD_INVALID; 396 359 } 397 360 398 - /* 399 - * TVP5146/47 register dump function 400 - */ 361 + /* TVP5146/47 register dump function */ 401 362 static void tvp514x_reg_dump(struct v4l2_subdev *sd) 402 363 { 403 364 dump_reg(sd, REG_INPUT_SEL); ··· 442 407 dump_reg(sd, REG_CLEAR_LOST_LOCK); 443 408 } 444 409 445 - /* 446 - * Configure the TVP5146/47 with the current register settings 410 + /** 411 + * tvp514x_configure() - Configure the TVP5146/47 registers 412 + * @sd: ptr to v4l2_subdev struct 413 + * @decoder: ptr to tvp514x_decoder structure 414 + * 447 415 * Returns zero if successful, or non-zero otherwise. 448 416 */ 449 417 static int tvp514x_configure(struct v4l2_subdev *sd, ··· 466 428 return 0; 467 429 } 468 430 469 - /* 470 - * Detect if an tvp514x is present, and if so which revision. 431 + /** 432 + * tvp514x_detect() - Detect if an tvp514x is present, and if so which revision. 433 + * @sd: pointer to standard V4L2 sub-device structure 434 + * @decoder: pointer to tvp514x_decoder structure 435 + * 471 436 * A device is considered to be detected if the chip ID (LSB and MSB) 472 437 * registers match the expected values. 473 438 * Any value of the rom version register is accepted. ··· 509 468 return 0; 510 469 } 511 470 512 - /* 513 - * Following are decoder interface functions implemented by 514 - * TVP5146/47 decoder driver. 515 - */ 516 - 517 - /* 518 - * tvp514x_querystd - V4L2 decoder interface handler for VIDIOC_QUERYSTD ioctl 471 + /** 472 + * tvp514x_querystd() - V4L2 decoder interface handler for querystd 519 473 * @sd: pointer to standard V4L2 sub-device structure 520 474 * @std_id: standard V4L2 std_id ioctl enum 521 475 * ··· 582 546 return 0; 583 547 } 584 548 585 - /* 586 - * tvp514x_s_std - V4L2 decoder interface handler for VIDIOC_S_STD ioctl 549 + /** 550 + * tvp514x_s_std() - V4L2 decoder interface handler for s_std 587 551 * @sd: pointer to standard V4L2 sub-device structure 588 552 * @std_id: standard V4L2 v4l2_std_id ioctl enum 589 553 * ··· 616 580 return 0; 617 581 } 618 582 619 - /* 620 - * tvp514x_s_routing - V4L2 decoder interface handler for VIDIOC_S_INPUT ioctl 583 + /** 584 + * tvp514x_s_routing() - V4L2 decoder interface handler for s_routing 621 585 * @sd: pointer to standard V4L2 sub-device structure 622 - * @index: number of the input 586 + * @input: input selector for routing the signal 587 + * @output: output selector for routing the signal 588 + * @config: config value. Not used 623 589 * 624 590 * If index is valid, selects the requested input. Otherwise, returns -EINVAL if 625 591 * the input is not supported or there is no active signal present in the ··· 640 602 641 603 if ((input >= INPUT_INVALID) || 642 604 (output >= OUTPUT_INVALID)) 643 - return -EINVAL; /* Index out of bound */ 605 + /* Index out of bound */ 606 + return -EINVAL; 644 607 645 608 input_sel = input; 646 609 output_sel = output; ··· 698 659 lock_mask = STATUS_HORZ_SYNC_LOCK_BIT | 699 660 STATUS_VIRT_SYNC_LOCK_BIT; 700 661 break; 701 - /*Need to add other interfaces*/ 662 + /* Need to add other interfaces*/ 702 663 default: 703 664 return -EINVAL; 704 665 } ··· 715 676 sync_lock_status = tvp514x_read_reg(sd, 716 677 REG_STATUS1); 717 678 if (lock_mask == (sync_lock_status & lock_mask)) 718 - break; /* Input detected */ 679 + /* Input detected */ 680 + break; 719 681 } 720 682 721 683 if ((current_std == STD_INVALID) || (try_count < 0)) ··· 732 692 return 0; 733 693 } 734 694 735 - /* 736 - * tvp514x_queryctrl - V4L2 decoder interface handler for VIDIOC_QUERYCTRL ioctl 695 + /** 696 + * tvp514x_queryctrl() - V4L2 decoder interface handler for queryctrl 737 697 * @sd: pointer to standard V4L2 sub-device structure 738 698 * @qctrl: standard V4L2 v4l2_queryctrl structure 739 699 * ··· 750 710 751 711 switch (qctrl->id) { 752 712 case V4L2_CID_BRIGHTNESS: 753 - /* Brightness supported is (0-255), 754 - */ 713 + /* Brightness supported is (0-255), */ 755 714 err = v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 128); 756 715 break; 757 716 case V4L2_CID_CONTRAST: 758 717 case V4L2_CID_SATURATION: 759 - /* Saturation and Contrast supported is - 718 + /** 719 + * Saturation and Contrast supported is - 760 720 * Contrast: 0 - 255 (Default - 128) 761 721 * Saturation: 0 - 255 (Default - 128) 762 722 */ ··· 769 729 err = v4l2_ctrl_query_fill(qctrl, -180, 180, 180, 0); 770 730 break; 771 731 case V4L2_CID_AUTOGAIN: 772 - /* 732 + /** 773 733 * Auto Gain supported is - 774 734 * 0 - 1 (Default - 1) 775 735 */ ··· 787 747 return err; 788 748 } 789 749 790 - /* 791 - * tvp514x_g_ctrl - V4L2 decoder interface handler for VIDIOC_G_CTRL ioctl 750 + /** 751 + * tvp514x_g_ctrl() - V4L2 decoder interface handler for g_ctrl 792 752 * @sd: pointer to standard V4L2 sub-device structure 793 753 * @ctrl: pointer to v4l2_control structure 794 754 * ··· 842 802 return 0; 843 803 } 844 804 845 - /* 846 - * tvp514x_s_ctrl - V4L2 decoder interface handler for VIDIOC_S_CTRL ioctl 805 + /** 806 + * tvp514x_s_ctrl() - V4L2 decoder interface handler for s_ctrl 847 807 * @sd: pointer to standard V4L2 sub-device structure 848 808 * @ctrl: pointer to v4l2_control structure 849 809 * ··· 943 903 return err; 944 904 } 945 905 946 - /* 947 - * tvp514x_enum_fmt_cap - Implement the CAPTURE buffer VIDIOC_ENUM_FMT ioctl 906 + /** 907 + * tvp514x_enum_fmt_cap() - V4L2 decoder interface handler for enum_fmt 948 908 * @sd: pointer to standard V4L2 sub-device structure 949 909 * @fmt: standard V4L2 VIDIOC_ENUM_FMT ioctl structure 950 910 * ··· 961 921 962 922 index = fmt->index; 963 923 if ((index >= decoder->num_fmts) || (index < 0)) 964 - return -EINVAL; /* Index out of bound */ 924 + /* Index out of bound */ 925 + return -EINVAL; 965 926 966 927 if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 967 - return -EINVAL; /* only capture is supported */ 928 + /* only capture is supported */ 929 + return -EINVAL; 968 930 969 931 memcpy(fmt, &decoder->fmt_list[index], 970 932 sizeof(struct v4l2_fmtdesc)); ··· 977 935 return 0; 978 936 } 979 937 980 - /* 981 - * tvp514x_try_fmt_cap - Implement the CAPTURE buffer VIDIOC_TRY_FMT ioctl 938 + /** 939 + * tvp514x_try_fmt_cap() - V4L2 decoder interface handler for try_fmt 982 940 * @sd: pointer to standard V4L2 sub-device structure 983 941 * @f: pointer to standard V4L2 VIDIOC_TRY_FMT ioctl structure 984 942 * ··· 998 956 return -EINVAL; 999 957 1000 958 if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 959 + /* only capture is supported */ 1001 960 f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 1002 961 1003 962 pix = &f->fmt.pix; ··· 1018 975 break; 1019 976 } 1020 977 if (ifmt == decoder->num_fmts) 1021 - ifmt = 0; /* None of the format matched, select default */ 978 + /* None of the format matched, select default */ 979 + ifmt = 0; 1022 980 pix->pixelformat = decoder->fmt_list[ifmt].pixelformat; 1023 981 1024 982 pix->field = V4L2_FIELD_INTERLACED; ··· 1035 991 return 0; 1036 992 } 1037 993 1038 - /* 1039 - * tvp514x_s_fmt_cap - V4L2 decoder interface handler for VIDIOC_S_FMT ioctl 994 + /** 995 + * tvp514x_s_fmt_cap() - V4L2 decoder interface handler for s_fmt 1040 996 * @sd: pointer to standard V4L2 sub-device structure 1041 997 * @f: pointer to standard V4L2 VIDIOC_S_FMT ioctl structure 1042 998 * ··· 1055 1011 return -EINVAL; 1056 1012 1057 1013 if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 1058 - return -EINVAL; /* only capture is supported */ 1014 + /* only capture is supported */ 1015 + return -EINVAL; 1059 1016 1060 1017 pix = &f->fmt.pix; 1061 1018 rval = tvp514x_try_fmt_cap(sd, f); ··· 1068 1023 return rval; 1069 1024 } 1070 1025 1071 - /* 1072 - * tvp514x_g_fmt_cap - V4L2 decoder interface handler for tvp514x_g_fmt_cap 1026 + /** 1027 + * tvp514x_g_fmt_cap() - V4L2 decoder interface handler for tvp514x_g_fmt_cap 1073 1028 * @sd: pointer to standard V4L2 sub-device structure 1074 1029 * @f: pointer to standard V4L2 v4l2_format structure 1075 1030 * ··· 1085 1040 return -EINVAL; 1086 1041 1087 1042 if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 1088 - return -EINVAL; /* only capture is supported */ 1043 + /* only capture is supported */ 1044 + return -EINVAL; 1089 1045 1090 1046 f->fmt.pix = decoder->pix; 1091 1047 ··· 1097 1051 return 0; 1098 1052 } 1099 1053 1100 - /* 1101 - * tvp514x_g_parm - V4L2 decoder interface handler for VIDIOC_G_PARM ioctl 1054 + /** 1055 + * tvp514x_g_parm() - V4L2 decoder interface handler for g_parm 1102 1056 * @sd: pointer to standard V4L2 sub-device structure 1103 1057 * @a: pointer to standard V4L2 VIDIOC_G_PARM ioctl structure 1104 1058 * ··· 1115 1069 return -EINVAL; 1116 1070 1117 1071 if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 1118 - return -EINVAL; /* only capture is supported */ 1072 + /* only capture is supported */ 1073 + return -EINVAL; 1119 1074 1120 1075 memset(a, 0, sizeof(*a)); 1121 1076 a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ··· 1136 1089 return 0; 1137 1090 } 1138 1091 1139 - /* 1140 - * tvp514x_s_parm - V4L2 decoder interface handler for VIDIOC_S_PARM ioctl 1092 + /** 1093 + * tvp514x_s_parm() - V4L2 decoder interface handler for s_parm 1141 1094 * @sd: pointer to standard V4L2 sub-device structure 1142 1095 * @a: pointer to standard V4L2 VIDIOC_S_PARM ioctl structure 1143 1096 * ··· 1155 1108 return -EINVAL; 1156 1109 1157 1110 if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 1158 - return -EINVAL; /* only capture is supported */ 1111 + /* only capture is supported */ 1112 + return -EINVAL; 1159 1113 1160 1114 timeperframe = &a->parm.capture.timeperframe; 1161 1115 ··· 1173 1125 return 0; 1174 1126 } 1175 1127 1176 - /* 1177 - * tvp514x_s_stream - V4L2 decoder interface handler for vidioc_int_s_power_num 1128 + /** 1129 + * tvp514x_s_stream() - V4L2 decoder i/f handler for s_stream 1178 1130 * @sd: pointer to standard V4L2 sub-device structure 1179 1131 * @enable: streaming enable or disable 1180 1132 * ··· 1264 1216 .fmt_list = tvp514x_fmt_list, 1265 1217 .num_fmts = ARRAY_SIZE(tvp514x_fmt_list), 1266 1218 1267 - .pix = {/* Default to NTSC 8-bit YUV 422 */ 1219 + .pix = { 1220 + /* Default to NTSC 8-bit YUV 422 */ 1268 1221 .width = NTSC_NUM_ACTIVE_PIXELS, 1269 1222 .height = NTSC_NUM_ACTIVE_LINES, 1270 1223 .pixelformat = V4L2_PIX_FMT_UYVY, ··· 1282 1233 1283 1234 }; 1284 1235 1285 - /* 1286 - * tvp514x_probe - decoder driver i2c probe handler 1236 + /** 1237 + * tvp514x_probe() - decoder driver i2c probe handler 1287 1238 * @client: i2c driver client device structure 1288 1239 * @id: i2c driver id table 1289 1240 * ··· 1309 1260 if (!decoder) 1310 1261 return -ENOMEM; 1311 1262 1312 - /* 1313 - * Initialize the tvp514x_decoder with default configuration 1314 - */ 1263 + /* Initialize the tvp514x_decoder with default configuration */ 1315 1264 *decoder = tvp514x_dev; 1316 1265 /* Copy default register configuration */ 1317 1266 memcpy(decoder->tvp514x_regs, tvp514x_reg_list_default, 1318 1267 sizeof(tvp514x_reg_list_default)); 1319 1268 1320 - /* 1321 - * Copy board specific information here 1322 - */ 1269 + /* Copy board specific information here */ 1323 1270 decoder->pdata = client->dev.platform_data; 1324 1271 1325 - /* 1272 + /** 1326 1273 * Fetch platform specific data, and configure the 1327 1274 * tvp514x_reg_list[] accordingly. Since this is one 1328 1275 * time configuration, no need to preserve. ··· 1342 1297 1343 1298 } 1344 1299 1345 - /* 1346 - * tvp514x_remove - decoder driver i2c remove handler 1300 + /** 1301 + * tvp514x_remove() - decoder driver i2c remove handler 1347 1302 * @client: i2c driver client device structure 1348 1303 * 1349 1304 * Unregister decoder as an i2c client device and V4L2 ··· 1358 1313 kfree(decoder); 1359 1314 return 0; 1360 1315 } 1361 - /* 1362 - * TVP5146 Init/Power on Sequence 1363 - */ 1316 + /* TVP5146 Init/Power on Sequence */ 1364 1317 static const struct tvp514x_reg tvp5146_init_reg_seq[] = { 1365 1318 {TOK_WRITE, REG_VBUS_ADDRESS_ACCESS1, 0x02}, 1366 1319 {TOK_WRITE, REG_VBUS_ADDRESS_ACCESS2, 0x00}, ··· 1374 1331 {TOK_TERM, 0, 0}, 1375 1332 }; 1376 1333 1377 - /* 1378 - * TVP5147 Init/Power on Sequence 1379 - */ 1334 + /* TVP5147 Init/Power on Sequence */ 1380 1335 static const struct tvp514x_reg tvp5147_init_reg_seq[] = { 1381 1336 {TOK_WRITE, REG_VBUS_ADDRESS_ACCESS1, 0x02}, 1382 1337 {TOK_WRITE, REG_VBUS_ADDRESS_ACCESS2, 0x00}, ··· 1397 1356 {TOK_TERM, 0, 0}, 1398 1357 }; 1399 1358 1400 - /* 1401 - * TVP5146M2/TVP5147M1 Init/Power on Sequence 1402 - */ 1359 + /* TVP5146M2/TVP5147M1 Init/Power on Sequence */ 1403 1360 static const struct tvp514x_reg tvp514xm_init_reg_seq[] = { 1404 1361 {TOK_WRITE, REG_OPERATION_MODE, 0x01}, 1405 1362 {TOK_WRITE, REG_OPERATION_MODE, 0x00}, 1406 1363 {TOK_TERM, 0, 0}, 1407 1364 }; 1408 1365 1409 - /* 1366 + /** 1410 1367 * I2C Device Table - 1411 1368 * 1412 1369 * name - Name of the actual device/chip.