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]); }
int omap_device_disable_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_disable_wakeup(oh); /* XXX pass along return value here? */ return 0; }
static int usbhs_runtime_resume(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_resume\n"); if (!pdata) { dev_dbg(dev, "missing platform_data\n"); return -ENODEV; } omap_tll_enable(); if (omap->ehci_logic_fck && !IS_ERR(omap->ehci_logic_fck)) clk_enable(omap->ehci_logic_fck); if (is_ehci_tll_mode(pdata->port_mode[0]) || is_ehci_hsic_mode(pdata->port_mode[0])) clk_enable(omap->usbhost_p1_fck); if (is_ehci_tll_mode(pdata->port_mode[1]) || is_ehci_hsic_mode(pdata->port_mode[1])) clk_enable(omap->usbhost_p2_fck); if (is_ehci_tll_mode(pdata->port_mode[2]) || is_ehci_hsic_mode(pdata->port_mode[2])) clk_enable(omap->usbhost_p3_fck); if (is_ehci_hsic_mode(pdata->port_mode[0])) { clk_enable(omap->usb_host_hs_hsic60m_p1_clk); clk_enable(omap->usb_host_hs_hsic480m_p1_clk); } if (is_ehci_hsic_mode(pdata->port_mode[1])) { clk_enable(omap->usb_host_hs_hsic60m_p2_clk); clk_enable(omap->usb_host_hs_hsic480m_p2_clk); } if (is_ehci_hsic_mode(pdata->port_mode[2])) { clk_enable(omap->usb_host_hs_hsic60m_p3_clk); clk_enable(omap->usb_host_hs_hsic480m_p3_clk); } clk_enable(omap->utmi_p1_fck); clk_enable(omap->utmi_p2_fck); omap_hwmod_disable_wakeup(od->hwmods[0]); return 0; }