Пример #1
0
static int am335x_phy_runtime_resume(struct device *dev)
{
	struct platform_device	*pdev = to_platform_device(dev);
	struct am335x_phy	*am_phy = platform_get_drvdata(pdev);

	phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, true);
	if (device_may_wakeup(dev))
		phy_ctrl_wkup(am_phy->phy_ctrl, am_phy->id, false);
	return 0;
}
Пример #2
0
static int am335x_phy_resume(struct device *dev)
{
	struct am335x_phy	*am_phy = dev_get_drvdata(dev);

	phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, true);

	if (device_may_wakeup(dev))
		phy_ctrl_wkup(am_phy->phy_ctrl, am_phy->id, false);

	return 0;
}
Пример #3
0
static int am335x_phy_suspend(struct device *dev)
{
	struct am335x_phy *am_phy = dev_get_drvdata(dev);

	/*
	 * Enable phy wakeup only if dev->power.can_wakeup is true.
	 * Make sure to enable wakeup to support remote wakeup	in
	 * standby mode ( same is not supported in OFF(DS0) mode).
	 * Enable it by doing
	 * echo enabled > /sys/bus/platform/devices/<usb-phy-id>/power/wakeup
	 */

	if (device_may_wakeup(dev))
		phy_ctrl_wkup(am_phy->phy_ctrl, am_phy->id, true);

	phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, false);

	return 0;
}