Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Battery charge controller interface to SOC

parvathiparvathi Member Posts: 4

Hi All,

I have a requirement of interfacing a battery fuel gauge and battery controller via I2C to SoC. i.e there are no embedded controller in between( no smart battery). So ,as per my current understanding, I will have to use ACPI "Control Method Battery Interface" for the same. i.e edit the ACPI table DSDT to add battery related methods. Is this flow correct? Will chaging the ASL code and adding battery related control methods pass all the required information to cmbatt.sys(miniport driver). Do I need to write a mini port driver for this ? Kindly help me out as I am a beginner with windows development. Please do suggest if any alternative solutions are available.



  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,204

    This is not a particularly good place for a beginner. The ACPI interfaces are not well-documented, the ACPI driver interface is practically not documented at all, and there's very little helpful expertise available.

    However, in theory, if you follow the guidelines and build your ACPI DSDT methods properly, then it should just plug and play, as you suggest. Have you looked at the DSDT for other laptops to see how they have exposed things?

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • parvathiparvathi Member Posts: 4

    Thank you for your response. I am yet to look at DSDT for laptop. I agree that this is a huge task, but I wanted to know if this strategy is correct. i.e.
    1. If I am creating DSDT methods properly, can I reuse cmbatt.sys as it is , without writing another mini port driver or any other driver for windows?
    2. I need to map I2C lines and GPIO interrupt for handling ACPI methods and ACPI events. Is my understanding correct?
    3. Is there any other alternative solution that can be tried, which is easier than editing DSDT in ACPI?

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,583

    I’m sorry to say, your question is well beyond the areas of my experience. Your OEM is going to have to find somebody at MSFT to guide you in terms of how best to integrate Windows with your platform. I have not even seen the code, for example, that does this work in (the former) Windows Mobile.

    Now... having said that: If you don’t want to tightly integrate your solution with the OS... your job is simple. In that case, your battery is just another i2c connected peripheral... which folLows the SPB device model. You could write a very simple driver (based on the SpbTest sample in the WDK). Or... If you’re using Windows IOT Core, then you could just talk to the device from a C# program. Quite easily done.


    Peter Viscarola

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE