power: supply: qti_battery_charger: Update IDT FW version offset
IDT FW version offset has been changed in IDT9415 and above. Update the offset value accordingly. Change-Id: Ic8b8c0d3af4c6587e85f1f87bcdf9ac2ea806eae Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
This commit is contained in:
parent
ac5dcd590f
commit
896166096d
@ -1506,6 +1506,8 @@ static int wireless_fw_check_for_update(struct battery_chg_dev *bcdev,
|
||||
return battery_chg_write(bcdev, &req_msg, sizeof(req_msg));
|
||||
}
|
||||
|
||||
#define IDT9415_FW_MAJOR_VER_OFFSET 0x84
|
||||
#define IDT9415_FW_MINOR_VER_OFFSET 0x86
|
||||
#define IDT_FW_MAJOR_VER_OFFSET 0x94
|
||||
#define IDT_FW_MINOR_VER_OFFSET 0x96
|
||||
static int wireless_fw_update(struct battery_chg_dev *bcdev, bool force)
|
||||
@ -1563,8 +1565,13 @@ static int wireless_fw_update(struct battery_chg_dev *bcdev, bool force)
|
||||
goto release_fw;
|
||||
}
|
||||
|
||||
maj_ver = le16_to_cpu(*(__le16 *)(fw->data + IDT_FW_MAJOR_VER_OFFSET));
|
||||
min_ver = le16_to_cpu(*(__le16 *)(fw->data + IDT_FW_MINOR_VER_OFFSET));
|
||||
if (strstr(bcdev->wls_fw_name, "9412")) {
|
||||
maj_ver = le16_to_cpu(*(__le16 *)(fw->data + IDT_FW_MAJOR_VER_OFFSET));
|
||||
min_ver = le16_to_cpu(*(__le16 *)(fw->data + IDT_FW_MINOR_VER_OFFSET));
|
||||
} else {
|
||||
maj_ver = le16_to_cpu(*(__le16 *)(fw->data + IDT9415_FW_MAJOR_VER_OFFSET));
|
||||
min_ver = le16_to_cpu(*(__le16 *)(fw->data + IDT9415_FW_MINOR_VER_OFFSET));
|
||||
}
|
||||
version = maj_ver << 16 | min_ver;
|
||||
|
||||
if (force)
|
||||
|
Loading…
Reference in New Issue
Block a user