bool loop_through:1;
u8 clk_out:2;
u8 clk_out_div:5;
+ bool dont_poll:1;
u32 frequency_div; /* LO output divider switch frequency */
u32 frequency_khz; /* actual used LO frequency */
#define TS2020_M88TS2020 0
u8 val;
};
+static void ts2020_stat_work(struct work_struct *work);
+
static int ts2020_release(struct dvb_frontend *fe)
{
struct ts2020_priv *priv = fe->tuner_priv;
return ret;
/* stop statistics polling */
- cancel_delayed_work_sync(&priv->stat_work);
+ if (!priv->dont_poll)
+ cancel_delayed_work_sync(&priv->stat_work);
return 0;
}
c->strength.stat[0].scale = FE_SCALE_DECIBEL;
c->strength.stat[0].uvalue = 0;
- /* Start statistics polling */
- schedule_delayed_work(&priv->stat_work, 0);
+ /* Start statistics polling by invoking the work function */
+ ts2020_stat_work(&priv->stat_work.work);
return 0;
}
c->strength.stat[0].scale = FE_SCALE_DECIBEL;
- schedule_delayed_work(&priv->stat_work, msecs_to_jiffies(2000));
+ if (!priv->dont_poll)
+ schedule_delayed_work(&priv->stat_work, msecs_to_jiffies(2000));
return;
err:
dev_dbg(&client->dev, "failed=%d\n", ret);
u16 *_signal_strength)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
+ struct ts2020_priv *priv = fe->tuner_priv;
unsigned strength;
__s64 gain;
+ if (priv->dont_poll)
+ ts2020_stat_work(&priv->stat_work.work);
+
if (c->strength.stat[0].scale == FE_SCALE_NOT_AVAILABLE) {
*_signal_strength = 0;
return 0;
dev->loop_through = pdata->loop_through;
dev->clk_out = pdata->clk_out;
dev->clk_out_div = pdata->clk_out_div;
+ dev->dont_poll = pdata->dont_poll;
dev->frequency_div = pdata->frequency_div;
dev->fe = fe;
dev->get_agc_pwm = pdata->get_agc_pwm;