diff options
Diffstat (limited to 'drivers/media/dvb/frontends/atbm8830.c')
| -rw-r--r-- | drivers/media/dvb/frontends/atbm8830.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/atbm8830.c b/drivers/media/dvb/frontends/atbm8830.c index 59881a5944eb..43aac2f85c2e 100644 --- a/drivers/media/dvb/frontends/atbm8830.c +++ b/drivers/media/dvb/frontends/atbm8830.c | |||
| @@ -170,6 +170,19 @@ static int is_locked(struct atbm_state *priv, u8 *locked) | |||
| 170 | return 0; | 170 | return 0; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | static int set_agc_config(struct atbm_state *priv, | ||
| 174 | u8 min, u8 max, u8 hold_loop) | ||
| 175 | { | ||
| 176 | /* no effect if both min and max are zero */ | ||
| 177 | if (!min && !max) | ||
| 178 | return 0; | ||
| 179 | |||
| 180 | atbm8830_write_reg(priv, REG_AGC_MIN, min); | ||
| 181 | atbm8830_write_reg(priv, REG_AGC_MAX, max); | ||
| 182 | atbm8830_write_reg(priv, REG_AGC_HOLD_LOOP, hold_loop); | ||
| 183 | |||
| 184 | return 0; | ||
| 185 | } | ||
| 173 | 186 | ||
| 174 | static int set_static_channel_mode(struct atbm_state *priv) | 187 | static int set_static_channel_mode(struct atbm_state *priv) |
| 175 | { | 188 | { |
| @@ -227,6 +240,9 @@ static int atbm8830_init(struct dvb_frontend *fe) | |||
| 227 | /*Set IF frequency*/ | 240 | /*Set IF frequency*/ |
| 228 | set_if_freq(priv, cfg->if_freq); | 241 | set_if_freq(priv, cfg->if_freq); |
| 229 | 242 | ||
| 243 | /*Set AGC Config*/ | ||
| 244 | set_agc_config(priv, cfg->agc_min, cfg->agc_max, | ||
| 245 | cfg->agc_hold_loop); | ||
| 230 | 246 | ||
| 231 | /*Set static channel mode*/ | 247 | /*Set static channel mode*/ |
| 232 | set_static_channel_mode(priv); | 248 | set_static_channel_mode(priv); |
