diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-09-08 11:51:56 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-20 23:04:53 -0400 |
commit | 9d10f3d7e73d3428555da97134fc597710a55f39 (patch) | |
tree | 99a3817fbe943cbceea5feb7c76f14bcfb4f1c40 /drivers/media/dvb/frontends/ix2505v.c | |
parent | 1ae2c5893d091bdfa382cbcfa3e09461f3a6c884 (diff) |
V4L/DVB: ix2505v: make scripts/checkpatch.pl happy
WARNING: please, no space before tabs
+ * ^IPOR = Power on Reset (VCC H=<2.2v L=>2.2v)$
WARNING: unnecessary whitespace before a quoted newline
+ deb_info("Frq=%d x=%d N=%d A=%d \n", frequency, x, N, A);
WARNING: please, no space before tabs
+^Ielse ^I^I/*frequency up to 2150000*/$
WARNING: unnecessary whitespace before a quoted newline
+ deb_info("Data 0=[%x%x%x%x] \n", data[0], data[1], data[2], data[3]);
WARNING: unnecessary whitespace before a quoted newline
+ deb_info("Data 2=[%x%x] \n", data[2], data[3]);
Cc: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/ix2505v.c')
-rw-r--r-- | drivers/media/dvb/frontends/ix2505v.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/media/dvb/frontends/ix2505v.c b/drivers/media/dvb/frontends/ix2505v.c index e9fe6da6d162..55f2eba7bc96 100644 --- a/drivers/media/dvb/frontends/ix2505v.c +++ b/drivers/media/dvb/frontends/ix2505v.c | |||
@@ -26,9 +26,10 @@ | |||
26 | #include "ix2505v.h" | 26 | #include "ix2505v.h" |
27 | 27 | ||
28 | static int ix2505v_debug; | 28 | static int ix2505v_debug; |
29 | #define dprintk(level, args...) \ | 29 | #define dprintk(level, args...) do { \ |
30 | do { if (ix2505v_debug & level) printk(KERN_DEBUG "ix2505v: " args); \ | 30 | if (ix2505v_debug & level) \ |
31 | } while (0) | 31 | printk(KERN_DEBUG "ix2505v: " args); \ |
32 | } while (0) | ||
32 | 33 | ||
33 | #define deb_info(args...) dprintk(0x01, args) | 34 | #define deb_info(args...) dprintk(0x01, args) |
34 | #define deb_i2c(args...) dprintk(0x02, args) | 35 | #define deb_i2c(args...) dprintk(0x02, args) |
@@ -47,7 +48,7 @@ struct ix2505v_state { | |||
47 | * | 48 | * |
48 | * byte1 = address | 49 | * byte1 = address |
49 | * byte2; | 50 | * byte2; |
50 | * POR = Power on Reset (VCC H=<2.2v L=>2.2v) | 51 | * POR = Power on Reset (VCC H=<2.2v L=>2.2v) |
51 | * FL = Phase Lock (H=lock L=unlock) | 52 | * FL = Phase Lock (H=lock L=unlock) |
52 | * RD0-2 = Reserved internal operations | 53 | * RD0-2 = Reserved internal operations |
53 | * | 54 | * |
@@ -166,7 +167,7 @@ static int ix2505v_set_params(struct dvb_frontend *fe, | |||
166 | data[1] = (N << 5) | (A & 0x1f); | 167 | data[1] = (N << 5) | (A & 0x1f); |
167 | data[2] = 0x81 | ((cc & 0x3) << 5) ; /*PD5,PD4 & TM = 0|C1,C0|REF=1*/ | 168 | data[2] = 0x81 | ((cc & 0x3) << 5) ; /*PD5,PD4 & TM = 0|C1,C0|REF=1*/ |
168 | 169 | ||
169 | deb_info("Frq=%d x=%d N=%d A=%d \n", frequency, x, N, A); | 170 | deb_info("Frq=%d x=%d N=%d A=%d\n", frequency, x, N, A); |
170 | 171 | ||
171 | if (frequency <= 1065000) | 172 | if (frequency <= 1065000) |
172 | local_osc = (6 << 5) | 2; | 173 | local_osc = (6 << 5) | 2; |
@@ -182,12 +183,11 @@ static int ix2505v_set_params(struct dvb_frontend *fe, | |||
182 | local_osc = (4 << 5); | 183 | local_osc = (4 << 5); |
183 | else if (frequency <= 1942000) | 184 | else if (frequency <= 1942000) |
184 | local_osc = (5 << 5); | 185 | local_osc = (5 << 5); |
185 | else /*frequency up to 2150000*/ | 186 | else /*frequency up to 2150000*/ |
186 | local_osc = (6 << 5); | 187 | local_osc = (6 << 5); |
187 | 188 | ||
188 | data[3] = local_osc; /* all other bits set 0 */ | 189 | data[3] = local_osc; /* all other bits set 0 */ |
189 | 190 | ||
190 | |||
191 | if (b_w <= 10000) | 191 | if (b_w <= 10000) |
192 | lpf = 0xc; | 192 | lpf = 0xc; |
193 | else if (b_w <= 12000) | 193 | else if (b_w <= 12000) |
@@ -212,7 +212,7 @@ static int ix2505v_set_params(struct dvb_frontend *fe, | |||
212 | lpf = 0xb; | 212 | lpf = 0xb; |
213 | 213 | ||
214 | deb_info("Osc=%x b_w=%x lpf=%x\n", local_osc, b_w, lpf); | 214 | deb_info("Osc=%x b_w=%x lpf=%x\n", local_osc, b_w, lpf); |
215 | deb_info("Data 0=[%x%x%x%x] \n", data[0], data[1], data[2], data[3]); | 215 | deb_info("Data 0=[%x%x%x%x]\n", data[0], data[1], data[2], data[3]); |
216 | 216 | ||
217 | if (fe->ops.i2c_gate_ctrl) | 217 | if (fe->ops.i2c_gate_ctrl) |
218 | fe->ops.i2c_gate_ctrl(fe, 1); | 218 | fe->ops.i2c_gate_ctrl(fe, 1); |
@@ -226,13 +226,12 @@ static int ix2505v_set_params(struct dvb_frontend *fe, | |||
226 | len = 1; | 226 | len = 1; |
227 | ret |= ix2505v_write(state, &data[2], len); /* write byte 4 only */ | 227 | ret |= ix2505v_write(state, &data[2], len); /* write byte 4 only */ |
228 | 228 | ||
229 | |||
230 | msleep(10); | 229 | msleep(10); |
231 | 230 | ||
232 | data[2] |= ((lpf >> 2) & 0x3) << 3; /* lpf */ | 231 | data[2] |= ((lpf >> 2) & 0x3) << 3; /* lpf */ |
233 | data[3] |= (lpf & 0x3) << 2; | 232 | data[3] |= (lpf & 0x3) << 2; |
234 | 233 | ||
235 | deb_info("Data 2=[%x%x] \n", data[2], data[3]); | 234 | deb_info("Data 2=[%x%x]\n", data[2], data[3]); |
236 | 235 | ||
237 | len = 2; | 236 | len = 2; |
238 | ret |= ix2505v_write(state, &data[2], len); /* write byte 4 & 5 */ | 237 | ret |= ix2505v_write(state, &data[2], len); /* write byte 4 & 5 */ |