diff options
author | Andy Green <andy@openmoko.com> | 2008-11-19 17:11:11 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:11:11 +0000 |
commit | f39594d4998c1b4e7fb4de3a5d5936f5966499a8 (patch) | |
tree | 2b806a8c7f8dcb9f4a5e0b316cafbcc4ef3f0b12 /drivers | |
parent | 105a84e9504f7a35b5b4d2c2560d86937bc4027d (diff) |
fix-remove-resume-dependencies-on-pmu-for-pmu-children.patch
All that stuff should be enforced by device tree now, out with it
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/chips/pcf50633.c | 24 | ||||
-rw-r--r-- | drivers/mfd/glamo/glamo-core.c | 21 | ||||
-rw-r--r-- | drivers/mfd/glamo/glamo-mci.c | 17 | ||||
-rw-r--r-- | drivers/video/display/jbt6k74.c | 9 |
4 files changed, 9 insertions, 62 deletions
diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c index 9ae53ac9949..182fe2f683e 100644 --- a/drivers/i2c/chips/pcf50633.c +++ b/drivers/i2c/chips/pcf50633.c @@ -52,7 +52,7 @@ #include <asm/mach-types.h> #include "pcf50633.h" -#include <linux/resume-dependency.h> +#include <linux/pcf50633.h> #if 1 #define DEBUGP(x, args ...) printk("%s: " x, __FUNCTION__, ## args) @@ -183,9 +183,6 @@ struct pcf50633_data { u_int8_t ldo[PCF50633_REG_HCLDOENA - PCF50633_REG_LDO1OUT + 1]; } standby_regs; - struct resume_dependency resume_dependency; - int is_suspended; - #endif }; @@ -2179,7 +2176,7 @@ static int pcf50633_detect(struct i2c_adapter *adapter, int address, int kind) goto exit_free; } - init_resume_dependency_list(&pcf->resume_dependency); + pcf50633_global = pcf; populate_sysfs_group(pcf); @@ -2401,20 +2398,6 @@ int pcf50633_report_resumers(struct pcf50633_data *pcf, char *buf) #ifdef CONFIG_PM -/* - * we need to export this because pcf50633_data is kept opaque - */ - -void pcf50633_register_resume_dependency(struct pcf50633_data *pcf, - struct resume_dependency *dep) -{ - register_resume_dependency(&pcf->resume_dependency, dep); - if (pcf->is_suspended) - activate_all_resume_dependencies(&pcf->resume_dependency); -} -EXPORT_SYMBOL_GPL(pcf50633_register_resume_dependency); - - static int pcf50633_suspend(struct device *dev, pm_message_t state) { struct i2c_client *client = to_i2c_client(dev); @@ -2641,9 +2624,6 @@ static int pcf50633_resume(struct device *dev) get_device(&pcf->client.dev); pcf50633_work(&pcf->work); - pcf->is_suspended = 0; - callback_all_resume_dependencies(&pcf->resume_dependency); - return 0; } #else diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c index 61b0ef811e4..1d7d235f0da 100644 --- a/drivers/mfd/glamo/glamo-core.c +++ b/drivers/mfd/glamo/glamo-core.c @@ -1143,8 +1143,6 @@ static int __init glamo_probe(struct platform_device *pdev) goto bail_free; } - init_resume_dependency_list(&glamo->resume_dependency); - /* register a number of sibling devices whoise IOMEM resources * are siblings of pdev's IOMEM resource */ #if 0 @@ -1217,10 +1215,6 @@ static int __init glamo_probe(struct platform_device *pdev) glamo->pdata->glamo_mci_use_slow; glamo_mci_def_pdata.glamo_irq_is_wired = glamo->pdata->glamo_irq_is_wired; - glamo_mci_def_pdata.mci_suspending = - glamo->pdata->mci_suspending; - glamo_mci_def_pdata.mci_all_dependencies_resumed = - glamo->pdata->mci_all_dependencies_resumed; /* start creating the siblings */ @@ -1317,19 +1311,6 @@ static int glamo_remove(struct platform_device *pdev) #ifdef CONFIG_PM -/* have to export this because struct glamo_core is opaque */ - -void glamo_register_resume_dependency(struct resume_dependency * - resume_dependency) -{ - register_resume_dependency(&glamo_handle->resume_dependency, - resume_dependency); - if (glamo_handle->is_suspended) - activate_all_resume_dependencies(&glamo_handle->resume_dependency); -} -EXPORT_SYMBOL_GPL(glamo_register_resume_dependency); - - static int glamo_suspend(struct platform_device *pdev, pm_message_t state) { glamo_power(glamo_handle, GLAMO_POWER_SUSPEND); @@ -1341,8 +1322,6 @@ static int glamo_suspend(struct platform_device *pdev, pm_message_t state) static int glamo_resume(struct platform_device *pdev) { glamo_power(glamo_handle, GLAMO_POWER_ON); - glamo_handle->is_suspended = 0; - callback_all_resume_dependencies(&glamo_handle->resume_dependency); return 0; } diff --git a/drivers/mfd/glamo/glamo-mci.c b/drivers/mfd/glamo/glamo-mci.c index 32ace262cac..13175c4a240 100644 --- a/drivers/mfd/glamo/glamo-mci.c +++ b/drivers/mfd/glamo/glamo-mci.c @@ -716,7 +716,7 @@ static void glamo_mci_request(struct mmc_host *mmc, struct mmc_request *mrq) #if 0 static void glamo_mci_reset(struct glamo_mci_host *host) { - dev_dbg(&host->pdev->dev, "******* glamo_mci_reset\n"); + dev_err(&host->pdev->dev, "******* glamo_mci_reset\n"); /* reset MMC controller */ writew(GLAMO_CLOCK_MMC_RESET | GLAMO_CLOCK_MMC_DG_TCLK | GLAMO_CLOCK_MMC_EN_TCLK | GLAMO_CLOCK_MMC_DG_M9CLK | @@ -782,7 +782,7 @@ static void glamo_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) * initialize itself. Doubt any modern cards need it but anyway... */ if (powering) - msleep(1); + mdelay(1); if (!sd_idleclk && !host->force_slow_during_powerup) /* stop the clock to card, because we are idle until transfer */ @@ -929,13 +929,16 @@ static int glamo_mci_probe(struct platform_device *pdev) dev_info(&host->pdev->dev, "probe: mapped mci_base:%p irq:%u.\n", host->base, host->irq); + platform_set_drvdata(pdev, mmc); + + glamo_engine_enable(glamo_mci_def_pdata.pglamo, GLAMO_ENGINE_MMC); + glamo_mci_reset(host); + if ((ret = mmc_add_host(mmc))) { dev_err(&pdev->dev, "failed to add mmc host.\n"); goto probe_free_mem_region_data; } - platform_set_drvdata(pdev, mmc); - dev_info(&pdev->dev,"initialisation done.\n"); return 0; @@ -996,8 +999,6 @@ static int glamo_mci_suspend(struct platform_device *dev, pm_message_t state) sd_idleclk = 1; host->suspending++; - if (host->pdata->mci_all_dependencies_resumed) - (host->pdata->mci_suspending)(dev); ret = mmc_suspend_host(mmc, state); @@ -1013,10 +1014,6 @@ int glamo_mci_resume(struct platform_device *dev) struct glamo_mci_host *host = mmc_priv(mmc); int ret; - if (host->pdata->mci_all_dependencies_resumed) - if (!(host->pdata->mci_all_dependencies_resumed)(dev)) - return 0; - host->suspending--; ret = mmc_resume_host(mmc); diff --git a/drivers/video/display/jbt6k74.c b/drivers/video/display/jbt6k74.c index 9570543fc3d..807d6b538f7 100644 --- a/drivers/video/display/jbt6k74.c +++ b/drivers/video/display/jbt6k74.c @@ -674,11 +674,6 @@ static int __devexit jbt_remove(struct spi_device *spi) static int jbt_suspend(struct spi_device *spi, pm_message_t state) { struct jbt_info *jbt = dev_get_drvdata(&spi->dev); - struct jbt6k74_platform_data *jbt6k74_pdata = spi->dev.platform_data; - - /* platform can register resume dependencies here, if any */ - if (jbt6k74_pdata->suspending) - (jbt6k74_pdata->suspending)(0, spi); /* Save mode for resume */ jbt->last_state = jbt->state; @@ -697,10 +692,6 @@ int jbt6k74_resume(struct spi_device *spi) struct jbt_info *jbt = dev_get_drvdata(&spi->dev); struct jbt6k74_platform_data *jbt6k74_pdata = spi->dev.platform_data; - if (jbt6k74_pdata->all_dependencies_resumed) - if (!(jbt6k74_pdata->all_dependencies_resumed)(0)) - return 0; - /* we can get called twice with all dependencies resumed if our core * resume callback is last of all. Protect against doing anything twice */ |