diff options
author | kumarp <pradeep-mmc.kumar@stericsson.com> | 2011-01-25 14:27:41 +0530 |
---|---|---|
committer | Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> | 2011-01-25 14:19:47 +0100 |
commit | a197d12ca9d7acae853a9d05e6c4119edcea7971 (patch) | |
tree | f124cbf1a6ee04b8bff095aefab9cb0f84765fb1 /drivers/media | |
parent | eeef6f5530fdafbc1b9b43c8d0a8e6c52e880539 (diff) |
CG2900 FM radio: Prevent ref clock enabling, sending power-down command.
FM driver now doesn't enable refernce clock and setting of frequency of
ref. clk. while switching on FM in driver. It also prevents sending
power down command while switching off from FM driver.
ST-Ericsson ID: ER 319858
Change-Id: I1f7d1b65db7b9ea82db9676ddb7bc997a663e70f
Change-Id: I28fc25622f6203f7ce4fbf31022eee7dd9268935
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/13261
Reviewed-by: QATOOLS
Reviewed-by: Pradeep KUMAR <pradeep-mmc.kumar@stericsson.com>
Tested-by: Pradeep KUMAR <pradeep-mmc.kumar@stericsson.com>
Reviewed-by: Andreas GUSTAFSSON <andreas.a.gustafsson@stericsson.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/radio/CG2900/cg2900_fm_api.c | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/drivers/media/radio/CG2900/cg2900_fm_api.c b/drivers/media/radio/CG2900/cg2900_fm_api.c index a022e7e02b5..a28b08bd97b 100644 --- a/drivers/media/radio/CG2900/cg2900_fm_api.c +++ b/drivers/media/radio/CG2900/cg2900_fm_api.c @@ -877,29 +877,6 @@ int cg2900_fm_switch_on( goto error; } - /* Enable the Ref Clk */ - FM_DEBUG_REPORT("cg2900_fm_switch_on: " - "Sending fmd_select_ref_clk"); - result = fmd_select_ref_clk(0x0001); - if (0 != result) { - FM_ERR_REPORT("cg2900_fm_switch_on: " - "fmd_select_ref_clk failed %x", - (unsigned int)result); - result = -EINVAL; - goto error; - } - - /* Select the Frequency of Ref Clk (28 MHz) */ - FM_DEBUG_REPORT("cg2900_fm_switch_on: " - "Sending fmd_set_ref_clk_pll"); - result = fmd_set_ref_clk_pll(0x32C8); - if (0 != result) { - FM_ERR_REPORT("cg2900_fm_switch_on: " - "fmd_select_ref_clk_pll failed %x", - (unsigned int)result); - result = -EINVAL; - goto error; - } fm_state = CG2900_FM_STATE_SWITCHED_ON; fm_mode = CG2900_FM_IDLE_MODE; memset(&fm_rds_info, 0, sizeof(struct cg2900_fm_rds_info)); @@ -915,7 +892,7 @@ error: int cg2900_fm_switch_off(void) { - int result; + int result = 0; FM_INFO_REPORT("cg2900_fm_switch_off"); @@ -943,24 +920,14 @@ int cg2900_fm_switch_off(void) } else fm_state = CG2900_FM_STATE_SWITCHED_ON; } - result = fmd_goto_power_down(); - if (0 != result) { + if (fmd_send_fm_ip_disable()) { FM_ERR_REPORT("cg2900_fm_switch_off: " - "fmd_goto_power_down failed = %d", - (unsigned int)result); + "Problem in fmd_send_fm_ip_" + "disable"); result = -EINVAL; goto error; } if (0 == result) { - if (fmd_send_fm_ip_disable()) { - FM_ERR_REPORT("cg2900_fm_switch_off: " - "Problem in fmd_send_fm_ip_" - "disable"); - result = -EINVAL; - goto error; - } - } - if (0 == result) { fm_state = CG2900_FM_STATE_INITIALIZED; fm_mode = CG2900_FM_IDLE_MODE; memset(&fm_rds_info, 0, |