diff options
author | Antti Palosaari <crope@iki.fi> | 2011-04-09 19:50:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 08:26:59 -0400 |
commit | 7ea03d211c055cfdef7930a29a11a54d2682f953 (patch) | |
tree | 6f17a853e0dfadb0b454c4e9273c99b58fb004dd /drivers/media/dvb/dvb-usb | |
parent | 26eb7045f1c9eee3b65f573d27154d53aa9d6cc7 (diff) |
[media] anysee: I2C address fix
Switch from 8 bit notation to real 7 bit.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/anysee.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c index 6b402e943539..18184d30e481 100644 --- a/drivers/media/dvb/dvb-usb/anysee.c +++ b/drivers/media/dvb/dvb-usb/anysee.c | |||
@@ -162,7 +162,7 @@ static int anysee_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, | |||
162 | if (num > i + 1 && (msg[i+1].flags & I2C_M_RD)) { | 162 | if (num > i + 1 && (msg[i+1].flags & I2C_M_RD)) { |
163 | u8 buf[6]; | 163 | u8 buf[6]; |
164 | buf[0] = CMD_I2C_READ; | 164 | buf[0] = CMD_I2C_READ; |
165 | buf[1] = msg[i].addr + 1; | 165 | buf[1] = (msg[i].addr << 1) | 0x01; |
166 | buf[2] = msg[i].buf[0]; | 166 | buf[2] = msg[i].buf[0]; |
167 | buf[3] = 0x00; | 167 | buf[3] = 0x00; |
168 | buf[4] = 0x00; | 168 | buf[4] = 0x00; |
@@ -173,7 +173,7 @@ static int anysee_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, | |||
173 | } else { | 173 | } else { |
174 | u8 buf[4+msg[i].len]; | 174 | u8 buf[4+msg[i].len]; |
175 | buf[0] = CMD_I2C_WRITE; | 175 | buf[0] = CMD_I2C_WRITE; |
176 | buf[1] = msg[i].addr; | 176 | buf[1] = (msg[i].addr << 1); |
177 | buf[2] = msg[i].len; | 177 | buf[2] = msg[i].len; |
178 | buf[3] = 0x01; | 178 | buf[3] = 0x01; |
179 | memcpy(&buf[4], msg[i].buf, msg[i].len); | 179 | memcpy(&buf[4], msg[i].buf, msg[i].len); |
@@ -224,7 +224,7 @@ static int anysee_mt352_demod_init(struct dvb_frontend *fe) | |||
224 | 224 | ||
225 | /* Callbacks for DVB USB */ | 225 | /* Callbacks for DVB USB */ |
226 | static struct tda10023_config anysee_tda10023_config = { | 226 | static struct tda10023_config anysee_tda10023_config = { |
227 | .demod_address = 0x1a, | 227 | .demod_address = (0x1a >> 1), |
228 | .invert = 0, | 228 | .invert = 0, |
229 | .xtal = 16000000, | 229 | .xtal = 16000000, |
230 | .pll_m = 11, | 230 | .pll_m = 11, |
@@ -235,12 +235,12 @@ static struct tda10023_config anysee_tda10023_config = { | |||
235 | }; | 235 | }; |
236 | 236 | ||
237 | static struct mt352_config anysee_mt352_config = { | 237 | static struct mt352_config anysee_mt352_config = { |
238 | .demod_address = 0x1e, | 238 | .demod_address = (0x1e >> 1), |
239 | .demod_init = anysee_mt352_demod_init, | 239 | .demod_init = anysee_mt352_demod_init, |
240 | }; | 240 | }; |
241 | 241 | ||
242 | static struct zl10353_config anysee_zl10353_config = { | 242 | static struct zl10353_config anysee_zl10353_config = { |
243 | .demod_address = 0x1e, | 243 | .demod_address = (0x1e >> 1), |
244 | .parallel_ts = 1, | 244 | .parallel_ts = 1, |
245 | }; | 245 | }; |
246 | 246 | ||
@@ -361,13 +361,13 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
361 | /* Thomson dtt7579 (not sure) PLL inside of: | 361 | /* Thomson dtt7579 (not sure) PLL inside of: |
362 | Samsung DNOS404ZH102A NIM | 362 | Samsung DNOS404ZH102A NIM |
363 | Samsung DNOS404ZH103A NIM */ | 363 | Samsung DNOS404ZH103A NIM */ |
364 | dvb_attach(dvb_pll_attach, adap->fe, 0x61, | 364 | dvb_attach(dvb_pll_attach, adap->fe, (0xc2 >> 1), |
365 | NULL, DVB_PLL_THOMSON_DTT7579); | 365 | NULL, DVB_PLL_THOMSON_DTT7579); |
366 | break; | 366 | break; |
367 | case DVB_PLL_SAMSUNG_DTOS403IH102A: | 367 | case DVB_PLL_SAMSUNG_DTOS403IH102A: |
368 | /* Unknown PLL inside of Samsung DTOS403IH102A tuner module */ | 368 | /* Unknown PLL inside of Samsung DTOS403IH102A tuner module */ |
369 | dvb_attach(dvb_pll_attach, adap->fe, 0xc0, | 369 | dvb_attach(dvb_pll_attach, adap->fe, (0xc0 >> 1), |
370 | &adap->dev->i2c_adap, DVB_PLL_SAMSUNG_DTOS403IH102A); | 370 | &adap->dev->i2c_adap, DVB_PLL_SAMSUNG_DTOS403IH102A); |
371 | break; | 371 | break; |
372 | } | 372 | } |
373 | 373 | ||