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.

BQ25883: Linux driver

Part Number: BQ25883

I have seen references to a Linux driver for the BQ25883 but all I can find online is a driver that seems to be for Android, which does not compile for Linux "proper".  We are currently using Yocto Thud with the Linux kernel v4.19.  Is there such a driver available?

  • John,

    Unfortunately the Linux drivers available on the TIbms Github are the only drivers we have available and plan to develop for bq25883. I will pass along the idea of developing drivers for Yocto Thud to the appropriate channels for the future.

    Thanks,

    Ricardo

  • Hello John,

    please check out: github.com/.../bq2588x

    Regards Bernd

  • Hi Bernd,

    Thank you for the reply.  Unfortunately, that is the version I started with.  When I try to build the driver in the Yocto build system (we're currently using thud with the kernel 4.19) I get multiple errors.

    References to enums like POWER_SUPPLY_HEALTH_WARM and POWER_SUPPLY_HEALTH_COOL.

    Calls to undefined functions power_supply_set_online and power_supply_set_present.

    And a call to of_get_regulator_init_data with only two parameters instead of three.

    When I started looking into the errors I got the impression these were features in Android.

    Am I missing something?

    Best regards,

    John

  • John,

    I believe you are correct. POWER_SUPPLY_HEALTH_WARM, POWER_SUPPLY_HEALTH_COOL, power_supply_set_online, and power_supply_set_present come from linux/power_supply.h. It seems this header file is specific to Android.

    Bernd,

    John originally has already been to the repository and his question relates to the driver code in the repository.

    Thanks,

    Ricardo

  • Hi Ricardo,

    Thank you very much for following up.  It isn't the answer I wanted to hear but still the answer is important to me...

    Best regards,

    John

  • Hello John,

    as mentioned offline below link has implementation of those functions

    https://android.googlesource.com/kernel/msm/+/android-msm-3.9-usb-and-mmc-hacks/drivers/power/power_supply_core.c

    The driver was developed for a smart phone platform that’s why it is on Android platform. We do not have driver for LINUX/Yocto 4.19 kernel based platform.

    If a customer is not working on the Android platform, they will need to port the code by themselves. Android is built on Linux distribution, so it’s very normal for the inclusion of Linux header files.That link is just for the purpose of code implementation of power_supply_set_online and power_supply_set_present.

    Regards Bernd