diff options
author | Antti Palosaari <crope@iki.fi> | 2014-08-09 12:39:16 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-21 16:24:31 -0400 |
commit | 9e0a976ed60345d53e8d421cb0a39202ce8487fe (patch) | |
tree | f2fe6c429a381d7b8295dee12ec4db80f769d90f | |
parent | 66f6319936344279466bd09f9788e888e03c99a0 (diff) |
[media] it913x: fix IT9135 AX sleep
Old IT9135 AX needs a little bit different register settings for
sleep than newer IT9135 BX. This has been broken always, as power
management of the whole driver, but it started to be problem as I
fixed clock. Earlier clock was disabled very first on sleep and
rest of the commands were skipped by the chip as no clock, leaving
tuner full power state. When I fixed clocks these PM bugs started
raising out as I/O errors.
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>
-rw-r--r-- | drivers/media/tuners/tuner_it913x.c | 6 | ||||
-rw-r--r-- | drivers/media/tuners/tuner_it913x_priv.h | 11 |
2 files changed, 16 insertions, 1 deletions
diff --git a/drivers/media/tuners/tuner_it913x.c b/drivers/media/tuners/tuner_it913x.c index cd20c5b0f07e..281d8c5cc0a9 100644 --- a/drivers/media/tuners/tuner_it913x.c +++ b/drivers/media/tuners/tuner_it913x.c | |||
@@ -371,7 +371,11 @@ static int it9137_set_params(struct dvb_frontend *fe) | |||
371 | static int it913x_sleep(struct dvb_frontend *fe) | 371 | static int it913x_sleep(struct dvb_frontend *fe) |
372 | { | 372 | { |
373 | struct it913x_state *state = fe->tuner_priv; | 373 | struct it913x_state *state = fe->tuner_priv; |
374 | return it913x_script_loader(state, it9137_tuner_off); | 374 | |
375 | if (state->chip_ver == 0x01) | ||
376 | return it913x_script_loader(state, it9135ax_tuner_off); | ||
377 | else | ||
378 | return it913x_script_loader(state, it9137_tuner_off); | ||
375 | } | 379 | } |
376 | 380 | ||
377 | static int it913x_release(struct dvb_frontend *fe) | 381 | static int it913x_release(struct dvb_frontend *fe) |
diff --git a/drivers/media/tuners/tuner_it913x_priv.h b/drivers/media/tuners/tuner_it913x_priv.h index 8e85a61ea5f9..cc6f4b1e45aa 100644 --- a/drivers/media/tuners/tuner_it913x_priv.h +++ b/drivers/media/tuners/tuner_it913x_priv.h | |||
@@ -36,6 +36,17 @@ struct it913xset { u32 pro; | |||
36 | u8 count; | 36 | u8 count; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | /* Tuner setting scripts for IT9135 AX */ | ||
40 | static struct it913xset it9135ax_tuner_off[] = { | ||
41 | {PRO_DMOD, 0xec40, {0x00}, 0x01}, /* Power Down Tuner */ | ||
42 | {PRO_DMOD, 0xec02, {0x3f}, 0x01}, | ||
43 | {PRO_DMOD, 0xec03, {0x1f}, 0x01}, | ||
44 | {PRO_DMOD, 0xec04, {0x3f}, 0x01}, | ||
45 | {PRO_DMOD, 0xec05, {0x3f}, 0x01}, | ||
46 | {PRO_DMOD, 0xec3f, {0x01}, 0x01}, | ||
47 | {0xff, 0x0000, {0x00}, 0x00}, /* Terminating Entry */ | ||
48 | }; | ||
49 | |||
39 | /* Tuner setting scripts (still keeping it9137) */ | 50 | /* Tuner setting scripts (still keeping it9137) */ |
40 | static struct it913xset it9137_tuner_off[] = { | 51 | static struct it913xset it9137_tuner_off[] = { |
41 | {PRO_DMOD, 0xec40, {0x00}, 0x01}, /* Power Down Tuner */ | 52 | {PRO_DMOD, 0xec40, {0x00}, 0x01}, /* Power Down Tuner */ |