diff options
author | Antti Palosaari <crope@iki.fi> | 2013-02-26 18:42:21 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-21 17:57:32 -0400 |
commit | 8c1285a28084b5fa07a7842dd72a561f5c3b913e (patch) | |
tree | 50f954d1a44e7005bcb69778bf3b7379773263c7 | |
parent | ebb0662cee9e6d8f7110c1217a7bd14315fdd148 (diff) |
[media] it913x: merge it913x_fe_suspend() to it913x_fe_sleep()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/tuners/it913x.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/drivers/media/tuners/it913x.c b/drivers/media/tuners/it913x.c index f1938a13eace..6eb3afa32db6 100644 --- a/drivers/media/tuners/it913x.c +++ b/drivers/media/tuners/it913x.c | |||
@@ -401,36 +401,6 @@ static int it9137_set_tuner(struct dvb_frontend *fe) | |||
401 | return (ret < 0) ? -ENODEV : 0; | 401 | return (ret < 0) ? -ENODEV : 0; |
402 | } | 402 | } |
403 | 403 | ||
404 | static int it913x_fe_suspend(struct it913x_fe_state *state) | ||
405 | { | ||
406 | int ret = 0; | ||
407 | return 0; | ||
408 | #if 0 | ||
409 | int ret, i; | ||
410 | u8 b; | ||
411 | |||
412 | ret = it913x_write_reg(state, PRO_DMOD, SUSPEND_FLAG, 0x1); | ||
413 | |||
414 | ret |= it913x_write_reg(state, PRO_DMOD, TRIGGER_OFSM, 0x0); | ||
415 | |||
416 | for (i = 0; i < 128; i++) { | ||
417 | ret = it913x_read_reg(state, SUSPEND_FLAG, &b, 1); | ||
418 | if (ret < 0) | ||
419 | return -ENODEV; | ||
420 | if (b == 0) | ||
421 | break; | ||
422 | |||
423 | } | ||
424 | |||
425 | ret |= it913x_write_reg(state, PRO_DMOD, AFE_MEM0, 0x8); | ||
426 | /* Turn LED off */ | ||
427 | ret |= it913x_write_reg(state, PRO_LINK, GPIOH3_O, 0x0); | ||
428 | #endif | ||
429 | ret |= it913x_fe_script_loader(state, it9137_tuner_off); | ||
430 | |||
431 | return (ret < 0) ? -ENODEV : 0; | ||
432 | } | ||
433 | |||
434 | /* Power sequence */ | 404 | /* Power sequence */ |
435 | /* Power Up Tuner on -> Frontend suspend off -> Tuner clk on */ | 405 | /* Power Up Tuner on -> Frontend suspend off -> Tuner clk on */ |
436 | /* Power Down Frontend suspend on -> Tuner clk off -> Tuner off */ | 406 | /* Power Down Frontend suspend on -> Tuner clk off -> Tuner off */ |
@@ -438,7 +408,7 @@ static int it913x_fe_suspend(struct it913x_fe_state *state) | |||
438 | static int it913x_fe_sleep(struct dvb_frontend *fe) | 408 | static int it913x_fe_sleep(struct dvb_frontend *fe) |
439 | { | 409 | { |
440 | struct it913x_fe_state *state = fe->tuner_priv; | 410 | struct it913x_fe_state *state = fe->tuner_priv; |
441 | return it913x_fe_suspend(state); | 411 | return it913x_fe_script_loader(state, it9137_tuner_off); |
442 | } | 412 | } |
443 | 413 | ||
444 | static int it913x_release(struct dvb_frontend *fe) | 414 | static int it913x_release(struct dvb_frontend *fe) |