mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2025-03-01 10:35:23 +00:00
Merge 55e7a91c3e into f84d196a1e
This commit is contained in:
@@ -1195,17 +1195,22 @@ static int gate_ctrl(struct dvb_frontend *fe, int enable)
|
|||||||
struct stv *state = fe->demodulator_priv;
|
struct stv *state = fe->demodulator_priv;
|
||||||
u8 i2crpt = state->i2crpt & ~0x86;
|
u8 i2crpt = state->i2crpt & ~0x86;
|
||||||
|
|
||||||
if (enable)
|
if (enable) {
|
||||||
mutex_lock(&state->base->i2c_lock);
|
mutex_lock(&state->base->i2c_lock);
|
||||||
|
|
||||||
if (enable)
|
|
||||||
i2crpt |= 0x80;
|
i2crpt |= 0x80;
|
||||||
else
|
} else {
|
||||||
i2crpt |= 0x02;
|
i2crpt |= 0x02;
|
||||||
|
}
|
||||||
|
|
||||||
if (write_reg(state, state->nr ? RSTV0910_P2_I2CRPT :
|
if (write_reg(state, state->nr ? RSTV0910_P2_I2CRPT :
|
||||||
RSTV0910_P1_I2CRPT, i2crpt) < 0)
|
RSTV0910_P1_I2CRPT, i2crpt) < 0) {
|
||||||
|
/* don't hold the I2C bus lock on failure */
|
||||||
|
mutex_unlock(&state->base->i2c_lock);
|
||||||
|
dev_err(&state->base->i2c->dev,
|
||||||
|
"%s() write_reg failure (enable=%d)\n",
|
||||||
|
__func__, enable);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
state->i2crpt = i2crpt;
|
state->i2crpt = i2crpt;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user