[media] af9033: provide dyn0_clk clock source
authorAntti Palosaari <crope@iki.fi>
Sat, 9 Aug 2014 02:56:49 +0000 (23:56 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sun, 21 Sep 2014 20:03:45 +0000 (17:03 -0300)
AF903x/IT913x demod provides clock source(s). It seems that this
clock source is used for integrated RF tuner of IT913x. It is
enabled by default, but firmware disables it automatically when
suspend is requested (suspend_flag (0x004c) + trigger_ofsm
(0x0000)). Automatic disable behavior seems to be similar for both
AF903x and IT913x I tested, though there is no likely any real
clock user in a case of AF903x.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/dvb-frontends/af9033.c
drivers/media/dvb-frontends/af9033.h

index 5c90ea683a7e732d3431c8973e43b4ffea649c55..2a4dfd2f9679f0726ba09cd83cd81233b2797bbb 100644 (file)
@@ -314,14 +314,8 @@ static int af9033_init(struct dvb_frontend *fe)
                        goto err;
        }
 
-       /* feed clock to RF tuner */
-       switch (state->cfg.tuner) {
-       case AF9033_TUNER_IT9135_38:
-       case AF9033_TUNER_IT9135_51:
-       case AF9033_TUNER_IT9135_52:
-       case AF9033_TUNER_IT9135_60:
-       case AF9033_TUNER_IT9135_61:
-       case AF9033_TUNER_IT9135_62:
+       /* clock output */
+       if (state->cfg.dyn0_clk) {
                ret = af9033_wr_reg(state, 0x80fba8, 0x00);
                if (ret < 0)
                        goto err;
index 539f4db678b87f0076093f8f85b9139e182dc31d..b95a6d438ecafe275b401fdd3b6efd32535f42c8 100644 (file)
@@ -75,6 +75,11 @@ struct af9033_config {
         * input spectrum inversion
         */
        bool spec_inv;
+
+       /*
+        *
+        */
+       bool dyn0_clk;
 };