aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-18 07:35:36 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-18 07:39:24 -0400
commit04074f1fdfe9eefc51bded7f45fafd8cc5d3779c (patch)
tree3ef46e4ff8518509068d1c33d1efa42549ac1cf3
parent2ccf12afe6da2145085056cebaae2149899f4f8c (diff)
[media] saa7115: make multi-line comments compliant with CodingStyle
changeset 2ccf12a did a crappy job when added multi-line comment lines, violating CodingStyle. Change the comments added there to fulfill CodingStyle, and document the platform_data using Documentation/kernel-doc-nano-HOWTO.txt. Cc: Jon Arne Jørgensen <jonarne@jonarne.no> Cc: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/i2c/saa7115.c24
-rw-r--r--include/media/saa7115.h49
2 files changed, 43 insertions, 30 deletions
diff --git a/drivers/media/i2c/saa7115.c b/drivers/media/i2c/saa7115.c
index 5cc48f751b3a..637d02634527 100644
--- a/drivers/media/i2c/saa7115.c
+++ b/drivers/media/i2c/saa7115.c
@@ -225,12 +225,14 @@ static const unsigned char saa7111_init[] = {
225 0x00, 0x00 225 0x00, 0x00
226}; 226};
227 227
228/* This table has one illegal value, and some values that are not 228/*
229 correct according to the datasheet initialization table. 229 * This table has one illegal value, and some values that are not
230 230 * correct according to the datasheet initialization table.
231 If you need a table with legal/default values tell the driver in 231 *
232 i2c_board_info.platform_data, and you will get the gm7113c_init 232 * If you need a table with legal/default values tell the driver in
233 table instead. */ 233 * i2c_board_info.platform_data, and you will get the gm7113c_init
234 * table instead.
235 */
234 236
235/* SAA7113 Init codes */ 237/* SAA7113 Init codes */
236static const unsigned char saa7113_init[] = { 238static const unsigned char saa7113_init[] = {
@@ -265,10 +267,12 @@ static const unsigned char saa7113_init[] = {
265 0x00, 0x00 267 0x00, 0x00
266}; 268};
267 269
268/* GM7113C is a clone of the SAA7113 chip 270/*
269 This init table is copied out of the saa7113 datasheet. 271 * GM7113C is a clone of the SAA7113 chip
270 In R_08 we enable "Automatic Field Detection" [AUFD], 272 * This init table is copied out of the saa7113 datasheet.
271 this is disabled when saa711x_set_v4lstd is called. */ 273 * In R_08 we enable "Automatic Field Detection" [AUFD],
274 * this is disabled when saa711x_set_v4lstd is called.
275 */
272static const unsigned char gm7113c_init[] = { 276static const unsigned char gm7113c_init[] = {
273 R_01_INC_DELAY, 0x08, 277 R_01_INC_DELAY, 0x08,
274 R_02_INPUT_CNTL_1, 0xc0, 278 R_02_INPUT_CNTL_1, 0xc0,
diff --git a/include/media/saa7115.h b/include/media/saa7115.h
index e8d512a7592f..76911e71de17 100644
--- a/include/media/saa7115.h
+++ b/include/media/saa7115.h
@@ -47,9 +47,11 @@
47#define SAA7111_FMT_YUV411 0xc0 47#define SAA7111_FMT_YUV411 0xc0
48 48
49/* config flags */ 49/* config flags */
50/* Register 0x85 should set bit 0 to 0 (it's 1 by default). This bit 50/*
51 * Register 0x85 should set bit 0 to 0 (it's 1 by default). This bit
51 * controls the IDQ signal polarity which is set to 'inverted' if the bit 52 * controls the IDQ signal polarity which is set to 'inverted' if the bit
52 * it 1 and to 'default' if it is 0. */ 53 * it 1 and to 'default' if it is 0.
54 */
53#define SAA7115_IDQ_IS_DEFAULT (1 << 0) 55#define SAA7115_IDQ_IS_DEFAULT (1 << 0)
54 56
55/* s_crystal_freq values and flags */ 57/* s_crystal_freq values and flags */
@@ -84,11 +86,13 @@ enum saa7113_r10_ofts {
84 SAA7113_OFTS_VFLAG_BY_DATA_TYPE 86 SAA7113_OFTS_VFLAG_BY_DATA_TYPE
85}; 87};
86 88
87/* Register 0x12 "Output control" [Bit 0..3 Or Bit 4..7]: 89/*
90 * Register 0x12 "Output control" [Bit 0..3 Or Bit 4..7]:
88 * This is used to select what data is output on the RTS0 and RTS1 pins. 91 * This is used to select what data is output on the RTS0 and RTS1 pins.
89 * RTS1 [Bit 4..7] Defaults to DOT_IN. (This value can not be set for RTS0) 92 * RTS1 [Bit 4..7] Defaults to DOT_IN. (This value can not be set for RTS0)
90 * RTS0 [Bit 0..3] Defaults to VIPB in gm7113c_init as specified 93 * RTS0 [Bit 0..3] Defaults to VIPB in gm7113c_init as specified
91 * in the datasheet, but is set to HREF_HS in the saa7113_init table. */ 94 * in the datasheet, but is set to HREF_HS in the saa7113_init table.
95 */
92enum saa7113_r12_rts { 96enum saa7113_r12_rts {
93 SAA7113_RTS_DOT_IN = 0, /* OBS: Only for RTS1 (Default RTS1) */ 97 SAA7113_RTS_DOT_IN = 0, /* OBS: Only for RTS1 (Default RTS1) */
94 SAA7113_RTS_VIPB, /* Default RTS0 For gm7113c_init */ 98 SAA7113_RTS_VIPB, /* Default RTS0 For gm7113c_init */
@@ -108,24 +112,29 @@ enum saa7113_r12_rts {
108 SAA7113_RTS_FID 112 SAA7113_RTS_FID
109}; 113};
110 114
115/**
116 * struct saa7115_platform_data - Allow overriding default initialization
117 *
118 * @saa7113_force_gm7113c_init: Force the use of the gm7113c_init table
119 * instead of saa7113_init table
120 * (saa7113 only)
121 * @saa7113_r08_htc: [R_08 - Bit 3..4]
122 * @saa7113_r10_vrln: [R_10 - Bit 3]
123 * default: Disabled for gm7113c_init
124 * Enabled for saa7113c_init
125 * @saa7113_r10_ofts: [R_10 - Bit 6..7]
126 * @saa7113_r12_rts0: [R_12 - Bit 0..3]
127 * @saa7113_r12_rts1: [R_12 - Bit 4..7]
128 * @saa7113_r13_adlsb: [R_13 - Bit 7] - default: disabled
129 */
111struct saa7115_platform_data { 130struct saa7115_platform_data {
112 /* saa7113 only: Force the use of the gm7113c_init table,
113 * instead of the old saa7113_init table. */
114 bool saa7113_force_gm7113c_init; 131 bool saa7113_force_gm7113c_init;
115 132 enum saa7113_r08_htc *saa7113_r08_htc;
116 /* SAA7113/GM7113C Specific configurations */ 133 bool *saa7113_r10_vrln;
117 enum saa7113_r08_htc *saa7113_r08_htc; /* [R_08 - Bit 3..4] */ 134 enum saa7113_r10_ofts *saa7113_r10_ofts;
118 135 enum saa7113_r12_rts *saa7113_r12_rts0;
119 bool *saa7113_r10_vrln; /* [R_10 - Bit 3] 136 enum saa7113_r12_rts *saa7113_r12_rts1;
120 Disabled for gm7113c_init 137 bool *saa7113_r13_adlsb;
121 Enabled for saa7113c_init */
122 enum saa7113_r10_ofts *saa7113_r10_ofts; /* [R_10 - Bit 6..7] */
123
124 enum saa7113_r12_rts *saa7113_r12_rts0; /* [R_12 - Bit 0..3] */
125 enum saa7113_r12_rts *saa7113_r12_rts1; /* [R_12 - Bit 4..7] */
126
127 bool *saa7113_r13_adlsb; /* [R_13 - Bit 7]
128 Default disabled */
129}; 138};
130 139
131#endif 140#endif