aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsureshk <sureshkumar.r@stericsson.com>2010-06-21 23:05:05 +0530
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:45:47 -0600
commit024c86b83840d5fd9cf339d6db025191a79dbf2b (patch)
treeced661ed2895d19412a38975d730f75e98f93d6b
parent12b9f0fbb9a060951420fde0d47e2f821f12b915 (diff)
downloadlinux-2.6.34-ux500-024c86b83840d5fd9cf339d6db025191a79dbf2b.tar.gz
cG2900_ FM driver: fix for wrong signal strength value retrival
CG2900_ FM driver: fix for wrong signal strength value retrival CG2900_ FM driver: fix for wrong signal strength value Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/1793 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Johan PALMAEUS <johan.xj.palmaeus@stericsson.com> Reviewed-by: Andreas KARLSSON <andreas.z.karlsson@stericsson.com> Tested-by: Andreas KARLSSON <andreas.z.karlsson@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Change-Id: I6a956244c6802111335fb8889bd586bb19c579e9 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2632
-rwxr-xr-xdrivers/media/radio/CG2900/fmdriver.c8
-rwxr-xr-xdrivers/media/radio/CG2900/stefmapi.c10
2 files changed, 17 insertions, 1 deletions
diff --git a/drivers/media/radio/CG2900/fmdriver.c b/drivers/media/radio/CG2900/fmdriver.c
index 0a58b1f80fb..928ea8affe8 100755
--- a/drivers/media/radio/CG2900/fmdriver.c
+++ b/drivers/media/radio/CG2900/fmdriver.c
@@ -10,6 +10,7 @@
#include <stdarg.h>
#include <string.h>
+#include <linux/time.h>
#include "fmdriver.h"
#include "platformosapi.h"
@@ -3031,8 +3032,13 @@ void fmd_hexdump(char prompt, u8 *arr, int num_bytes)
{
int i;
u8 tmpVal;
+ struct timespec time;
static u8 pkt_write[512], *pkt_ptr;
- sprintf(pkt_write, "\n[%04x] %c", num_bytes, prompt);
+ getnstimeofday(&time);
+ sprintf(pkt_write, "\n[%08x:%08x] [%04x] %c",
+ (unsigned int)time.tv_sec,
+ (unsigned int)time.tv_nsec,
+ num_bytes, prompt);
pkt_ptr = pkt_write + strlen(pkt_write);
if (arr != NULL) {
/* Copy the buffer only if the input buffer is not NULL */
diff --git a/drivers/media/radio/CG2900/stefmapi.c b/drivers/media/radio/CG2900/stefmapi.c
index a0d2b9cb5da..ee0c28704e2 100755
--- a/drivers/media/radio/CG2900/stefmapi.c
+++ b/drivers/media/radio/CG2900/stefmapi.c
@@ -870,6 +870,16 @@ u8 ste_fm_switch_on(struct device *device)
goto error;
}
+ /* Switch Mode To Idle */
+ result = fmd_set_mode(context, FMD_MODE_IDLE);
+ if (FMD_RESULT_SUCCESS != result) {
+ FM_ERR_REPORT("ste_fm_switch_on: "
+ "fmd_set_mode failed %x",
+ (unsigned int)result);
+ result = STE_STATUS_SYSTEM_ERROR;
+ goto error;
+ }
+
/* Enable the Ref Clk */
FM_DEBUG_REPORT("ste_fm_switch_on: "
"Sending fmd_select_ref_clk");