Simple Peripheral bus I2C Driver Power managment issue

Hello All,

I a facing issue wit D0Exit of my driver not getting called when putting system into sleep.
Configuration:
I have written a I2C Controller Driver[software only], and customers have connected a touch pad to it.
In this scenario, what i see if each time i keep finger on touch pad, i see call for D0Entry called and as soon as i remove my hand from touch pad i see D0Exit Getting called.

But when i can putting system in Sleep/S3, i see that the D0Exit is not getting called.
because of which system is not entering sleep.

Initially I didnot register for D0Entry and D0Exit to OS, in that case also i saw same behavior “system not entering S3”. So to debug further i added code for D0Entry and D0Exit and return success from there. That is the time when i found D0Exit of driver not getting called.

So any idea on this ? and how to fix this issue.

regards,
Jagdish Hadimani

Is your ‘software-only’ driver PnP (root-enumerated) or legacy?
If legacy, maybe consider registering for \Callback\PowerState

https://msdn.microsoft.com/en-us/library/windows/hardware/ff564933(v=vs.85).aspx

– pa

xxxxx@gmail.com wrote:

I a facing issue wit D0Exit of my driver not getting called when putting system into sleep.
Configuration:
I have written a I2C Controller Driver[software only], and customers have connected a touch pad to it.
In this scenario, what i see if each time i keep finger on touch pad, i see call for D0Entry called and as soon as i remove my hand from touch pad i see D0Exit Getting called.

But when i can putting system in Sleep/S3, i see that the D0Exit is not getting called.
because of which system is not entering sleep.

If the system had already called D0Exit when you took your finger off,
then there is no need to call it again. Remember, D0Exit doesn’t mean
the system is being placed in a lower power state. It means your DEVICE
is being placed in a lower power state. Device Manager can show you
your current state. Are you in D3 when things are idle?

Are you calling WdfDeviceSetPowerCapabilities? What are the settings?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks for all the reply. Found the issue with my code…Thanks a lot