This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/BQ25895M: Can BQ25890 linux driver be used with this part?

Part Number: BQ25895M
Other Parts Discussed in Thread: BQ25890, , BQ25895

Tool/software: Linux

Hi.

Will the linux driver for the BQ25890 (drivers/power/bq25890_charger.c) work with the BQ25895M? If not, is there a plan to support the 895?

Thanks,

-Nick

  • Hi Nick,

    Both chargers BQ25895N and BQ25890 are very similar. There is no BQ25895N specific Linux kernel driver. Therefore you can use the bq25890_charger.c driver as it is described at:
    www.ti.com/.../bq25890sw-linux

    BR
    Tsvetolin Shulev
  • Thanks, Tsvetolin! That's just the answer I was hoping for.

    -Nick

  • Well, I finally got around to trying it (using the bq25890 driver with the bq25895 chip), and this was the result:

    bq25890-charger 0-006a: Chip with ID=7, not supported!

    I'm using kernel version 4.4.

    This result seems at odds with the claim that the 890 driver will work with the 895 part. :-(

    -Nick

  • Nick,

    As the BQ25895 is not supported in kernel version 4.4 (which you are using) try to comment Chip ID check or apply to following changes:

    diff --git a/drivers/power/bq25890_charger.c b/drivers/power/bq25890_charger.c
    index f993a55..101b6fd 100644
    --- a/drivers/power/bq25890_charger.c
    +++ b/drivers/power/bq25890_charger.c
    @@ -32,6 +32,7 @@
    #define BQ25890_IRQ_PIN "bq25890_irq"

    #define BQ25890_ID 3
    +#define BQ25895_ID 7

    enum bq25890_fields {
    F_EN_HIZ, F_EN_ILIM, F_IILIM, /* Reg00 */
    @@ -840,7 +841,7 @@ static int bq25890_probe(struct i2c_client *client,
    return bq->chip_id;
    }

    - if (bq->chip_id != BQ25890_ID) {
    + if ((bq->chip_id != BQ25890_ID) && (bq->chip_id != BQ25895_ID)) {
    dev_err(dev, "Chip with ID=%d, not supported!\n", bq->chip_id);
    return -ENODEV;
    }

    BR
    Tsvetolin Shulev