From 59348a7dc7ea4f90e0b05567bc91b0acb78cdce3 Mon Sep 17 00:00:00 2001 From: "Igor M. Liplianin" Date: Sun, 19 Jul 2009 17:37:09 -0300 Subject: [PATCH] --- yaml --- r: 161465 b: refs/heads/master c: 92782bb00387585e2a4249f6996da3c863c1f580 h: refs/heads/master i: 161463: e586a47d3d867d6e191f36187755220cbe012f3e v: v3 --- [refs] | 2 +- trunk/drivers/media/dvb/frontends/stv6110.c | 10 ++++++++++ trunk/drivers/media/dvb/frontends/stv6110.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 0d5e7c92def4..b6f399519e5a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 25ea66e2696066a12274119ceec084963427e75b +refs/heads/master: 92782bb00387585e2a4249f6996da3c863c1f580 diff --git a/trunk/drivers/media/dvb/frontends/stv6110.c b/trunk/drivers/media/dvb/frontends/stv6110.c index 70efac869d28..5aabb782e311 100644 --- a/trunk/drivers/media/dvb/frontends/stv6110.c +++ b/trunk/drivers/media/dvb/frontends/stv6110.c @@ -36,6 +36,7 @@ struct stv6110_priv { struct i2c_adapter *i2c; u32 mclk; + u8 clk_div; u8 regs[8]; }; @@ -221,6 +222,10 @@ static int stv6110_init(struct dvb_frontend *fe) priv->regs[RSTV6110_CTRL1] |= ((((priv->mclk / 1000000) - 16) & 0x1f) << 3); + /* divisor value for the output clock */ + priv->regs[RSTV6110_CTRL2] &= ~0xc0; + priv->regs[RSTV6110_CTRL2] |= (priv->clk_div << 6); + stv6110_write_regs(fe, &priv->regs[RSTV6110_CTRL1], RSTV6110_CTRL1, 8); msleep(1); stv6110_set_bandwidth(fe, 72000000); @@ -418,6 +423,10 @@ struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe, }; int ret; + /* divisor value for the output clock */ + reg0[2] &= ~0xc0; + reg0[2] |= (config->clk_div << 6); + if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); @@ -436,6 +445,7 @@ struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe, priv->i2c_address = config->i2c_address; priv->i2c = i2c; priv->mclk = config->mclk; + priv->clk_div = config->clk_div; memcpy(&priv->regs, ®0[1], 8); diff --git a/trunk/drivers/media/dvb/frontends/stv6110.h b/trunk/drivers/media/dvb/frontends/stv6110.h index 1c0314d6aa55..2574e1fba9d7 100644 --- a/trunk/drivers/media/dvb/frontends/stv6110.h +++ b/trunk/drivers/media/dvb/frontends/stv6110.h @@ -42,6 +42,7 @@ struct stv6110_config { u8 i2c_address; u32 mclk; int iq_wiring; + u8 clk_div; /* divisor value for the output clock */ }; #if defined(CONFIG_DVB_STV6110) || (defined(CONFIG_DVB_STV6110_MODULE) \