summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/pluto2
diff options
context:
space:
mode:
authorAndreas Oberritter <devnull@localhost>2005-03-09 23:22:24 +0000
committerAndreas Oberritter <devnull@localhost>2005-03-09 23:22:24 +0000
commit20bc1a33c1c2d67aa8fad05533bfa995d4626e4f (patch)
tree668b97021724e02856e4fbdd88f9eb4b0086f41a /linux/drivers/media/dvb/pluto2
parentfd2c130cffc2b9bcc69ee0797fa879f559654f90 (diff)
downloadmediapointer-dvb-s2-20bc1a33c1c2d67aa8fad05533bfa995d4626e4f.tar.gz
mediapointer-dvb-s2-20bc1a33c1c2d67aa8fad05533bfa995d4626e4f.tar.bz2
renamed conflicting tda1004x_write_byte to tda10046_write_byte
Diffstat (limited to 'linux/drivers/media/dvb/pluto2')
-rw-r--r--linux/drivers/media/dvb/pluto2/pluto_fe.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/linux/drivers/media/dvb/pluto2/pluto_fe.c b/linux/drivers/media/dvb/pluto2/pluto_fe.c
index b481d06a4..c593f6cab 100644
--- a/linux/drivers/media/dvb/pluto2/pluto_fe.c
+++ b/linux/drivers/media/dvb/pluto2/pluto_fe.c
@@ -152,7 +152,7 @@ struct tda1004x_state {
// Functions
// Write the byte <data> to the register <reg> of the demodulator
-static int tda1004x_write_byte(struct i2c_adapter *i2c, int reg, int data)
+static int tda10046_write_byte(struct i2c_adapter *i2c, int reg, int data)
{
int ret;
u8 buf[] = { reg, data };
@@ -215,7 +215,7 @@ static int tda1004x_write_mask(struct i2c_adapter *i2c, int reg, int mask, int d
val |= data & 0xff;
// write it out again
- return tda1004x_write_byte(i2c, reg, val);
+ return tda10046_write_byte(i2c, reg, val);
}
// Write <len> bytes contained by <buf> in register <reg>
@@ -228,7 +228,7 @@ static int tda1004x_write_buf(struct i2c_adapter *i2c, int reg, unsigned char *b
result = 0;
for (i = 0; i < len; i++) {
- result = tda1004x_write_byte(i2c, reg + i, buf[i]);
+ result = tda10046_write_byte(i2c, reg + i, buf[i]);
if (result != 0)
break;
}
@@ -246,17 +246,17 @@ static int tda10046h_set_bandwidth(struct i2c_adapter *i2c, fe_bandwidth_t bandw
switch (bandwidth) {
case BANDWIDTH_6_MHZ:
tda1004x_write_buf(i2c, TDA10046H_TIME_WREF1, bandwidth_6mhz, sizeof(bandwidth_6mhz));
- tda1004x_write_byte(i2c, TDA1004X_DSSPARE2, 0);
+ tda10046_write_byte(i2c, TDA1004X_DSSPARE2, 0);
break;
case BANDWIDTH_7_MHZ:
tda1004x_write_buf(i2c, TDA10046H_TIME_WREF1, bandwidth_7mhz, sizeof(bandwidth_7mhz));
- tda1004x_write_byte(i2c, TDA1004X_DSSPARE2, 0);
+ tda10046_write_byte(i2c, TDA1004X_DSSPARE2, 0);
break;
case BANDWIDTH_8_MHZ:
tda1004x_write_buf(i2c, TDA10046H_TIME_WREF1, bandwidth_8mhz, sizeof(bandwidth_8mhz));
- tda1004x_write_byte(i2c, TDA1004X_DSSPARE2, 0xFF);
+ tda10046_write_byte(i2c, TDA1004X_DSSPARE2, 0xFF);
break;
default:
@@ -289,7 +289,7 @@ static int tda1004x_fwupload(struct i2c_adapter *i2c)
tda1004x_write_mask(i2c, TDA10046H_CONF_TRISTATE1, 1, 0);
tda1004x_write_mask(i2c, TDA1004X_CONFC4, 8, 8);
- tda1004x_write_byte(i2c, TDA10046H_CODE_CPT, 0x00);
+ tda10046_write_byte(i2c, TDA10046H_CODE_CPT, 0x00);
// Prepare the message
@@ -313,7 +313,7 @@ static int tda1004x_fwupload(struct i2c_adapter *i2c)
// First test to check if firmware has correctly been uploaded
- tda1004x_write_byte(i2c, TDA1004X_DSP_CMD, 0x61);
+ tda10046_write_byte(i2c, TDA1004X_DSP_CMD, 0x61);
dsp_data1 = tda1004x_read_byte(i2c, TDA1004X_DSP_DATA1);
dsp_data2 = tda1004x_read_byte(i2c, TDA1004X_DSP_DATA2);
if ((dsp_data1 != 0) || (dsp_data2 != 0))
@@ -321,7 +321,7 @@ static int tda1004x_fwupload(struct i2c_adapter *i2c)
// Second test to check if firmware has correctly been uploaded
- tda1004x_write_byte(i2c, TDA1004X_DSP_CMD, 0x67);
+ tda10046_write_byte(i2c, TDA1004X_DSP_CMD, 0x67);
dsp_data1 = tda1004x_read_byte(i2c, TDA1004X_DSP_DATA1);
dsp_data2 = tda1004x_read_byte(i2c, TDA1004X_DSP_DATA2);
if (dsp_data1 != 0x67)
@@ -870,37 +870,37 @@ static int tda10046_init(struct dvb_frontend *fe)
struct i2c_adapter *i2c = state->i2c;
int status = 0;
- status |= tda1004x_write_byte(i2c, TDA10046H_CONFPLL2, 0xa);
- status |= tda1004x_write_byte(i2c, TDA10046H_CONFPLL3, 0x03);
- status |= tda1004x_write_byte(i2c, TDA10046H_FREQ_OFFSET, 0x64);
- status |= tda1004x_write_byte(i2c, TDA10046H_FREQ_PHY2_MSB, 0xd4);
- status |= tda1004x_write_byte(i2c, TDA10046H_FREQ_PHY2_LSB, 0x2a);
- status |= tda1004x_write_byte(i2c, TDA10046H_TIME_WREF1, 0x60);
- status |= tda1004x_write_byte(i2c, TDA10046H_TIME_WREF2, 0x12);
- status |= tda1004x_write_byte(i2c, TDA10046H_TIME_WREF3, 0xa8);
- status |= tda1004x_write_byte(i2c, TDA10046H_TIME_WREF4, 0xe4);
- status |= tda1004x_write_byte(i2c, TDA10046H_TIME_WREF5, 0xbd);
+ status |= tda10046_write_byte(i2c, TDA10046H_CONFPLL2, 0xa);
+ status |= tda10046_write_byte(i2c, TDA10046H_CONFPLL3, 0x03);
+ status |= tda10046_write_byte(i2c, TDA10046H_FREQ_OFFSET, 0x64);
+ status |= tda10046_write_byte(i2c, TDA10046H_FREQ_PHY2_MSB, 0xd4);
+ status |= tda10046_write_byte(i2c, TDA10046H_FREQ_PHY2_LSB, 0x2a);
+ status |= tda10046_write_byte(i2c, TDA10046H_TIME_WREF1, 0x60);
+ status |= tda10046_write_byte(i2c, TDA10046H_TIME_WREF2, 0x12);
+ status |= tda10046_write_byte(i2c, TDA10046H_TIME_WREF3, 0xa8);
+ status |= tda10046_write_byte(i2c, TDA10046H_TIME_WREF4, 0xe4);
+ status |= tda10046_write_byte(i2c, TDA10046H_TIME_WREF5, 0xbd);
status |= tda1004x_write_mask(i2c, TDA1004X_CONFC4, 0x20, 0);
status |= tda1004x_write_mask(i2c, TDA1004X_CONFC1, 0xa0, 0x20);
- status |= tda1004x_write_byte(i2c, TDA10046H_AGC_CONF, 0);
+ status |= tda10046_write_byte(i2c, TDA10046H_AGC_CONF, 0);
status |= tda1004x_write_mask(i2c, TDA10046H_CONF_POLARITY, 0x60, 0x60);
- status |= tda1004x_write_byte(i2c, TDA10046H_AGC_TUN_MIN, 0);
- status |= tda1004x_write_byte(i2c, TDA10046H_AGC_TUN_MAX, 0xff);
- status |= tda1004x_write_byte(i2c, TDA10046H_AGC_IF_MIN, 0);
- status |= tda1004x_write_byte(i2c, TDA10046H_AGC_IF_MAX, 0xff);
+ status |= tda10046_write_byte(i2c, TDA10046H_AGC_TUN_MIN, 0);
+ status |= tda10046_write_byte(i2c, TDA10046H_AGC_TUN_MAX, 0xff);
+ status |= tda10046_write_byte(i2c, TDA10046H_AGC_IF_MIN, 0);
+ status |= tda10046_write_byte(i2c, TDA10046H_AGC_IF_MAX, 0xff);
status |= tda1004x_write_mask(i2c, TDA10046H_CVBER_CTRL, 0x30, 0x20);
status |= tda1004x_write_mask(i2c, TDA1004X_IT_SEL, 0x08, 0x08);
- status |= tda1004x_write_byte(i2c, TDA10046H_AGC_GAINS, 0x1);
+ status |= tda10046_write_byte(i2c, TDA10046H_AGC_GAINS, 0x1);
status |= tda1004x_write_mask(i2c, TDA1004X_AUTO, 0x80, 0);
- status |= tda1004x_write_byte(i2c, TDA1004X_CONF_TS1, 0x7);
+ status |= tda10046_write_byte(i2c, TDA1004X_CONF_TS1, 0x7);
status |= tda1004x_write_mask(i2c, TDA1004X_CONF_TS2, 0x31, 0);
status |= tda1004x_write_mask(i2c, TDA10046H_CONF_TRISTATE1, 0x9e, 0);
- status |= tda1004x_write_byte(i2c, TDA10046H_CONF_TRISTATE2, 0xbc);
- status |= tda1004x_write_byte(i2c, TDA10046H_GPIO_OUT_SEL, 0xfc);
- status |= tda1004x_write_byte(i2c, TDA10046H_GPIO_SP_DS3, 0);
- status |= tda1004x_write_byte(i2c, TDA10046H_CHANNEL_INFO1, 0);
- status |= tda1004x_write_byte(i2c, TDA1004X_CONFADC2, 0x74);
- status |= tda1004x_write_byte(i2c, TDA1004X_CONFADC2, 0x34);
+ status |= tda10046_write_byte(i2c, TDA10046H_CONF_TRISTATE2, 0xbc);
+ status |= tda10046_write_byte(i2c, TDA10046H_GPIO_OUT_SEL, 0xfc);
+ status |= tda10046_write_byte(i2c, TDA10046H_GPIO_SP_DS3, 0);
+ status |= tda10046_write_byte(i2c, TDA10046H_CHANNEL_INFO1, 0);
+ status |= tda10046_write_byte(i2c, TDA1004X_CONFADC2, 0x74);
+ status |= tda10046_write_byte(i2c, TDA1004X_CONFADC2, 0x34);
// upload firmware
DEBUG(0,"%s: Uploading firmware",__FUNCTION__);