Lines Matching defs:state
51 struct va1j5jf8007t_state *state;
58 state = fe->demodulator_priv;
59 addr = state->config->demod_address;
75 if (i2c_transfer(state->adap, msgs, 2) != 2)
103 struct va1j5jf8007t_state *state;
105 state = fe->demodulator_priv;
107 switch (state->tune_state) {
160 static int va1j5jf8007t_set_frequency(struct va1j5jf8007t_state *state)
167 frequency = state->fe.dtv_property_cache.frequency;
177 msg.addr = state->config->demod_address;
182 if (i2c_transfer(state->adap, &msg, 1) != 1)
189 va1j5jf8007t_check_frequency(struct va1j5jf8007t_state *state, int *lock)
195 addr = state->config->demod_address;
210 if (i2c_transfer(state->adap, msgs, 2) != 2)
217 static int va1j5jf8007t_set_modulation(struct va1j5jf8007t_state *state)
225 msg.addr = state->config->demod_address;
230 if (i2c_transfer(state->adap, &msg, 1) != 1)
236 static int va1j5jf8007t_check_modulation(struct va1j5jf8007t_state *state,
243 addr = state->config->demod_address;
257 if (i2c_transfer(state->adap, msgs, 2) != 2)
271 struct va1j5jf8007t_state *state;
275 state = fe->demodulator_priv;
278 state->tune_state = VA1J5JF8007T_SET_FREQUENCY;
280 switch (state->tune_state) {
287 ret = va1j5jf8007t_set_frequency(state);
291 state->tune_state = VA1J5JF8007T_CHECK_FREQUENCY;
297 ret = va1j5jf8007t_check_frequency(state, &lock);
307 state->tune_state = VA1J5JF8007T_SET_MODULATION;
313 ret = va1j5jf8007t_set_modulation(state);
317 state->tune_state = VA1J5JF8007T_CHECK_MODULATION;
323 ret = va1j5jf8007t_check_modulation(state, &lock, &retry);
329 state->tune_state = VA1J5JF8007T_ABORT;
339 state->tune_state = VA1J5JF8007T_TRACK;
356 static int va1j5jf8007t_init_frequency(struct va1j5jf8007t_state *state)
369 msg.addr = state->config->demod_address;
374 if (i2c_transfer(state->adap, &msg, 1) != 1)
380 static int va1j5jf8007t_set_sleep(struct va1j5jf8007t_state *state, int sleep)
388 msg.addr = state->config->demod_address;
393 if (i2c_transfer(state->adap, &msg, 1) != 1)
401 struct va1j5jf8007t_state *state;
404 state = fe->demodulator_priv;
406 ret = va1j5jf8007t_init_frequency(state);
410 return va1j5jf8007t_set_sleep(state, 1);
415 struct va1j5jf8007t_state *state;
417 state = fe->demodulator_priv;
418 state->tune_state = VA1J5JF8007T_IDLE;
420 return va1j5jf8007t_set_sleep(state, 0);
425 struct va1j5jf8007t_state *state;
426 state = fe->demodulator_priv;
427 kfree(state);
466 struct va1j5jf8007t_state *state;
473 state = fe->demodulator_priv;
475 switch (state->config->frequency) {
488 msg.addr = state->config->demod_address;
495 if (i2c_transfer(state->adap, &msg, 1) != 1)
499 return va1j5jf8007t_init_frequency(state);
506 struct va1j5jf8007t_state *state;
511 state = kzalloc(sizeof(struct va1j5jf8007t_state), GFP_KERNEL);
512 if (!state)
515 state->config = config;
516 state->adap = adap;
518 fe = &state->fe;
520 fe->demodulator_priv = state;
525 msg.addr = state->config->demod_address;
530 if (i2c_transfer(state->adap, &msg, 1) != 1) {
531 kfree(state);