#endif
}
-static void contexthub_resume(struct device *dev)
+static int contexthub_resume(struct device *dev)
{
struct contexthub_ipc_info *ipc = dev_get_drvdata(dev);
#ifdef CONFIG_CHRE_SENSORHUB_HAL
int ret;
if (atomic_read(&ipc->chub_status) != CHUB_ST_RUN)
- return;
+ return 0;
dev_info(dev, "nanohub log to kernel on\n");
ipc_hw_write_shared_reg(AP, AP_WAKE, SR_3);
#ifdef CONFIG_CHRE_SENSORHUB_HAL
ret = nanohub_resume(data->iio_dev);
#endif
- return;
+ return 0;
}
//static SIMPLE_DEV_PM_OPS(contexthub_pm_ops, contexthub_suspend, contexthub_resume);
static const struct dev_pm_ops contexthub_pm_ops = {
- .prepare = contexthub_suspend,
- .complete = contexthub_resume,
+ .suspend = contexthub_suspend,
+ .resume = contexthub_resume,
};
static const struct of_device_id contexthub_ipc_match[] = {
dev_info(sensor_dev,
"%s: request_wakeup_timeout: ret=%d, err_cnt:%d\n",
__func__, ret, data->kthread_err_cnt);
-#ifdef CONFIG_NANOHUB_MAILBOX
- data->kthread_err_cnt++;
- if (data->kthread_err_cnt >= KTHREAD_WARN_CNT) {
- dev_err(sensor_dev,
- "%s: kthread_err_cnt=%d\n",
- __func__,
- data->kthread_err_cnt);
- nanohub_set_state(data, ST_ERROR);
- }
-#endif
continue;
}