So I've been playing around with my PC laptop and I'm trying to write a driver for an ACPI HID device (buttons). Anyways I get them to initialize, read state etc.. but I'm not receiving interrupt notifications. Of course this driver must act as it's own nub because it is in the ACPI plane. The interrupt specifiers and controllers native to the device show up in its IOService so I figured it would just be a matter of activating to receive them in my work loop? As a test my interruptOccurred method just outputs to IOLog....but hasn't been called as of yet.
This is what I am doing:
Here is a shot of the registry entry
Any ideas what I'm doing wrong?
This is what I am doing:
Code:
(start method)...........
BTNDevice = OSDynamicCast(IOACPIPlatformDevice, provider);
m_pWorkLoop = IOWorkLoop::workLoop();
if(m_pWorkLoop == NULL)
return false;
IOLog("TabletButtons::Workloop started! \n");
IOInterruptEventSource * interruptSource;
interruptSource = IOInterruptEventSource::interruptEventSource( this,
OSMemberFunctionCast(IOInterruptEventAction, this, &TabletButtons::interruptOccurred));;
if (m_pWorkLoop->addEventSource(interruptSource) != kIOReturnSuccess)
return false;
.....(more start method)
Here is a shot of the registry entry
Any ideas what I'm doing wrong?