/* new */
dev_dbg(dev, "%s(%p): new\n", __func__, id);
pm_wakeup_event(dev_abox, BOOT_DONE_TIMEOUT_MS);
+ __pm_stay_awake(&data->ws_boot);
abox_request_dram_on(pdev, (void *)BOOT_CPU_GEAR_ID, true);
}
} else {
/* on */
dev_dbg(dev, "%s(%p): on\n", __func__, id);
pm_wakeup_event(dev_abox, BOOT_DONE_TIMEOUT_MS);
+ __pm_stay_awake(&data->ws_boot);
abox_request_dram_on(pdev, (void *)BOOT_CPU_GEAR_ID, true);
} else if ((old_gear < ABOX_CPU_GEAR_MIN) &&
(gear >= ABOX_CPU_GEAR_MIN)) {
abox_restore_data(dev);
abox_request_cpu_gear(dev, data, (void *)DEFAULT_CPU_GEAR_ID,
ABOX_CPU_GEAR_MIN);
+
+ __pm_relax(&data->ws_boot);
+ dev_info(dev, "%s:release wake lock\n", __func__);
}
static void abox_boot_done(struct device *dev, unsigned int version)
abox_failsafe_init(dev);
+ wakeup_source_init(&data->ws_boot, "abox_boot");
ret = device_create_file(dev, &dev_attr_calliope_version);
if (ret < 0)
dev_warn(dev, "Failed to create file: %s\n", "version");
#ifdef EMULATOR
iounmap(pmu_alive);
#endif
+ wakeup_source_trash(&data->ws_boot);
return 0;
}