board: msm7x27a: Handle I2C failures and correct BT debug logs.
1) Handle a corner case, where BT power UP proceeds even if I2C failure
has happened during Bahama version read.
2) Correct debug logs for I2c reg read/write during BT init
Signed-off-by: Rahul Kashyap <rkashyap@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm7x27a.c b/arch/arm/mach-msm/board-msm7x27a.c
index b727475..02563f9 100644
--- a/arch/arm/mach-msm/board-msm7x27a.c
+++ b/arch/arm/mach-msm/board-msm7x27a.c
@@ -558,11 +558,10 @@
u8 offset = 0; /* index into bahama configs */
on = on ? 1 : 0;
version = marimba_read_bahama_ver(&config);
-
- if (version == BAHAMA_VER_UNSUPPORTED) {
- dev_err(&msm_bt_power_device.dev,
- "%s: unsupported version\n",
- __func__);
+ if ((int)version < 0 || version == BAHAMA_VER_UNSUPPORTED) {
+ dev_err(&msm_bt_power_device.dev, "%s: Bahama \
+ version read Error, version = %d \n",
+ __func__, version);
return -EIO;
}
@@ -589,7 +588,7 @@
__func__, (p+i)->reg, rc);
return rc;
}
- dev_info(&msm_bt_power_device.dev,
+ dev_dbg(&msm_bt_power_device.dev,
"%s: reg 0x%02x write value 0x%02x mask 0x%02x\n",
__func__, (p+i)->reg,
value, (p+i)->mask);
@@ -600,7 +599,7 @@
if (rc < 0)
dev_err(&msm_bt_power_device.dev, "%s marimba_read_bit_mask- error",
__func__);
- dev_info(&msm_bt_power_device.dev,
+ dev_dbg(&msm_bt_power_device.dev,
"%s: reg 0x%02x read value 0x%02x mask 0x%02x\n",
__func__, (p+i)->reg,
value, (p+i)->mask);