Esempio n. 1
0
static bool s3c_cm_suspend_again(void)
{
	bool ret;
	int i = 0;

	if (!is_charger_manager_active())
		return false;

	while (s3c_cm_devices && s3c_cm_devices[i]) {
		pm_generic_resume(s3c_cm_devices[i]);
		i++;
	}

	if (s3c_cm_resume_console)
		resume_console();

	ret = cm_suspend_again();

	if (s3c_cm_resume_console)
		suspend_console();

	while (i > 0) {
		i--;
		pm_generic_suspend(s3c_cm_devices[i]);
	}

	return ret;
}
Esempio n. 2
0
static int spmi_pm_suspend(struct device *dev)
{
	const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;

	if (pm)
		return pm_generic_suspend(dev);
	else
		return spmi_legacy_suspend(dev, PMSG_SUSPEND);
}
Esempio n. 3
0
File: bus.c Progetto: 020gzh/linux
static int mmc_bus_suspend(struct device *dev)
{
	struct mmc_card *card = mmc_dev_to_card(dev);
	struct mmc_host *host = card->host;
	int ret;

	ret = pm_generic_suspend(dev);
	if (ret)
		return ret;

	ret = host->bus_ops->suspend(host);
	return ret;
}
Esempio n. 4
0
/**
 * acpi_subsys_suspend - Run the device driver's suspend callback.
 * @dev: Device to handle.
 *
 * Follow PCI and resume devices suspended at run time before running their
 * system suspend callbacks.
 */
int acpi_subsys_suspend(struct device *dev)
{
	pm_runtime_resume(dev);
	return pm_generic_suspend(dev);
}