Other Parts Discussed in Thread: BQ27000, BQ27541-G1
Tool/software: Linux
Hi,
We are using HDQ to communicate with BQ27545-G1. For a requirement, I have to enter from sealed to unsealed mode through the driver code.
I tried the following code to do the same:
w1_bq27000_write(dev, 0x00, BQ27545_CONTROL_HI);
/* Read the status to check if the battery is sealed */
read = bq27x00_read(di, BQ27545_CONTROL_HI, false);
printk("%s: BQ27545_CONTROL_HI 0x%x\n", __func__, read);
/* Unseal access to battery */
if (read & BQ27545_CONTROL_STATUS_SS) {
printk("1. Unseal the battery\n");
w1_bq27000_write(dev, 0x04, BQ27545_CONTROL_LO);
w1_bq27000_write(dev, 0x14, BQ27545_CONTROL_HI);
w1_bq27000_write(dev, 0x36, BQ27545_CONTROL_LO);
w1_bq27000_write(dev, 0x72, BQ27545_CONTROL_HI);
}
/* Write which register you want to access */
w1_bq27000_write(dev, 0x00, BQ27545_CONTROL_HI);
/* Read the status to check other flags */
read = bq27x00_read(di, BQ27545_CONTROL_HI, false);
But this code still prints the status as sealed. I have tried different combinations of sending the code to battery guage. But it always shows the state as sealed.
Please help me to know the right way of unsealing the Battery Guage.
Thanks,