Lines Matching defs:base
82 struct stv_base *base;
134 struct i2c_adapter *adap = state->base->i2c;
136 struct i2c_msg msg = {.addr = state->base->adr, .flags = 0,
141 state->base->adr, reg, val);
166 return i2c_read_regs16(state->base->i2c, state->base->adr,
172 return i2c_read_regs16(state->base->i2c, state->base->adr,
181 mutex_lock(&state->base->reg_lock);
185 mutex_unlock(&state->base->reg_lock);
493 symbol_rate = (u32)(((u64)symbol_rate * state->base->mclk) >> 32);
796 u32 quartz = state->base->extclk / 1000000;
850 state->base->mclk = fvco / (2 * odf) * 1000000;
1049 symb = muldiv32(p->symbol_rate, 65536, state->base->mclk);
1101 freq = (freq << 16) / (state->base->mclk / 1000);
1129 u8 freq = ((state->base->mclk + 11000 * 32) / (22000 * 32));
1239 mutex_lock(&state->base->i2c_lock);
1248 if (!WARN_ON(!mutex_is_locked(&state->base->i2c_lock)))
1249 mutex_unlock(&state->base->i2c_lock);
1250 dev_err(&state->base->i2c->dev,
1259 if (!WARN_ON(!mutex_is_locked(&state->base->i2c_lock)))
1260 mutex_unlock(&state->base->i2c_lock);
1268 state->base->count--;
1269 if (state->base->count == 0) {
1270 list_del(&state->base->stvlist);
1271 kfree(state->base);
1772 struct stv_base *base;
1791 base = match_base(i2c, cfg->adr);
1792 if (base) {
1793 base->count++;
1794 state->base = base;
1796 base = kzalloc(sizeof(*base), GFP_KERNEL);
1797 if (!base)
1799 base->i2c = i2c;
1800 base->adr = cfg->adr;
1801 base->count = 1;
1802 base->extclk = cfg->clk ? cfg->clk : 30000000;
1804 mutex_init(&base->i2c_lock);
1805 mutex_init(&base->reg_lock);
1806 state->base = base;
1810 kfree(base);
1813 list_add(&base->stvlist, &stvlist);