[plain text]
#ifndef _IOI2CDriveBayMGPIO_H
#define _IOI2CDriveBayMGPIO_H
#include <IOKit/IOService.h>
#include "GPIOParent.h"
class IOI2CDriveBayMGPIO : public IOService
{
OSDeclareDefaultStructors(IOI2CDriveBayMGPIO)
public:
virtual bool init(OSDictionary *dict);
virtual void free(void);
virtual bool start(IOService *provider);
virtual void stop(IOService *provider);
using IOService::callPlatformFunction;
virtual IOReturn callPlatformFunction(
const OSSymbol *functionName,
bool waitForFunction,
void *param1, void *param2,
void *param3, void *param4 );
private:
typedef void (*PCA9554ClientCallback)(IOService *, UInt8, UInt8);
typedef struct
{
PCA9554ClientCallback handler;
IOService *client;
bool isEnabled;
} PCA9554CallbackInfo;
enum
{
kPresent = 3,
kSwitch = 4
};
IOService *fApplePMU;
IOService *fKeyswitch;
bool fC3Mapping;
UInt32 fClientCount;
IOLock *fClientLock;
UInt32 fIntAddrInfo;
UInt8 fIntRegState;
PCA9554CallbackInfo **fClient;
IOReturn registerClient(
UInt32 id,
PCA9554ClientCallback handler,
IOService *client,
bool isRegister);
IOReturn enableClient(
UInt32 id,
bool isEnable);
static void sProcessApplePMUInterrupt(
IOService *client,
UInt8 addressInfo,
UInt32 length,
UInt8 *buffer);
void processApplePMUInterrupt(
UInt8 newState);
};
#endif // _IOI2CPCA9554_H
Generated by GNU enscript 1.6.4.