aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/or51132.c
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2006-04-02 19:40:33 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 00:57:33 -0400
commit0ead09180a0620eaef761da84259262bfcf21090 (patch)
tree15d954e51e5b40cf4d5930708fe98076adb1063a /drivers/media/dvb/frontends/or51132.c
parentdfd8317d3340f03bc06eba6b58f0ec0861da4a13 (diff)
V4L/DVB (3708a): Clean up some cruft in or51132 frontend
There is some old code in the or51133 firmware loading function that has no effect. Left a comment to in case it helps someone trying to reverse engineer the chip. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/or51132.c')
-rw-r--r--drivers/media/dvb/frontends/or51132.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/media/dvb/frontends/or51132.c b/drivers/media/dvb/frontends/or51132.c
index 80e0f28127b7..dca1de555a58 100644
--- a/drivers/media/dvb/frontends/or51132.c
+++ b/drivers/media/dvb/frontends/or51132.c
@@ -106,9 +106,8 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware
106{ 106{
107 struct or51132_state* state = fe->demodulator_priv; 107 struct or51132_state* state = fe->demodulator_priv;
108 static u8 run_buf[] = {0x7F,0x01}; 108 static u8 run_buf[] = {0x7F,0x01};
109 static u8 get_ver_buf[] = {0x04,0x00,0x30,0x00,0x00}; 109 u8 rec_buf[8];
110 u8 rec_buf[14]; 110 u8 cmd_buf[3];
111 u8 cmd_buf[14];
112 u32 firmwareAsize, firmwareBsize; 111 u32 firmwareAsize, firmwareBsize;
113 int i,ret; 112 int i,ret;
114 113
@@ -157,7 +156,6 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware
157 cmd_buf[0] = 0x10; 156 cmd_buf[0] = 0x10;
158 cmd_buf[1] = 0x10; 157 cmd_buf[1] = 0x10;
159 cmd_buf[2] = 0x00; 158 cmd_buf[2] = 0x00;
160 cmd_buf[3] = 0x00;
161 msleep(20); /* 20ms */ 159 msleep(20); /* 20ms */
162 if ((ret = i2c_writebytes(state,state->config->demod_address, 160 if ((ret = i2c_writebytes(state,state->config->demod_address,
163 cmd_buf,3))) { 161 cmd_buf,3))) {
@@ -167,8 +165,6 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware
167 165
168 cmd_buf[0] = 0x04; 166 cmd_buf[0] = 0x04;
169 cmd_buf[1] = 0x17; 167 cmd_buf[1] = 0x17;
170 cmd_buf[2] = 0x00;
171 cmd_buf[3] = 0x00;
172 msleep(20); /* 20ms */ 168 msleep(20); /* 20ms */
173 if ((ret = i2c_writebytes(state,state->config->demod_address, 169 if ((ret = i2c_writebytes(state,state->config->demod_address,
174 cmd_buf,2))) { 170 cmd_buf,2))) {
@@ -178,8 +174,6 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware
178 174
179 cmd_buf[0] = 0x00; 175 cmd_buf[0] = 0x00;
180 cmd_buf[1] = 0x00; 176 cmd_buf[1] = 0x00;
181 cmd_buf[2] = 0x00;
182 cmd_buf[3] = 0x00;
183 msleep(20); /* 20ms */ 177 msleep(20); /* 20ms */
184 if ((ret = i2c_writebytes(state,state->config->demod_address, 178 if ((ret = i2c_writebytes(state,state->config->demod_address,
185 cmd_buf,2))) { 179 cmd_buf,2))) {
@@ -189,7 +183,11 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware
189 183
190 for(i=0;i<4;i++) { 184 for(i=0;i<4;i++) {
191 msleep(20); /* 20ms */ 185 msleep(20); /* 20ms */
192 get_ver_buf[4] = i+1; 186 /* One apon a time, this command might have had something
187 to do with getting the firmware version, but it's
188 not used anymore:
189 {0x04,0x00,0x30,0x00,i+1} */
190 /* Read 8 bytes, two bytes at a time */
193 if ((ret = i2c_readbytes(state,state->config->demod_address, 191 if ((ret = i2c_readbytes(state,state->config->demod_address,
194 &rec_buf[i*2],2))) { 192 &rec_buf[i*2],2))) {
195 printk(KERN_WARNING 193 printk(KERN_WARNING
@@ -208,7 +206,6 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware
208 cmd_buf[0] = 0x10; 206 cmd_buf[0] = 0x10;
209 cmd_buf[1] = 0x00; 207 cmd_buf[1] = 0x00;
210 cmd_buf[2] = 0x00; 208 cmd_buf[2] = 0x00;
211 cmd_buf[3] = 0x00;
212 msleep(20); /* 20ms */ 209 msleep(20); /* 20ms */
213 if ((ret = i2c_writebytes(state,state->config->demod_address, 210 if ((ret = i2c_writebytes(state,state->config->demod_address,
214 cmd_buf,3))) { 211 cmd_buf,3))) {