tvpll
tvpll_tune_dtv(struct tvpll *tvpll,
if((rv = tvpll_algo(tvpll, b, params, &fr)) != 0)
iic_acquire_bus(tvpll->tag, 0);
rv = iic_exec(tvpll->tag, I2C_OP_WRITE_WITH_STOP, tvpll->addr, ab, 2, NULL, 0, 0);
rv = iic_exec(tvpll->tag, I2C_OP_WRITE_WITH_STOP, tvpll->addr, b, 4, NULL, 0, 0);
iic_release_bus(tvpll->tag, 0);
tvpll->frequency = fr;
MODULE(MODULE_CLASS_DRIVER, tvpll, "i2cexec");
static uint32_t tvpll_algo(struct tvpll *, uint8_t *,
struct tvpll *
struct tvpll *tvpll;
tvpll = kmem_alloc(sizeof(struct tvpll), KM_SLEEP);
tvpll->tag = t;
tvpll->addr = a;
tvpll->pll = p;
if (tvpll->pll->initdata) {
iic_acquire_bus(tvpll->tag, 0);
(void)iic_exec(tvpll->tag, I2C_OP_WRITE_WITH_STOP, tvpll->addr,
&tvpll->pll->initdata[1], tvpll->pll->initdata[0],
iic_release_bus(tvpll->tag, 0);
device_printf(parent, "tvpll: %s\n", tvpll->pll->name);
return tvpll;
tvpll_close(struct tvpll *tvpll)
kmem_free(tvpll, sizeof(*tvpll));
tvpll_algo(struct tvpll *tvpll, uint8_t *b,
pll = tvpll->pll;
struct tvpll * tvpll_open(device_t, i2c_tag_t, i2c_addr_t, struct tvpll_data *);
void tvpll_close(struct tvpll *);
int tvpll_tune_dtv(struct tvpll *, const struct dvb_frontend_parameters *);
int tvpll_get_status(struct tvpll *);