2snd Fuelgauge SM5602 current direct set and coefficient

2Snd Fuelgauge SM5602 current direct set and
coefficient need multiply 1000

Change-Id: I6e72dab8a7bc6d68f045908171f2a6656dcaa5c4
Signed-off-by: huaqin85 <huaqin85@motorola.com>
Reviewed-on: https://gerrit.mot.com/2167032
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
huaqin85 2022-01-11 15:58:07 +08:00
commit a0c5ae4cec

View file

@ -46,6 +46,7 @@
#define RET_ERR -1
#define queue_delayed_work_time 8000//8000
#define queue_start_work_time 50
#define SM_CUR_UNIT 1000
enum sm_fg_reg_idx {
SM_FG_REG_DEVICE_ID = 0,
@ -615,6 +616,8 @@ static int fg_read_current(struct sm_fg_chip *sm)
if (data & 0x8000)
curr *= -1;
}
curr *= SM_CUR_UNIT * (-1);
pr_err("curr = %d,data=%d\n",curr,data);
return curr;