Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MichaelDT

macrumors regular
Original poster
Aug 18, 2012
204
234
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:
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

xGdY82h.png



Any ideas what I'm doing wrong?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.