示例#1
0
static void omap_uart_wakeup_enable(struct platform_device *pdev, bool enable)
{
	struct omap_device *od;

	od = to_omap_device(pdev);
	if (enable)
		omap_hwmod_enable_wakeup(od->hwmods[0]);
	else
		omap_hwmod_disable_wakeup(od->hwmods[0]);
}
示例#2
0
int omap_device_enable_wakeup(struct omap_device *od)
{
	struct omap_hwmod *oh;
	int i;

	for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
		omap_hwmod_enable_wakeup(oh);

	/* XXX pass along return value here? */
	return 0;
}
示例#3
0
static int usbhs_runtime_suspend(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct omap_device *od = to_omap_device(pdev);
	struct usbhs_hcd_omap		*omap = dev_get_drvdata(dev);
	struct usbhs_omap_platform_data	*pdata = &omap->platdata;

	dev_dbg(dev, "usbhs_runtime_suspend\n");

	if (!pdata) {
		dev_dbg(dev, "missing platform_data\n");
		return  -ENODEV;
	}

	omap_hwmod_enable_wakeup(od->hwmods[0]);
	if (is_ehci_tll_mode(pdata->port_mode[0]) ||
			is_ehci_hsic_mode(pdata->port_mode[0]))
		clk_disable(omap->usbhost_p1_fck);

	if (is_ehci_tll_mode(pdata->port_mode[1]) ||
			is_ehci_hsic_mode(pdata->port_mode[1]))
		clk_disable(omap->usbhost_p2_fck);

	if (is_ehci_tll_mode(pdata->port_mode[2]) ||
			is_ehci_hsic_mode(pdata->port_mode[2]))
		clk_disable(omap->usbhost_p3_fck);

	if (is_ehci_hsic_mode(pdata->port_mode[0])) {
		clk_disable(omap->usb_host_hs_hsic60m_p1_clk);
		clk_disable(omap->usb_host_hs_hsic480m_p1_clk);
	}

	if (is_ehci_hsic_mode(pdata->port_mode[1])) {
		clk_disable(omap->usb_host_hs_hsic60m_p2_clk);
		clk_disable(omap->usb_host_hs_hsic480m_p2_clk);
	}

	if (is_ehci_hsic_mode(pdata->port_mode[2])) {
		clk_disable(omap->usb_host_hs_hsic60m_p3_clk);
		clk_disable(omap->usb_host_hs_hsic480m_p3_clk);
	}

	clk_disable(omap->utmi_p2_fck);
	clk_disable(omap->utmi_p1_fck);
	if (omap->ehci_logic_fck && !IS_ERR(omap->ehci_logic_fck))
		clk_disable(omap->ehci_logic_fck);

	omap_tll_disable();

	return 0;
}