Tool/software:
Our customer tried to read 0x0002 firmware version from the gauge, they're using the existing driver from e2e forum but get an read error.
Is there any idea about this? thanks.
fg_write_word(bq, bq->regs[BQ_FG_REG_MBA], 0x0200), succeed,
fg_mac_read_block:Failed to send firmware version subcommand:-5
the driver they're using:
int ret;
u8 buf[36];
ret = fg_write_word(bq, bq->regs[BQ_FG_REG_MBA], FG_MAC_CMD_FW_VER);
if (ret < 0) {
bq_err("Failed to send firmware version subcommand:%d\n", ret);
return ret;
}
mdelay(2);
ret = fg_mac_read_block(bq, bq->regs[BQ_FG_REG_MBA], buf, 11);
if (ret < 0) {
bq_err("Failed to read firmware version:%d\n", ret);
return ret;
}