diff options
Diffstat (limited to 'drivers/media/dvb/frontends/drxk_hard.c')
-rw-r--r-- | drivers/media/dvb/frontends/drxk_hard.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c index 1d29ed23154..91f3296917f 100644 --- a/drivers/media/dvb/frontends/drxk_hard.c +++ b/drivers/media/dvb/frontends/drxk_hard.c | |||
@@ -618,6 +618,10 @@ error: | |||
618 | 618 | ||
619 | static int init_state(struct drxk_state *state) | 619 | static int init_state(struct drxk_state *state) |
620 | { | 620 | { |
621 | /* | ||
622 | * FIXME: most (all?) of the values bellow should be moved into | ||
623 | * struct drxk_config, as they are probably board-specific | ||
624 | */ | ||
621 | u32 ulVSBIfAgcMode = DRXK_AGC_CTRL_AUTO; | 625 | u32 ulVSBIfAgcMode = DRXK_AGC_CTRL_AUTO; |
622 | u32 ulVSBIfAgcOutputLevel = 0; | 626 | u32 ulVSBIfAgcOutputLevel = 0; |
623 | u32 ulVSBIfAgcMinLevel = 0; | 627 | u32 ulVSBIfAgcMinLevel = 0; |
@@ -672,10 +676,6 @@ static int init_state(struct drxk_state *state) | |||
672 | u32 ulRfMirror = 1; | 676 | u32 ulRfMirror = 1; |
673 | u32 ulPowerDown = 0; | 677 | u32 ulPowerDown = 0; |
674 | 678 | ||
675 | u32 ulAntennaDVBT = 1; | ||
676 | u32 ulAntennaDVBC = 0; | ||
677 | u32 ulAntennaSwitchDVBTDVBC = 0; | ||
678 | |||
679 | dprintk(1, "\n"); | 679 | dprintk(1, "\n"); |
680 | 680 | ||
681 | state->m_hasLNA = false; | 681 | state->m_hasLNA = false; |
@@ -858,11 +858,6 @@ static int init_state(struct drxk_state *state) | |||
858 | state->m_GPIOCfg = (ulGPIOCfg); | 858 | state->m_GPIOCfg = (ulGPIOCfg); |
859 | state->m_GPIO = (ulGPIO == 0 ? 0 : 1); | 859 | state->m_GPIO = (ulGPIO == 0 ? 0 : 1); |
860 | 860 | ||
861 | state->m_AntennaDVBT = (ulAntennaDVBT == 0 ? 0 : 1); | ||
862 | state->m_AntennaDVBC = (ulAntennaDVBC == 0 ? 0 : 1); | ||
863 | state->m_AntennaSwitchDVBTDVBC = | ||
864 | (ulAntennaSwitchDVBTDVBC == 0 ? 0 : 1); | ||
865 | |||
866 | state->m_bPowerDown = false; | 861 | state->m_bPowerDown = false; |
867 | state->m_currentPowerMode = DRX_POWER_DOWN; | 862 | state->m_currentPowerMode = DRX_POWER_DOWN; |
868 | 863 | ||
@@ -5819,9 +5814,10 @@ error: | |||
5819 | 5814 | ||
5820 | static int SwitchAntennaToQAM(struct drxk_state *state) | 5815 | static int SwitchAntennaToQAM(struct drxk_state *state) |
5821 | { | 5816 | { |
5822 | int status = -EINVAL; | 5817 | int status = 0; |
5823 | 5818 | ||
5824 | dprintk(1, "\n"); | 5819 | dprintk(1, "\n"); |
5820 | |||
5825 | if (state->m_AntennaSwitchDVBTDVBC != 0) { | 5821 | if (state->m_AntennaSwitchDVBTDVBC != 0) { |
5826 | if (state->m_GPIO != state->m_AntennaDVBC) { | 5822 | if (state->m_GPIO != state->m_AntennaDVBC) { |
5827 | state->m_GPIO = state->m_AntennaDVBC; | 5823 | state->m_GPIO = state->m_AntennaDVBC; |
@@ -5835,7 +5831,7 @@ static int SwitchAntennaToQAM(struct drxk_state *state) | |||
5835 | 5831 | ||
5836 | static int SwitchAntennaToDVBT(struct drxk_state *state) | 5832 | static int SwitchAntennaToDVBT(struct drxk_state *state) |
5837 | { | 5833 | { |
5838 | int status = -EINVAL; | 5834 | int status = 0; |
5839 | 5835 | ||
5840 | dprintk(1, "\n"); | 5836 | dprintk(1, "\n"); |
5841 | if (state->m_AntennaSwitchDVBTDVBC != 0) { | 5837 | if (state->m_AntennaSwitchDVBTDVBC != 0) { |
@@ -6344,6 +6340,9 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config, | |||
6344 | state->single_master = config->single_master; | 6340 | state->single_master = config->single_master; |
6345 | state->microcode_name = config->microcode_name; | 6341 | state->microcode_name = config->microcode_name; |
6346 | state->no_i2c_bridge = config->no_i2c_bridge; | 6342 | state->no_i2c_bridge = config->no_i2c_bridge; |
6343 | state->m_AntennaSwitchDVBTDVBC = config->antenna_uses_gpio; | ||
6344 | state->m_AntennaDVBC = config->antenna_dvbc; | ||
6345 | state->m_AntennaDVBT = config->antenna_dvbt; | ||
6347 | 6346 | ||
6348 | mutex_init(&state->mutex); | 6347 | mutex_init(&state->mutex); |
6349 | mutex_init(&state->ctlock); | 6348 | mutex_init(&state->ctlock); |