return 0; err_phy: while (--i >= 0) { phy_power_off(dra7xx->phy[i]); phy_exit(dra7xx->phy[i]); } return ret; } #endif static const struct dev_pm_ops dra7xx_pcie_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(dra7xx_pcie_suspend, dra7xx_pcie_resume) SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(dra7xx_pcie_suspend_noirq, dra7xx_pcie_resume_noirq) }; static const struct of_device_id of_dra7xx_pcie_match[] = { { .compatible = "ti,dra7-pcie", }, {}, }; MODULE_DEVICE_TABLE(of, of_dra7xx_pcie_match); static struct platform_driver dra7xx_pcie_driver = { .remove = __exit_p(dra7xx_pcie_remove), .driver = { .name = "dra7-pcie", .of_match_table = of_dra7xx_pcie_match, .pm = &dra7xx_pcie_pm_ops, },
#define _od_resume_noirq NULL #endif struct dev_pm_domain omap_device_fail_pm_domain = { .ops = { SET_RUNTIME_PM_OPS(_od_fail_runtime_suspend, _od_fail_runtime_resume, NULL) } }; struct dev_pm_domain omap_device_pm_domain = { .ops = { SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, NULL) USE_PLATFORM_PM_SLEEP_OPS SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(_od_suspend_noirq, _od_resume_noirq) } }; /** * omap_device_register - register an omap_device with one omap_hwmod * @od: struct omap_device * to register * * Register the omap_device structure. This currently just calls * platform_device_register() on the underlying platform_device. * Returns the return value of platform_device_register(). */ int omap_device_register(struct platform_device *pdev) { pr_debug("omap_device: %s: registering\n", pdev->name);
(L3_DEBUG_ERROR << 3); mask_val = readl_relaxed(mask_regx); mask_val &= ~(flag_mux->mask_dbg_bits); writel_relaxed(mask_val, mask_regx); } /* Dummy read to force OCP barrier */ if (mask_regx) (void)readl(mask_regx); return 0; } static const struct dev_pm_ops l3_dev_pm_ops = { SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(NULL, l3_resume_noirq) }; #define L3_DEV_PM_OPS (&l3_dev_pm_ops) #else #define L3_DEV_PM_OPS NULL #endif static struct platform_driver omap_l3_driver = { .probe = omap_l3_probe, .driver = { .name = "omap_l3_noc", .pm = L3_DEV_PM_OPS, .of_match_table = of_match_ptr(l3_noc_match), }, };
olpc_ec = platform_device_register_resndata(&spi->dev, "olpc-ec", -1, NULL, 0, NULL, 0); /* Enable all EC events while we're awake */ olpc_xo175_ec_set_event_mask(EC_ALL_EVENTS); if (pm_power_off == NULL) pm_power_off = olpc_xo175_ec_power_off; dev_info(&spi->dev, "OLPC XO-1.75 Embedded Controller driver\n"); return 0; } static const struct dev_pm_ops olpc_xo175_ec_pm_ops = { SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(NULL, olpc_xo175_ec_resume_noirq) SET_RUNTIME_PM_OPS(olpc_xo175_ec_suspend, olpc_xo175_ec_resume, NULL) }; static const struct of_device_id olpc_xo175_ec_of_match[] = { { .compatible = "olpc,xo1.75-ec" }, { } }; MODULE_DEVICE_TABLE(of, olpc_xo175_ec_of_match); static struct spi_driver olpc_xo175_ec_spi_driver = { .driver = { .name = "olpc-xo175-ec", .of_match_table = olpc_xo175_ec_of_match, .pm = &olpc_xo175_ec_pm_ops, },
static int madera_resume(struct device *dev) { struct madera *madera = dev_get_drvdata(dev->parent); dev_dbg(madera->irq_dev, "Resume, reenabling IRQ\n"); /* Interrupts can now be handled */ enable_irq(madera->irq); return 0; } #endif static const struct dev_pm_ops madera_irq_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(madera_suspend, madera_resume) SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(madera_suspend_noirq, madera_resume_noirq) }; static int madera_irq_probe(struct platform_device *pdev) { struct madera *madera = dev_get_drvdata(pdev->dev.parent); struct irq_data *irq_data; unsigned int irq_flags = 0; int ret; dev_dbg(&pdev->dev, "probe\n"); /* * Read the flags from the interrupt controller if not specified * by pdata */
int ret; ret = clk_prepare_enable(i2c_dev->clk); if (ret) return ret; sprd_i2c_enable(i2c_dev); return 0; } static const struct dev_pm_ops sprd_i2c_pm_ops = { SET_RUNTIME_PM_OPS(sprd_i2c_runtime_suspend, sprd_i2c_runtime_resume, NULL) SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(sprd_i2c_suspend_noirq, sprd_i2c_resume_noirq) }; static const struct of_device_id sprd_i2c_of_match[] = { { .compatible = "sprd,sc9860-i2c", }, {}, }; static struct platform_driver sprd_i2c_driver = { .probe = sprd_i2c_probe, .remove = sprd_i2c_remove, .driver = { .name = "sprd-i2c", .of_match_table = sprd_i2c_of_match, .pm = &sprd_i2c_pm_ops, },