Other Parts Discussed in Thread: BQ25890, , BQ25898
Tool/software: Linux
Hi,
we have a bq25898D that we have connected to a Variscite SD410 devkit board running Linaro 4.4.9. We connected it to our board over an i2c line and verified its presence with i2cdetect. We looked at the drivers available in mainline, and we found bq25890_charger.c. We build it as a .ko and loaded it via insmod, and when we loaded it, we got the following syslog message on the console.
[ 710.815822] bq25890-charger 1-006a: Chip with ID=2, not supported!
The bq25898D has ID 3. After looking through the code of the driver, I could easily remove the if-statement check to allow the probe function to continue, but even then we would still need to modify the driver because of some differences of the registers between the bq25898D and bq25890, namely REG01, REG03, and REG0A. For REG01, we would just want to disable any writes because the bq25898D comes up with the values we need by default. As long as those values don't change, that works for us. The differences w.r.t. REG03 and REG0A vary only slightly and don't matter to us.
My questions:
(1) Does a driver exist written specifically for the bq25898D that runs on kernel 4.4.9 ? If so, how can I get it?
(2) If a driver specifically for the bq25898D does not exist, do I need to know of any land mines or gotchas when modifying the bq25890_charger.c driver to accept a chip with ID=3 and refrain from doing any writes to REG01?
Thanks,
Brian