diff options
Diffstat (limited to 'drivers/media/dvb/frontends/bsru6.h')
-rw-r--r-- | drivers/media/dvb/frontends/bsru6.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/bsru6.h b/drivers/media/dvb/frontends/bsru6.h index 2a5366ce79cc..e231cd84b3a1 100644 --- a/drivers/media/dvb/frontends/bsru6.h +++ b/drivers/media/dvb/frontends/bsru6.h | |||
@@ -101,11 +101,12 @@ static int alps_bsru6_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ra | |||
101 | return 0; | 101 | return 0; |
102 | } | 102 | } |
103 | 103 | ||
104 | static int alps_bsru6_pll_set(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters *params) | 104 | static int alps_bsru6_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) |
105 | { | 105 | { |
106 | u8 buf[4]; | 106 | u8 buf[4]; |
107 | u32 div; | 107 | u32 div; |
108 | struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) }; | 108 | struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) }; |
109 | struct i2c_adapter *i2c = fe->tuner_priv; | ||
109 | 110 | ||
110 | if ((params->frequency < 950000) || (params->frequency > 2150000)) | 111 | if ((params->frequency < 950000) || (params->frequency > 2150000)) |
111 | return -EINVAL; | 112 | return -EINVAL; |
@@ -119,6 +120,8 @@ static int alps_bsru6_pll_set(struct dvb_frontend *fe, struct i2c_adapter *i2c, | |||
119 | if (params->frequency > 1530000) | 120 | if (params->frequency > 1530000) |
120 | buf[3] = 0xc0; | 121 | buf[3] = 0xc0; |
121 | 122 | ||
123 | if (fe->ops.i2c_gate_ctrl) | ||
124 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
122 | if (i2c_transfer(i2c, &msg, 1) != 1) | 125 | if (i2c_transfer(i2c, &msg, 1) != 1) |
123 | return -EIO; | 126 | return -EIO; |
124 | return 0; | 127 | return 0; |
@@ -134,7 +137,6 @@ static struct stv0299_config alps_bsru6_config = { | |||
134 | .volt13_op0_op1 = STV0299_VOLT13_OP1, | 137 | .volt13_op0_op1 = STV0299_VOLT13_OP1, |
135 | .min_delay_ms = 100, | 138 | .min_delay_ms = 100, |
136 | .set_symbol_rate = alps_bsru6_set_symbol_rate, | 139 | .set_symbol_rate = alps_bsru6_set_symbol_rate, |
137 | .pll_set = alps_bsru6_pll_set, | ||
138 | }; | 140 | }; |
139 | 141 | ||
140 | #endif | 142 | #endif |