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

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

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

Battery charge controller interface to SOC

parvathiparvathi Member Posts: 5

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,602

    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: 5

    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: 8,048

    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
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Internals & Software Drivers 30 Nov 2020 LIVE ONLINE
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Developing Minifilters Early 2021 LIVE ONLINE