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

V4L/DVB (11583): isl6423: Various fixes to use external modulation

Use external modulation

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Andreas Regel and committed by
Mauro Carvalho Chehab
54d859ec 56571507

+26 -10
+25 -10
drivers/media/dvb/frontends/isl6423.c
··· 73 73 74 74 struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = &reg, .len = 1 }; 75 75 76 + dprintk(FE_DEBUG, 1, "write reg %02X", reg); 76 77 err = i2c_transfer(i2c, &msg, 1); 77 78 if (err < 0) 78 79 goto exit; ··· 134 133 if (err < 0) 135 134 goto exit; 136 135 136 + isl6423->reg_3 = reg_3; 137 + isl6423->reg_4 = reg_4; 138 + 137 139 return 0; 138 140 exit: 139 141 dprintk(FE_ERROR, 1, "I/O error <%d>", err); ··· 148 144 enum fe_sec_voltage voltage) 149 145 { 150 146 struct isl6423_dev *isl6423 = (struct isl6423_dev *) fe->sec_priv; 147 + u8 reg_3 = isl6423->reg_3; 151 148 u8 reg_4 = isl6423->reg_4; 152 149 int err = 0; 153 - 154 - /* SR4H = 0, SR4M = 1, SR4L = 1 */ 155 - reg_4 = 0x03 << 5; 156 150 157 151 switch (voltage) { 158 152 case SEC_VOLTAGE_OFF: ··· 162 160 /* EN = 1, VSPEN = 1, VTOP = 0, VBOT = 0 */ 163 161 reg_4 |= (1 << 4); 164 162 reg_4 &= ~0x3; 163 + reg_3 |= (1 << 3); 165 164 break; 166 165 167 166 case SEC_VOLTAGE_18: ··· 170 167 reg_4 |= (1 << 4); 171 168 reg_4 |= 0x2; 172 169 reg_4 &= ~0x1; 170 + reg_3 |= (1 << 3); 173 171 break; 174 172 175 173 default: 176 174 break; 177 175 } 176 + err = isl6423_write(isl6423, reg_3); 177 + if (err < 0) 178 + goto exit; 179 + 178 180 err = isl6423_write(isl6423, reg_4); 179 181 if (err < 0) 180 182 goto exit; 183 + 184 + isl6423->reg_3 = reg_3; 185 + isl6423->reg_4 = reg_4; 181 186 182 187 return 0; 183 188 exit: ··· 199 188 u8 reg_3 = isl6423->reg_3; 200 189 const struct isl6423_config *config = isl6423->config; 201 190 int err = 0; 202 - 203 - /* SR3H = 0, SR3M = 1, SR3L = 0 */ 204 - reg_3 = 0x02 << 5; 205 191 206 192 switch (config->current_max) { 207 193 case SEC_CURRENT_275m: ··· 234 226 235 227 switch (config->curlim) { 236 228 case SEC_CURRENT_LIM_ON: 237 - /* DCL = 1 */ 238 - reg_3 |= 0x10; 229 + /* DCL = 0 */ 230 + reg_3 &= ~0x10; 239 231 break; 240 232 241 233 case SEC_CURRENT_LIM_OFF: 242 - /* DCL = 0 */ 243 - reg_3 &= ~0x10; 234 + /* DCL = 1 */ 235 + reg_3 |= 0x10; 244 236 break; 245 237 } 246 238 247 239 err = isl6423_write(isl6423, reg_3); 248 240 if (err < 0) 249 241 goto exit; 242 + 243 + isl6423->reg_3 = reg_3; 250 244 251 245 return 0; 252 246 exit: ··· 277 267 isl6423->config = config; 278 268 isl6423->i2c = i2c; 279 269 fe->sec_priv = isl6423; 270 + 271 + /* SR3H = 0, SR3M = 1, SR3L = 0 */ 272 + isl6423->reg_3 = 0x02 << 5; 273 + /* SR4H = 0, SR4M = 1, SR4L = 1 */ 274 + isl6423->reg_4 = 0x03 << 5; 280 275 281 276 if (isl6423_set_current(fe)) 282 277 goto exit;
+1
drivers/media/dvb/ttpci/budget-ci.c
··· 1383 1383 static struct isl6423_config tt1600_isl6423_config = { 1384 1384 .current_max = SEC_CURRENT_515m, 1385 1385 .curlim = SEC_CURRENT_LIM_ON, 1386 + .mod_extern = 1, 1386 1387 .addr = 0x08, 1387 1388 }; 1388 1389