mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
dlkm: rt9426a fg update rt9426a_read_page_cmd
from richtek. For confirm sending read page cmd successfully. Change-Id: If36e8e29a57eb7b2890a510477e09a80382845e5 Signed-off-by: liuyc20 <liuyc20@lenovo.com> Reviewed-on: https://gerrit.mot.com/2093282 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:
parent
3bb34fb958
commit
aac82dad39
1 changed files with 11 additions and 3 deletions
|
|
@ -203,11 +203,19 @@ static int rt9426a_get_checksum(struct rt9426a_chip *chip)
|
|||
static void rt9426a_read_page_cmd(struct rt9426a_chip *chip, uint8_t page)
|
||||
{
|
||||
uint16_t read_page_cmd = 0x6500;
|
||||
int i, regval, retry_times = 2;
|
||||
|
||||
read_page_cmd += page;
|
||||
rt9426a_reg_write_word(chip->i2c, RT9426A_REG_BDCNTL, read_page_cmd);
|
||||
rt9426a_reg_write_word(chip->i2c, RT9426A_REG_BDCNTL, read_page_cmd);
|
||||
mdelay(5);
|
||||
|
||||
/* confirm sending read page cmd successfully ; 2021-10-12 */
|
||||
for (i = 0; i < retry_times; i++) {
|
||||
rt9426a_reg_write_word(chip->i2c, RT9426A_REG_BDCNTL, read_page_cmd);
|
||||
rt9426a_reg_write_word(chip->i2c, RT9426A_REG_BDCNTL, read_page_cmd);
|
||||
mdelay(5);
|
||||
regval = rt9426a_reg_read_word(chip->i2c, RT9426A_REG_SWINDOW1);
|
||||
if (regval != 0xFFFF)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void rt9426a_write_page_cmd(struct rt9426a_chip *chip, uint8_t page)
|
||||
|
|
|
|||
Loading…
Reference in a new issue