Lines Matching +full:phase +full:- +full:locked

1 // SPDX-License-Identifier: GPL-2.0-or-later
29 const struct tda8261_config *config = state->config; in tda8261_read()
31 struct i2c_msg msg = { .addr = config->addr, .flags = I2C_M_RD,.buf = buf, .len = 1 }; in tda8261_read()
33 if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) in tda8261_read()
41 const struct tda8261_config *config = state->config; in tda8261_write()
43 struct i2c_msg msg = { .addr = config->addr, .flags = 0, .buf = buf, .len = 4 }; in tda8261_write()
45 if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) in tda8261_write()
53 struct tda8261_state *state = fe->tuner_priv; in tda8261_get_status()
64 pr_debug("%s: Tuner Phase Locked\n", __func__); in tda8261_get_status()
76 struct tda8261_state *state = fe->tuner_priv; in tda8261_get_frequency()
78 *frequency = state->frequency; in tda8261_get_frequency()
85 struct dtv_frontend_properties *c = &fe->dtv_property_cache; in tda8261_set_params()
86 struct tda8261_state *state = fe->tuner_priv; in tda8261_set_params()
87 const struct tda8261_config *config = state->config; in tda8261_set_params()
94 * Max VCO Frequency = VCO frequency + (channel spacing - 1) in tda8261_set_params()
97 frequency = c->frequency; in tda8261_set_params()
101 return -EINVAL; in tda8261_set_params()
103 N = (frequency + (div_tab[config->step_size] - 1)) / div_tab[config->step_size]; in tda8261_set_params()
105 __func__, config->step_size, div_tab[config->step_size], N, N); in tda8261_set_params()
109 buf[2] = (0x01 << 7) | ((ref_div[config->step_size] & 0x07) << 1); in tda8261_set_params()
125 pr_debug("%s: Waiting to Phase LOCK\n", __func__); in tda8261_set_params()
133 pr_debug("%s: Tuner Phase locked: status=%d\n", __func__, in tda8261_set_params()
135 state->frequency = frequency; /* cache successful state */ in tda8261_set_params()
137 pr_debug("%s: No Phase lock: status=%d\n", __func__, status); in tda8261_set_params()
145 struct tda8261_state *state = fe->tuner_priv; in tda8261_release()
147 fe->tuner_priv = NULL; in tda8261_release()
174 state->config = config; in tda8261_attach()
175 state->i2c = i2c; in tda8261_attach()
176 state->fe = fe; in tda8261_attach()
177 fe->tuner_priv = state; in tda8261_attach()
178 fe->ops.tuner_ops = tda8261_ops; in tda8261_attach()
180 fe->ops.tuner_ops.info.frequency_step_hz = div_tab[config->step_size] * kHz; in tda8261_attach()