Commit c65dbf65 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] rtl2832: drop FE i2c gate control support

We don't need it anymore as all users are using muxed I2C adapter.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 164f3d2a
...@@ -309,30 +309,6 @@ static int rtl2832_wr_demod_reg(struct rtl2832_dev *dev, int reg, u32 val) ...@@ -309,30 +309,6 @@ static int rtl2832_wr_demod_reg(struct rtl2832_dev *dev, int reg, u32 val)
} }
static int rtl2832_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
{
struct rtl2832_dev *dev = fe->demodulator_priv;
struct i2c_client *client = dev->client;
int ret;
dev_dbg(&client->dev, "enable=%d\n", enable);
/* gate already open or close */
if (dev->i2c_gate_state == enable)
return 0;
ret = rtl2832_wr_demod_reg(dev, DVBT_IIC_REPEAT, (enable ? 0x1 : 0x0));
if (ret)
goto err;
dev->i2c_gate_state = enable;
return ret;
err:
dev_dbg(&client->dev, "failed=%d\n", ret);
return ret;
}
static int rtl2832_set_if(struct dvb_frontend *fe, u32 if_freq) static int rtl2832_set_if(struct dvb_frontend *fe, u32 if_freq)
{ {
struct rtl2832_dev *dev = fe->demodulator_priv; struct rtl2832_dev *dev = fe->demodulator_priv;
...@@ -932,8 +908,6 @@ static void rtl2832_i2c_gate_work(struct work_struct *work) ...@@ -932,8 +908,6 @@ static void rtl2832_i2c_gate_work(struct work_struct *work)
if (ret) if (ret)
goto err; goto err;
dev->i2c_gate_state = false;
return; return;
err: err:
dev_dbg(&client->dev, "failed=%d\n", ret); dev_dbg(&client->dev, "failed=%d\n", ret);
...@@ -949,9 +923,6 @@ static int rtl2832_select(struct i2c_adapter *adap, void *mux_priv, u32 chan_id) ...@@ -949,9 +923,6 @@ static int rtl2832_select(struct i2c_adapter *adap, void *mux_priv, u32 chan_id)
/* terminate possible gate closing */ /* terminate possible gate closing */
cancel_delayed_work(&dev->i2c_gate_work); cancel_delayed_work(&dev->i2c_gate_work);
if (dev->i2c_gate_state == chan_id)
return 0;
/* /*
* chan_id 1 is muxed adapter demod provides and chan_id 0 is demod * chan_id 1 is muxed adapter demod provides and chan_id 0 is demod
* itself. We need open gate when request is for chan_id 1. On that case * itself. We need open gate when request is for chan_id 1. On that case
...@@ -965,8 +936,6 @@ static int rtl2832_select(struct i2c_adapter *adap, void *mux_priv, u32 chan_id) ...@@ -965,8 +936,6 @@ static int rtl2832_select(struct i2c_adapter *adap, void *mux_priv, u32 chan_id)
if (ret) if (ret)
goto err; goto err;
dev->i2c_gate_state = chan_id;
return 0; return 0;
err: err:
dev_dbg(&client->dev, "failed=%d\n", ret); dev_dbg(&client->dev, "failed=%d\n", ret);
...@@ -1017,8 +986,6 @@ static struct dvb_frontend_ops rtl2832_ops = { ...@@ -1017,8 +986,6 @@ static struct dvb_frontend_ops rtl2832_ops = {
.read_status = rtl2832_read_status, .read_status = rtl2832_read_status,
.read_snr = rtl2832_read_snr, .read_snr = rtl2832_read_snr,
.read_ber = rtl2832_read_ber, .read_ber = rtl2832_read_ber,
.i2c_gate_ctrl = rtl2832_i2c_gate_ctrl,
}; };
/* /*
......
...@@ -39,7 +39,6 @@ struct rtl2832_dev { ...@@ -39,7 +39,6 @@ struct rtl2832_dev {
u64 post_bit_error_prev; /* for old DVBv3 read_ber() calculation */ u64 post_bit_error_prev; /* for old DVBv3 read_ber() calculation */
u64 post_bit_error; u64 post_bit_error;
u64 post_bit_count; u64 post_bit_count;
bool i2c_gate_state;
bool sleeping; bool sleeping;
struct delayed_work i2c_gate_work; struct delayed_work i2c_gate_work;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment