static NvS32 akm8975_early_suspend(struct platform_device *pdev, pm_message_t state) { AKMFUNC("akm8975_early_suspend"); atomic_set(&suspend_flag, 1); atomic_set(&reserve_open_flag, atomic_read(&open_flag)); atomic_set(&open_flag, 0); wake_up(&open_wq); /* 20100817 Daniel */ //ifndef disable_irq //disable_irq(this_client->irq); //#endif NvOdmEcompasspioInterruptMask(ecompass_dev->hOdmEcom); /* Daniel 20101122 <<< */ AKMDBG("suspended with flag=%d", atomic_read(&reserve_open_flag)); return 0; }
static void GpioInterruptHandler(void *arg) { NvU32 pinValue; NvOdmEcompassHandle hDevice = (NvOdmEcompassHandle)arg; NvOdmGpioGetState(hDevice->hGpioINT, hDevice->hPinINT, &pinValue); if (pinValue == 1) { NvOdmEcompasspioInterruptMask(hDevice); /* Daniel 20101122 <<< */ NvOdmOsSemaphoreSignal(hDevice->SemaphoreForINT); } NvOdmGpioInterruptDone(hDevice->hGpioInterrupt); return; }