add pm_runtime_last_busy_and_autosuspend() helper
Subsystems (34)
cover add pm_runtime_last_busy_and_autosuspend() helper
This patch series adds a simple macro pm_runtime_last_busy_and_autosuspend() which invokes pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend() sequentially. Then we do a tree wide update of current patterns which are present. As evident from log below this pattern is frequent in the kernel.
This series can be found atgit://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git
topic/pm_runtime_last_busy_and_autosuspend
Fengguang's kbuild has tested it so it shouldn't break things for anyone. Barring one patch (explictyly mentioned in its changelog) rest are simple replacements.
If all are okay, this should be merged thru PM tree as it depends on macro addition.
Subhransu S. Prusty (1):
PM: Add helper pm_runtime_last_busy_and_autosuspend()
Vinod Koul (26):
dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper
extcon: arizona: use pm_runtime_last_busy_and_autosuspend helper drm/i915: use pm_runtime_last_busy_and_autosuspend helper drm/nouveau: use pm_runtime_last_busy_and_autosuspend helper drm/radeon: use pm_runtime_last_busy_and_autosuspend helper
vga_switcheroo: use pm_runtime_last_busy_and_autosuspend helper
i2c: designware: use pm_runtime_last_busy_and_autosuspend helper
i2c: omap: use pm_runtime_last_busy_and_autosuspend helper
i2c: qup: use pm_runtime_last_busy_and_autosuspend helper
mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper
mfd: arizona: use pm_runtime_last_busy_and_autosuspend helper
mei: use pm_runtime_last_busy_and_autosuspend helper
mmc: use pm_runtime_last_busy_and_autosuspend helper
mmc: mmci: use pm_runtime_last_busy_and_autosuspend helper
mmc: omap_hsmmc: use pm_runtime_last_busy_and_autosuspend helper
mmc: sdhci-pxav3: use pm_runtime_last_busy_and_autosuspend helper
mmc: sdhci: use pm_runtime_last_busy_and_autosuspend helper
NFC: trf7970a: use pm_runtime_last_busy_and_autosuspend helper
pm2301-charger: use pm_runtime_last_busy_and_autosuspend helper
spi: omap2-mcspi: use pm_runtime_last_busy_and_autosuspend helper
spi: orion: use pm_runtime_last_busy_and_autosuspend helper
spi: ti-qspi: use pm_runtime_last_busy_and_autosuspend helper
spi: core: use pm_runtime_last_busy_and_autosuspend helper
tty: serial: omap: use pm_runtime_last_busy_and_autosuspend helper
usb: musb: omap2430: use pm_runtime_last_busy_and_autosuspend helper
video: fbdev: use pm_runtime_last_busy_and_autosuspend helper
Documentation/power/runtime_pm.txt | 4 ++ drivers/dma/ste_dma40.c | 30 ++++--------- drivers/extcon/extcon-arizona.c | 6 +-- drivers/gpu/drm/i915/intel_pm.c | 3 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +--- drivers/gpu/drm/radeon/radeon_connectors.c | 15 ++---- drivers/gpu/drm/radeon/radeon_drv.c | 5 +- drivers/gpu/drm/radeon/radeon_kms.c | 6 +-- drivers/gpu/vga/vga_switcheroo.c | 7 +-- drivers/i2c/busses/i2c-designware-core.c | 3 +- drivers/i2c/busses/i2c-omap.c | 6 +-- drivers/i2c/busses/i2c-qup.c | 3 +- drivers/mfd/ab8500-gpadc.c | 6 +-- drivers/mfd/arizona-irq.c | 3 +- drivers/misc/mei/client.c | 12 ++---- drivers/mmc/core/core.c | 3 +- drivers/mmc/host/mmci.c | 12 ++---- drivers/mmc/host/omap_hsmmc.c | 19 ++------- drivers/mmc/host/sdhci-pxav3.c | 6 +-- drivers/mmc/host/sdhci.c | 3 +- drivers/nfc/trf7970a.c | 3 +- drivers/power/pm2301_charger.c | 3 +- drivers/spi/spi-omap2-mcspi.c | 9 +--- drivers/spi/spi-orion.c | 3 +- drivers/spi/spi-ti-qspi.c | 5 +- drivers/spi/spi.c | 6 +-- drivers/tty/serial/omap-serial.c | 60 +++++++++------------------ drivers/usb/musb/omap2430.c | 6 +-- drivers/video/fbdev/auo_k190x.c | 9 +--- include/linux/pm_runtime.h | 6 +++ 31 files changed, 97 insertions(+), 177 deletions(-)
Thanks
Signature · 1 line
~Vinod
PATCH 1/27 PM: Add helper pm_runtime_last_busy_and_autosuspend()
From: Subhransu S. Prusty <[email protected]>
pm_runtime_mark_last_busy and pm_runtime_put_autosuspend are used together in quite a lot of places. Add a helper for these.
Also updated Documentation for this
--- Documentation/power/runtime_pm.txt | 4 ++++ include/linux/pm_runtime.h | 6 ++++++ 2 files changed, 10 insertions(+), 0 deletions(-)
Documentation/power/runtime_pm.txt +4 -0
@@ -490,6 +490,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: power.use_autosuspend isn't set, otherwise returns the expiration time in jiffies + int pm_runtime_last_busy_and_autosuspend(struct device *dev); + - invoke pm_runtime_mark_last_busy(dev) and then run + pm_runtime_put_autosuspend(dev) and return its result + It is safe to execute the following helper functions from interrupt context: pm_request_idle()
include/linux/pm_runtime.h +6 -0
@@ -277,4 +277,10 @@ static inline void pm_runtime_dont_use_autosuspend(struct device *dev) __pm_runtime_use_autosuspend(dev, false); } +static inline int pm_runtime_last_busy_and_autosuspend (struct device *dev) +{ +pm_runtime_mark_last_busy (dev); +return pm_runtime_put_autosuspend (dev); +} +#endif
Signature · 1 line
1.7.0.4
PATCH 2/27 dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/dma/ste_dma40.c | 30 ++++++++++-------------------- 1 files changed, 10 insertions(+), 20 deletions(-)
drivers/dma/ste_dma40.c +10 -20
@@ -1442,8 +1442,7 @@ static int d40_pause(struct d40_chan *d40c) res =d40_channel_execute_command (d40c,D40_DMA_SUSPEND_REQ ); -pm_runtime_mark_last_busy (d40c->base->dev); -pm_runtime_put_autosuspend (d40c->base->dev); +pm_runtime_last_busy_and_autosuspend (d40c->base->dev);spin_unlock_irqrestore (&d40c->lock, flags);return res; }
@@ -1463,8 +1462,7 @@ static int d40_resume(struct d40_chan *d40c)if (d40_residue (d40c) ||d40_tx_is_linked (d40c)) res =d40_channel_execute_command (d40c,D40_DMA_RUN ); -pm_runtime_mark_last_busy (d40c->base->dev); -pm_runtime_put_autosuspend (d40c->base->dev); +pm_runtime_last_busy_and_autosuspend (d40c->base->dev);spin_unlock_irqrestore (&d40c->lock, flags);return res; }
@@ -1565,8 +1563,7 @@ static void dma_tc_handle(struct d40_chan *d40c)if (d40_queue_start (d40c) ==NULL ) { d40c->busy = false; -pm_runtime_mark_last_busy (d40c->base->dev); -pm_runtime_put_autosuspend (d40c->base->dev); +pm_runtime_last_busy_and_autosuspend (d40c->base->dev); }d40_desc_remove (d40d);
@@ -2045,18 +2042,15 @@ static int d40_free_dma(struct d40_chan *d40c)else d40c->base->lookup_phy_chans[phy->num] =NULL ; -if (d40c->busy) { -pm_runtime_mark_last_busy (d40c->base->dev); -pm_runtime_put_autosuspend (d40c->base->dev); - } +if (d40c->busy) +pm_runtime_last_busy_and_autosuspend (d40c->base->dev); d40c->busy = false; d40c->phy_chan =NULL ; d40c->configured = false; out: -pm_runtime_mark_last_busy (d40c->base->dev); -pm_runtime_put_autosuspend (d40c->base->dev); +pm_runtime_last_busy_and_autosuspend (d40c->base->dev);return res; }
@@ -2457,8 +2451,7 @@ static int d40_alloc_chan_resources(struct dma_chan *chan)if (is_free_phy)d40_config_write (d40c); fail: -pm_runtime_mark_last_busy (d40c->base->dev); -pm_runtime_put_autosuspend (d40c->base->dev); +pm_runtime_last_busy_and_autosuspend (d40c->base->dev);spin_unlock_irqrestore (&d40c->lock, flags);return err; }
@@ -2618,12 +2611,9 @@ static void d40_terminate_all(struct dma_chan *chan)chan_err (d40c,"Failed to stop channel\n" );d40_term_all (d40c); -pm_runtime_mark_last_busy (d40c->base->dev); -pm_runtime_put_autosuspend (d40c->base->dev); -if (d40c->busy) { -pm_runtime_mark_last_busy (d40c->base->dev); -pm_runtime_put_autosuspend (d40c->base->dev); - } +pm_runtime_last_busy_and_autosuspend (d40c->base->dev); +if (d40c->busy) +pm_runtime_last_busy_and_autosuspend (d40c->base->dev); d40c->busy = false;spin_unlock_irqrestore (&d40c->lock, flags);
Signature · 1 line
1.7.0.4
PATCH 4/27 drm/i915: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/gpu/drm/i915/intel_pm.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +1 -2
@@ -6729,8 +6729,7 @@ void intel_runtime_pm_put(struct drm_i915_private *dev_priv)if (!HAS_RUNTIME_PM (dev))return ; -pm_runtime_mark_last_busy (device); -pm_runtime_put_autosuspend (device); +pm_runtime_last_busy_and_autosuspend (device); }void intel_init_runtime_pm (struct drm_i915_private *dev_priv)
Signature · 1 line
1.7.0.4
PATCH 5/27 drm/nouveau: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +-- drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-)
drivers/gpu/drm/nouveau/nouveau_connector.c +1 -2
@@ -323,8 +323,7 @@ detect_analog: out: -pm_runtime_mark_last_busy (connector->dev->dev); -pm_runtime_put_autosuspend (connector->dev->dev); +pm_runtime_last_busy_and_autosuspend (connector->dev->dev);return conn_status; }
drivers/gpu/drm/nouveau/nouveau_drm.c +3 -6
@@ -766,8 +766,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)mutex_unlock (&drm->client.mutex); out_suspend: -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); +pm_runtime_last_busy_and_autosuspend (dev->dev);return ret; }
@@ -794,8 +793,7 @@ nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) {struct nouveau_cli *cli =nouveau_cli (fpriv);nouveau_cli_destroy (cli); -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); +pm_runtime_last_busy_and_autosuspend (dev->dev); } static const struct drm_ioctl_desc
@@ -834,8 +832,7 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)break ; } -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); +pm_runtime_last_busy_and_autosuspend (dev->dev);return ret; }
Signature · 1 line
1.7.0.4
PATCH 6/27 drm/radeon: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/gpu/drm/radeon/radeon_connectors.c | 15 +++++---------- drivers/gpu/drm/radeon/radeon_drv.c | 5 ++--- drivers/gpu/drm/radeon/radeon_kms.c | 6 ++---- 3 files changed, 9 insertions(+), 17 deletions(-)
drivers/gpu/drm/radeon/radeon_connectors.c +5 -10
@@ -852,8 +852,7 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)/* check acpi lid status ??? */ radeon_connector_update_scratch_regs (connector, ret); -pm_runtime_mark_last_busy (connector->dev->dev); -pm_runtime_put_autosuspend (connector->dev->dev); +pm_runtime_last_busy_and_autosuspend (connector->dev->dev);return ret; }
@@ -1025,8 +1024,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force)radeon_connector_update_scratch_regs (connector, ret); out: -pm_runtime_mark_last_busy (connector->dev->dev); -pm_runtime_put_autosuspend (connector->dev->dev); +pm_runtime_last_busy_and_autosuspend (connector->dev->dev);return ret; }
@@ -1103,8 +1101,7 @@ radeon_tv_detect(struct drm_connector *connector, bool force)if (ret == connector_status_connected) ret =radeon_connector_analog_encoder_conflict_solve (connector, encoder, ret, false);radeon_connector_update_scratch_regs (connector, ret); -pm_runtime_mark_last_busy (connector->dev->dev); -pm_runtime_put_autosuspend (connector->dev->dev); +pm_runtime_last_busy_and_autosuspend (connector->dev->dev);return ret; }
@@ -1321,8 +1318,7 @@ out:radeon_connector_update_scratch_regs (connector, ret); exit: -pm_runtime_mark_last_busy (connector->dev->dev); -pm_runtime_put_autosuspend (connector->dev->dev); +pm_runtime_last_busy_and_autosuspend (connector->dev->dev);return ret; }
@@ -1638,8 +1634,7 @@ radeon_dp_detect(struct drm_connector *connector, bool force)radeon_connector_update_scratch_regs (connector, ret); out: -pm_runtime_mark_last_busy (connector->dev->dev); -pm_runtime_put_autosuspend (connector->dev->dev); +pm_runtime_last_busy_and_autosuspend (connector->dev->dev);return ret; }
drivers/gpu/drm/radeon/radeon_drv.c +2 -3
@@ -503,9 +503,8 @@ long radeon_drm_ioctl(struct file *filp,return ret; ret =drm_ioctl (filp, cmd, arg); - -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); + +pm_runtime_last_busy_and_autosuspend (dev->dev);return ret; }
drivers/gpu/drm/radeon/radeon_kms.c +2 -4
@@ -147,8 +147,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)pm_runtime_set_autosuspend_delay (dev->dev,5000 );pm_runtime_set_active (dev->dev);pm_runtime_allow (dev->dev); -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); +pm_runtime_last_busy_and_autosuspend (dev->dev); } out:
@@ -632,8 +631,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) file_priv->driver_priv = fpriv; } -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); +pm_runtime_last_busy_and_autosuspend (dev->dev);return 0 ; }
Signature · 1 line
1.7.0.4
PATCH 7/27 vga_switcheroo: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/gpu/vga/vga_switcheroo.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/vga/vga_switcheroo.c +3 -4
@@ -682,10 +682,9 @@ static int vga_switcheroo_runtime_resume_hdmi_audio(struct device *dev) ret = dev->bus->pm->runtime_resume (dev);/* put the reference for the gpu */ -if (found) { -pm_runtime_mark_last_busy (&found->pdev->dev); -pm_runtime_put_autosuspend (&found->pdev->dev); - } +if (found) +pm_runtime_last_busy_and_autosuspend (&found->pdev->dev); +return ret; }
Signature · 1 line
1.7.0.4
PATCH 8/27 i2c: designware: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/i2c/busses/i2c-designware-core.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-designware-core.c +1 -2
@@ -676,8 +676,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) ret = -EIO ; done: -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); +pm_runtime_last_busy_and_autosuspend (dev->dev);mutex_unlock (&dev->lock);return ret;
Signature · 1 line
1.7.0.4
PATCH 9/27 i2c: omap: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/i2c/busses/i2c-omap.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/i2c/busses/i2c-omap.c +2 -4
@@ -661,8 +661,7 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) dev->set_mpu_wkup_lat (dev->dev,-1 ); out: -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); +pm_runtime_last_busy_and_autosuspend (dev->dev);return r; }
@@ -1253,8 +1252,7 @@ omap_i2c_probe(struct platform_device *pdev)dev_info (dev->dev,"bus %d rev%d.%d at %d kHz\n" , adap->nr, major, minor, dev->speed); -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); +pm_runtime_last_busy_and_autosuspend (dev->dev);return 0 ;
Signature · 1 line
1.7.0.4
PATCH 10/27 i2c: qup: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/i2c/busses/i2c-qup.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-qup.c +1 -2
@@ -518,8 +518,7 @@ static int qup_i2c_xfer(struct i2c_adapter *adap, ret = num; out: -pm_runtime_mark_last_busy (qup->dev); -pm_runtime_put_autosuspend (qup->dev); +pm_runtime_last_busy_and_autosuspend (qup->dev);return ret; }
Signature · 1 line
1.7.0.4
PATCH 11/27 mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/mfd/ab8500-gpadc.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/mfd/ab8500-gpadc.c +2 -4
@@ -571,8 +571,7 @@ int ab8500_gpadc_double_read_raw(struct ab8500_gpadc *gpadc, u8 channel, }/* Disable VTVout LDO this is required for GPADC */ -pm_runtime_mark_last_busy (gpadc->dev); -pm_runtime_put_autosuspend (gpadc->dev); +pm_runtime_last_busy_and_autosuspend (gpadc->dev);mutex_unlock (&gpadc->ab8500_gpadc_lock);
@@ -910,8 +909,7 @@ static int ab8500_gpadc_resume(struct device *dev)if (ret)dev_err (dev,"Failed to enable vtvout LDO: %d\n" , ret); -pm_runtime_mark_last_busy (gpadc->dev); -pm_runtime_put_autosuspend (gpadc->dev); +pm_runtime_last_busy_and_autosuspend (gpadc->dev);mutex_unlock (&gpadc->ab8500_gpadc_lock);return ret;
Signature · 1 line
1.7.0.4
PATCH 14/27 mmc: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/mmc/core/core.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/mmc/core/core.c +1 -2
@@ -954,8 +954,7 @@ EXPORT_SYMBOL(mmc_get_card);void mmc_put_card (struct mmc_card *card) {mmc_release_host (card->host); -pm_runtime_mark_last_busy (&card->dev); -pm_runtime_put_autosuspend (&card->dev); +pm_runtime_last_busy_and_autosuspend (&card->dev); }EXPORT_SYMBOL (mmc_put_card);
Signature · 1 line
1.7.0.4
PATCH 15/27 mmc: mmci: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/mmc/host/mmci.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-)
drivers/mmc/host/mmci.c +4 -8
@@ -223,8 +223,7 @@ static int mmci_card_busy(struct mmc_host *mmc) busy =1 ;spin_unlock_irqrestore (&host->lock, flags); -pm_runtime_mark_last_busy (mmc_dev (mmc)); -pm_runtime_put_autosuspend (mmc_dev (mmc)); +pm_runtime_last_busy_and_autosuspend (mmc_dev (mmc));return busy; }
@@ -372,8 +371,7 @@ mmci_request_end(struct mmci_host *host, struct mmc_request *mrq)mmc_request_done (host->mmc, mrq); -pm_runtime_mark_last_busy (mmc_dev (host->mmc)); -pm_runtime_put_autosuspend (mmc_dev (host->mmc)); +pm_runtime_last_busy_and_autosuspend (mmc_dev (host->mmc)); }static void mmci_set_mask1 (struct mmci_host *host,unsigned int mask)
@@ -1397,8 +1395,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)spin_unlock_irqrestore (&host->lock, flags); -pm_runtime_mark_last_busy (mmc_dev (mmc)); -pm_runtime_put_autosuspend (mmc_dev (mmc)); +pm_runtime_last_busy_and_autosuspend (mmc_dev (mmc)); }static int mmci_get_cd (struct mmc_host *mmc)
@@ -1442,8 +1439,7 @@ static int mmci_sig_volt_switch(struct mmc_host *mmc, struct mmc_ios *ios)if (ret)dev_warn (mmc_dev (mmc),"Voltage switch failed\n" ); -pm_runtime_mark_last_busy (mmc_dev (mmc)); -pm_runtime_put_autosuspend (mmc_dev (mmc)); +pm_runtime_last_busy_and_autosuspend (mmc_dev (mmc)); }return ret;
Signature · 1 line
1.7.0.4
PATCH 16/27 mmc: omap_hsmmc: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
This patch also changes return value from macro rather than 0 always!
--- drivers/mmc/host/omap_hsmmc.c | 19 ++++--------------- 1 files changed, 4 insertions(+), 15 deletions(-)
drivers/mmc/host/omap_hsmmc.c +4 -15
@@ -1823,10 +1823,7 @@ static int omap_hsmmc_disable_fclk(struct mmc_host *mmc) {struct omap_hsmmc_host *host =mmc_priv (mmc); -pm_runtime_mark_last_busy (host->dev); -pm_runtime_put_autosuspend (host->dev); - -return 0 ; +return pm_runtime_last_busy_and_autosuspend (host->dev); }static const struct mmc_host_ops omap_hsmmc_ops = {
@@ -1877,10 +1874,7 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data)seq_printf (s,"CAPA:\t\t0x%08x\n" ,OMAP_HSMMC_READ (host->base,CAPA )); -pm_runtime_mark_last_busy (host->dev); -pm_runtime_put_autosuspend (host->dev); - -return 0 ; +return pm_runtime_last_busy_and_autosuspend (host->dev); }static int omap_hsmmc_regs_open (struct inode *inode,struct file *file)
@@ -2258,10 +2252,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev) }omap_hsmmc_debugfs (mmc); -pm_runtime_mark_last_busy (host->dev); -pm_runtime_put_autosuspend (host->dev); - -return 0 ; +return pm_runtime_last_busy_and_autosuspend (host->dev); err_slot_name:mmc_remove_host (mmc);
@@ -2386,9 +2377,7 @@ static int omap_hsmmc_resume(struct device *dev) !(host->mmc->pm_flags & MMC_PM_WAKE_SDIO_IRQ))enable_irq (host->wake_irq); -pm_runtime_mark_last_busy (host->dev); -pm_runtime_put_autosuspend (host->dev); - return 0; + return pm_runtime_last_busy_and_autosuspend(host->dev); }#else
Signature · 1 line
1.7.0.4
PATCH 17/27 mmc: sdhci-pxav3: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/mmc/host/sdhci-pxav3.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-pxav3.c +2 -4
@@ -417,8 +417,7 @@ static int sdhci_pxav3_suspend(struct device *dev)pm_runtime_get_sync (dev); ret =sdhci_suspend_host (host); -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev); +pm_runtime_last_busy_and_autosuspend (dev);return ret; }
@@ -430,8 +429,7 @@ static int sdhci_pxav3_resume(struct device *dev)pm_runtime_get_sync (dev); ret =sdhci_resume_host (host); -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev); +pm_runtime_last_busy_and_autosuspend (dev);return ret; }
Signature · 1 line
1.7.0.4
PATCH 18/27 mmc: sdhci: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/mmc/host/sdhci.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci.c +1 -2
@@ -2623,8 +2623,7 @@ static int sdhci_runtime_pm_get(struct sdhci_host *host)static int sdhci_runtime_pm_put (struct sdhci_host *host) { -pm_runtime_mark_last_busy (host->mmc->parent); -return pm_runtime_put_autosuspend (host->mmc->parent); +return pm_runtime_last_busy_and_autosuspend (host->mmc->parent); }static void sdhci_runtime_pm_bus_on (struct sdhci_host *host)
Signature · 1 line
1.7.0.4
PATCH 20/27 pm2301-charger: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/power/pm2301_charger.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/power/pm2301_charger.c +1 -2
@@ -499,8 +499,7 @@ static irqreturn_t pm2xxx_irq_int(int irq, void *data) } }while (gpio_get_value (pm2->pdata->gpio_irq_number) ==0 ); -pm_runtime_mark_last_busy (pm2->dev); -pm_runtime_put_autosuspend (pm2->dev); +pm_runtime_last_busy_and_autosuspend (pm2->dev);return IRQ_HANDLED ; }
Signature · 1 line
1.7.0.4
PATCH 21/27 spi: omap2-mcspi: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/spi/spi-omap2-mcspi.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
drivers/spi/spi-omap2-mcspi.c +3 -6
@@ -1020,8 +1020,7 @@ static int omap2_mcspi_setup(struct spi_device *spi)return ret; ret =omap2_mcspi_setup_transfer (spi,NULL ); -pm_runtime_mark_last_busy (mcspi->dev); -pm_runtime_put_autosuspend (mcspi->dev); +pm_runtime_last_busy_and_autosuspend (mcspi->dev);return ret; }
@@ -1282,8 +1281,7 @@ static int omap2_mcspi_master_setup(struct omap2_mcspi *mcspi) ctx->wakeupenable =OMAP2_MCSPI_WAKEUPENABLE_WKEN ;omap2_mcspi_set_master_mode (master); -pm_runtime_mark_last_busy (mcspi->dev); -pm_runtime_put_autosuspend (mcspi->dev); +pm_runtime_last_busy_and_autosuspend (mcspi->dev);return 0 ; }
@@ -1504,8 +1502,7 @@ static int omap2_mcspi_resume(struct device *dev) writel_relaxed(cs->chconf0, cs->base + OMAP2_MCSPI_CHCONF0); } } -pm_runtime_mark_last_busy (mcspi->dev); -pm_runtime_put_autosuspend (mcspi->dev); +pm_runtime_last_busy_and_autosuspend (mcspi->dev);return 0 ; }#else
Signature · 6 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 22/27 spi: orion: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/spi/spi-orion.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/spi/spi-orion.c +1 -2
@@ -408,8 +408,7 @@ static int orion_spi_probe(struct platform_device *pdev)if (status <0 ) goto out_rel_pm; -pm_runtime_mark_last_busy (&pdev->dev); -pm_runtime_put_autosuspend (&pdev->dev); +pm_runtime_last_busy_and_autosuspend (&pdev->dev); master->dev.of_node = pdev->dev.of_node; status =spi_register_master (master);
Signature · 1 line
1.7.0.4
PATCH 23/27 spi: ti-qspi: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/spi/spi-ti-qspi.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/spi/spi-ti-qspi.c +2 -3
@@ -182,10 +182,9 @@ static int ti_qspi_setup(struct spi_device *spi)ti_qspi_write (qspi, clk_mask,QSPI_SPI_CLOCK_CNTRL_REG ); ctx_reg->clkctrl = clk_mask; -pm_runtime_mark_last_busy (qspi->dev); - ret =pm_runtime_put_autosuspend (qspi->dev); +pm_runtime_last_busy_and_autosuspend (qspi->dev);if (ret <0 ) { -dev_err (qspi->dev,"pm_runtime_put_autosuspend() failed\n" ); +dev_err (qspi->dev,"pm_runtime_last_busy_and_autosuspend() failed\n" );return ret; }
Signature · 1 line
1.7.0.4
PATCH 24/27 spi: core: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/spi/spi.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/spi/spi.c +2 -4
@@ -893,10 +893,8 @@ static void spi_pump_messages(struct kthread_work *work) master->unprepare_transfer_hardware(master))dev_err (&master->dev,"failed to unprepare transfer hardware\n" ); -if (master->auto_runtime_pm) { -pm_runtime_mark_last_busy (master->dev.parent); -pm_runtime_put_autosuspend (master->dev.parent); - } +if (master->auto_runtime_pm) +pm_runtime_last_busy_and_autosuspend (master->dev.parent);trace_spi_master_idle (master);return ; }
Signature · 1 line
1.7.0.4
PATCH 25/27 tty: serial: omap: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/tty/serial/omap-serial.c | 60 ++++++++++++------------------------- 1 files changed, 20 insertions(+), 40 deletions(-)
drivers/tty/serial/omap-serial.c +20 -40
@@ -290,8 +290,7 @@ static void serial_omap_enable_ms(struct uart_port *port)pm_runtime_get_sync (up->dev); up->ier |=UART_IER_MSI ;serial_out (up,UART_IER , up->ier); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); }static void serial_omap_stop_tx (struct uart_port *port)
@@ -352,8 +351,7 @@ static void serial_omap_stop_tx(struct uart_port *port)serial_out (up,UART_IER , up->ier); } -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); }static void serial_omap_stop_rx (struct uart_port *port)
@@ -364,8 +362,7 @@ static void serial_omap_stop_rx(struct uart_port *port) up->ier &= ~(UART_IER_RLSI |UART_IER_RDI ); up->port.read_status_mask &= ~UART_LSR_DR ;serial_out (up,UART_IER , up->ier); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); }static void transmit_chars (struct uart_omap_port *up,unsigned int lsr)
@@ -434,8 +431,7 @@ static void serial_omap_start_tx(struct uart_port *port)serial_omap_stop_rx (port);serial_omap_enable_ier_thri (up); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); }static void serial_omap_throttle (struct uart_port *port)
@@ -448,8 +444,7 @@ static void serial_omap_throttle(struct uart_port *port) up->ier &= ~(UART_IER_RLSI |UART_IER_RDI );serial_out (up,UART_IER , up->ier);spin_unlock_irqrestore (&up->port.lock, flags); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); }static void serial_omap_unthrottle (struct uart_port *port)
@@ -462,8 +457,7 @@ static void serial_omap_unthrottle(struct uart_port *port) up->ier |=UART_IER_RLSI |UART_IER_RDI ;serial_out (up,UART_IER , up->ier);spin_unlock_irqrestore (&up->port.lock, flags); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); }static unsigned int check_modem_status (struct uart_omap_port *up)
@@ -616,8 +610,7 @@ static irqreturn_t serial_omap_irq(int irq, void *dev_id)tty_flip_buffer_push (&up->port.state->port); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); up->port_activity = jiffies;return ret;
@@ -634,8 +627,7 @@ static unsigned int serial_omap_tx_empty(struct uart_port *port)spin_lock_irqsave (&up->port.lock, flags); ret =serial_in (up,UART_LSR ) &UART_LSR_TEMT ?TIOCSER_TEMT :0 ;spin_unlock_irqrestore (&up->port.lock, flags); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev);return ret; }
@@ -647,8 +639,7 @@ static unsigned int serial_omap_get_mctrl(struct uart_port *port)pm_runtime_get_sync (up->dev); status =check_modem_status (up); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev);dev_dbg (up->port.dev,"serial_omap_get_mctrl+%d\n" , up->port.line);
@@ -686,8 +677,7 @@ static void serial_omap_set_mctrl(struct uart_port *port, unsigned int mctrl) UART_MCR_DTR | UART_MCR_RTS); up->mcr = old_mcr | mcr;serial_out (up,UART_MCR , up->mcr); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); }static void serial_omap_break_ctl (struct uart_port *port,int break_state)
@@ -704,8 +694,7 @@ static void serial_omap_break_ctl(struct uart_port *port, int break_state) up->lcr &= ~UART_LCR_SBC ;serial_out (up,UART_LCR , up->lcr);spin_unlock_irqrestore (&up->port.lock, flags); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); }static int serial_omap_startup (struct uart_port *port)
@@ -781,8 +770,7 @@ static int serial_omap_startup(struct uart_port *port)serial_out (up,UART_OMAP_WER , up->wer); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); up->port_activity = jiffies;return 0 ; }
@@ -818,8 +806,7 @@ static void serial_omap_shutdown(struct uart_port *port)if (serial_in (up,UART_LSR ) &UART_LSR_DR ) (void )serial_in (up,UART_RX ); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev);free_irq (up->port.irq, up);if (up->wakeirq)free_irq (up->wakeirq, up);
@@ -1088,8 +1075,7 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,serial_omap_set_mctrl (&up->port, up->port.mctrl);spin_unlock_irqrestore (&up->port.lock, flags); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev);dev_dbg (up->port.dev,"serial_omap_set_termios+%d\n" , up->port.line); }
@@ -1120,8 +1106,7 @@ serial_omap_pm(struct uart_port *port, unsigned int state,pm_runtime_allow (up->dev); } -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); }static void serial_omap_release_port (struct uart_port *port)
@@ -1204,8 +1189,7 @@ static void serial_omap_poll_put_char(struct uart_port *port, unsigned char ch)pm_runtime_get_sync (up->dev);wait_for_xmitr (up);serial_out (up,UART_TX , ch); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); }static int serial_omap_poll_get_char (struct uart_port *port)
@@ -1223,8 +1207,7 @@ static int serial_omap_poll_get_char(struct uart_port *port) status =serial_in (up,UART_RX ); out: -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev);return status; }
@@ -1288,8 +1271,7 @@ serial_omap_console_write(struct console *co, const char *s,if (up->msr_saved_flags)check_modem_status (up); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev);if (locked)spin_unlock (&up->port.lock);local_irq_restore (flags);
@@ -1387,8 +1369,7 @@ serial_omap_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf) }spin_unlock_irqrestore (&up->port.lock, flags); -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev); } static int
@@ -1724,8 +1705,7 @@ static int serial_omap_probe(struct platform_device *pdev)if (ret !=0 ) goto err_add_port; -pm_runtime_mark_last_busy (up->dev); -pm_runtime_put_autosuspend (up->dev); +pm_runtime_last_busy_and_autosuspend (up->dev);return 0 ; err_add_port:
Signature · 1 line
1.7.0.4
PATCH 26/27 usb: musb: omap2430: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/usb/musb/omap2430.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/usb/musb/omap2430.c +2 -4
@@ -293,8 +293,7 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue) musb->xceiv->last_event =USB_EVENT_NONE ;if (musb->gadget_driver) {omap2430_musb_set_vbus (musb,0 ); -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev); +pm_runtime_last_busy_and_autosuspend (dev); }if (data->interface_type ==MUSB_INTERFACE_UTMI )
@@ -321,8 +320,7 @@ static void omap_musb_mailbox_work(struct work_struct *mailbox_work)pm_runtime_get_sync (dev);omap_musb_set_mailbox (glue); -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev); +pm_runtime_last_busy_and_autosuspend (dev); }static irqreturn_t omap2430_musb_interrupt (int irq,void *__hci)
Signature · 1 line
1.7.0.4
PATCH 27/27 video: fbdev: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/video/fbdev/auo_k190x.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
drivers/video/fbdev/auo_k190x.c +3 -6
@@ -354,8 +354,7 @@ static void auok190xfb_dpy_deferred_io(struct fb_info *info, par->update_partial (par, y1,min ((u16) (y1 + h), yres)); out: -pm_runtime_mark_last_busy (info->device); -pm_runtime_put_autosuspend (info->device); +pm_runtime_last_busy_and_autosuspend (info->device); }/*
@@ -591,8 +590,7 @@ static int auok190x_read_temperature(struct auok190xfb_par *par)mutex_unlock (&(par->io_lock)); -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev); +pm_runtime_last_busy_and_autosuspend (dev);/* sanitize and split of half-degrees for now */ temp = ((data[0 ] &AUOK190X_VERSION_TEMP_MASK ) >>1 );
@@ -630,8 +628,7 @@ static void auok190x_identify(struct auok190xfb_par *par) par->panel_size_int, par->panel_size_float, par->panel_model, par->epd_type, par->tcon_version, par->lut_version); -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev); +pm_runtime_last_busy_and_autosuspend (dev); }/*
Signature · 1 line
1.7.0.4
Re: [PATCH 21/27] spi: omap2-mcspi: use pm_runtime_last_busy_and_autosuspend helper
In reply to Mark BrownQuoted 7 lines · Mark Brown
Quoted 2 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeYou haven't CCed me on anything earlier in the series so I've no idea what's going on here but it looks like there is probably some dependency?
And thats very surprsing :(
I used the Wolfram's cocci_cc script to auto cc and add everyone to cover letter . Looks like it missed some. Sorry about that I should have been more careful
FWIW here is cover letter https://lkml.org/lkml/2014/9/24/862
Thanks
Signature · 1 line
~Vinod
PATCH 3/27 extcon: arizona: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/extcon/extcon-arizona.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/extcon/extcon-arizona.c +2 -4
@@ -323,8 +323,7 @@ static void arizona_stop_mic(struct arizona_extcon_info *info)if (change) {regulator_disable (info->micvdd); -pm_runtime_mark_last_busy (info->dev); -pm_runtime_put_autosuspend (info->dev); +pm_runtime_last_busy_and_autosuspend (info->dev); } }
@@ -1077,8 +1076,7 @@ out:mutex_unlock (&info->lock); -pm_runtime_mark_last_busy (info->dev); -pm_runtime_put_autosuspend (info->dev); +pm_runtime_last_busy_and_autosuspend (info->dev);return IRQ_HANDLED ; }
Signature · 1 line
1.7.0.4
PATCH 13/27 mei: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/misc/mei/client.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-)
drivers/misc/mei/client.c +4 -8
@@ -519,8 +519,7 @@ int mei_cl_disconnect(struct mei_cl *cl)mei_io_list_flush (&dev->ctrl_wr_list, cl); free:cl_dbg (dev, cl,"rpm: autosuspend\n" ); -pm_runtime_mark_last_busy (&dev->pdev->dev); -pm_runtime_put_autosuspend (&dev->pdev->dev); +pm_runtime_last_busy_and_autosuspend (&dev->pdev->dev);mei_io_cb_free (cb);return rets;
@@ -625,8 +624,7 @@ int mei_cl_connect(struct mei_cl *cl, struct file *file) out:cl_dbg (dev, cl,"rpm: autosuspend\n" ); -pm_runtime_mark_last_busy (&dev->pdev->dev); -pm_runtime_put_autosuspend (&dev->pdev->dev); +pm_runtime_last_busy_and_autosuspend (&dev->pdev->dev);mei_io_cb_free (cb);return rets;
@@ -779,8 +777,7 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length) out:cl_dbg (dev, cl,"rpm: autosuspend\n" ); -pm_runtime_mark_last_busy (&dev->pdev->dev); -pm_runtime_put_autosuspend (&dev->pdev->dev); +pm_runtime_last_busy_and_autosuspend (&dev->pdev->dev);if (rets)mei_io_cb_free (cb);
@@ -978,8 +975,7 @@ out: rets = buf->size; err:cl_dbg (dev, cl,"rpm: autosuspend\n" ); -pm_runtime_mark_last_busy (&dev->pdev->dev); -pm_runtime_put_autosuspend (&dev->pdev->dev); +pm_runtime_last_busy_and_autosuspend (&dev->pdev->dev);return rets; }
Signature · 1 line
1.7.0.4
PATCH 19/27 NFC: trf7970a: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/nfc/trf7970a.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/nfc/trf7970a.c +1 -2
@@ -801,8 +801,7 @@ static void trf7970a_switch_rf_off(struct trf7970a *trf) trf->aborting = false; trf->state =TRF7970A_ST_OFF ; -pm_runtime_mark_last_busy (trf->dev); -pm_runtime_put_autosuspend (trf->dev); +pm_runtime_last_busy_and_autosuspend (trf->dev); }static void trf7970a_switch_rf_on (struct trf7970a *trf)
Signature · 1 line
1.7.0.4
PATCH 12/27 mfd: arizona: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulUse the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code
--- drivers/mfd/arizona-irq.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/mfd/arizona-irq.c +1 -2
@@ -138,8 +138,7 @@ static irqreturn_t arizona_irq_thread(int irq, void *data) } }while (poll); -pm_runtime_mark_last_busy (arizona->dev); -pm_runtime_put_autosuspend (arizona->dev); +pm_runtime_last_busy_and_autosuspend (arizona->dev);return IRQ_HANDLED ; }
Signature · 1 line
1.7.0.4
Mark Brown
maintainerRe: [PATCH 21/27] spi: omap2-mcspi: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 2 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same code
You haven't CCed me on anything earlier in the series so I've no idea what's going on here but it looks like there is probably some dependency?
Re: [PATCH 01/27] PM: Add helper pm_runtime_last_busy_and_autosuspend()
In reply to Vinod KoulQuoted 5 lines · Vinod Koul
From: Subhransu S. Prusty <[email protected]>
pm_runtime_mark_last_busyandpm_runtime_put_autosuspendare used together in quite a lot of places. Add a helper for these.
Also updated Documentation for this
With function name as long as the implementation... I'm not sure if this is good helper :-).
Pavel
Quoted 5 lines
include/linux/pm_runtime.h +5
-0+static inline int pm_runtime_last_busy_and_autosuspend (struct device *dev) +{ +pm_runtime_mark_last_busy (dev); +return pm_runtime_put_autosuspend (dev); +}
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH 04/27] drm/i915: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 4 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>
Ack to merge through whatever tree is appropriate for this. Or tell me when I should pick this up for drm-intel.
-Daniel
Quoted 21 lines
--- drivers/gpu/drm/i915/intel_pm.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_pm.c +1
-2@@ -6729,8 +6729,7 @@ void intel_runtime_pm_put(struct drm_i915_private *dev_priv)if (!HAS_RUNTIME_PM (dev))return ; -pm_runtime_mark_last_busy (device); -pm_runtime_put_autosuspend (device); +pm_runtime_last_busy_and_autosuspend (device); }void intel_init_runtime_pm (struct drm_i915_private *dev_priv)Signature · 1 line
1.7.0.4
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 72 lines · Vinod Koul
This patch series adds a simple macro
pm_runtime_last_busy_and_autosuspend()which invokespm_runtime_mark_last_busy()andpm_runtime_put_autosuspend()sequentially. Then we do a tree wide update of current patterns which are present. As evident from log below this pattern is frequent in the kernel.This series can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git
topic/pm_runtime_last_busy_and_autosuspendFengguang's kbuild has tested it so it shouldn't break things for anyone. Barring one patch (explictyly mentioned in its changelog) rest are simple replacements.
If all are okay, this should be merged thru PM tree as it depends on macro addition.
Subhransu S. Prusty (1):
PM: Add helperpm_runtime_last_busy_and_autosuspend()Vinod Koul (26):
dmaengine:ste_dma: usepm_runtime_last_busy_and_autosuspendhelper
extcon: arizona: usepm_runtime_last_busy_and_autosuspendhelper drm/i915: usepm_runtime_last_busy_and_autosuspendhelper drm/nouveau: usepm_runtime_last_busy_and_autosuspendhelper drm/radeon: usepm_runtime_last_busy_and_autosuspendhelper
vga_switcheroo: usepm_runtime_last_busy_and_autosuspendhelper
i2c: designware: usepm_runtime_last_busy_and_autosuspendhelper
i2c: omap: usepm_runtime_last_busy_and_autosuspendhelper
i2c: qup: usepm_runtime_last_busy_and_autosuspendhelper
mfd: ab8500-gpadc: usepm_runtime_last_busy_and_autosuspendhelper
mfd: arizona: usepm_runtime_last_busy_and_autosuspendhelper
mei: usepm_runtime_last_busy_and_autosuspendhelper
mmc: usepm_runtime_last_busy_and_autosuspendhelper
mmc: mmci: usepm_runtime_last_busy_and_autosuspendhelper
mmc:omap_hsmmc: usepm_runtime_last_busy_and_autosuspendhelper
mmc: sdhci-pxav3: usepm_runtime_last_busy_and_autosuspendhelper
mmc: sdhci: usepm_runtime_last_busy_and_autosuspendhelper
NFC: trf7970a: usepm_runtime_last_busy_and_autosuspendhelper
pm2301-charger: usepm_runtime_last_busy_and_autosuspendhelper
spi: omap2-mcspi: usepm_runtime_last_busy_and_autosuspendhelper
spi: orion: usepm_runtime_last_busy_and_autosuspendhelper
spi: ti-qspi: usepm_runtime_last_busy_and_autosuspendhelper
spi: core: usepm_runtime_last_busy_and_autosuspendhelper
tty: serial: omap: usepm_runtime_last_busy_and_autosuspendhelper
usb: musb: omap2430: usepm_runtime_last_busy_and_autosuspendhelper
video: fbdev: usepm_runtime_last_busy_and_autosuspendhelperDocumentation/power/runtime_pm.txt | 4 ++ drivers/dma/ste_dma40.c | 30 ++++--------- drivers/extcon/extcon-arizona.c | 6 +-- drivers/gpu/drm/i915/intel_pm.c | 3 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +--- drivers/gpu/drm/radeon/radeon_connectors.c | 15 ++---- drivers/gpu/drm/radeon/radeon_drv.c | 5 +- drivers/gpu/drm/radeon/radeon_kms.c | 6 +-- drivers/gpu/vga/vga_switcheroo.c | 7 +-- drivers/i2c/busses/i2c-designware-core.c | 3 +- drivers/i2c/busses/i2c-omap.c | 6 +-- drivers/i2c/busses/i2c-qup.c | 3 +- drivers/mfd/ab8500-gpadc.c | 6 +-- drivers/mfd/arizona-irq.c | 3 +- drivers/misc/mei/client.c | 12 ++---- drivers/mmc/core/core.c | 3 +- drivers/mmc/host/mmci.c | 12 ++---- drivers/mmc/host/omap_hsmmc.c | 19 ++------- drivers/mmc/host/sdhci-pxav3.c | 6 +-- drivers/mmc/host/sdhci.c | 3 +- drivers/nfc/trf7970a.c | 3 +- drivers/power/pm2301_charger.c | 3 +- drivers/spi/spi-omap2-mcspi.c | 9 +---
Quoted 8 lines
drivers/spi/spi-orion.c | 3 +- drivers/spi/spi-ti-qspi.c | 5 +- drivers/spi/spi.c | 6 +-- drivers/tty/serial/omap-serial.c | 60 +++++++++------------------ drivers/usb/musb/omap2430.c | 6 +-- drivers/video/fbdev/auo_k190x.c | 9 +--- include/linux/pm_runtime.h | 6 +++ 31 files changed, 97 insertions(+), 177 deletions(-)
OK, I guess this is as good as it gets.
What tree would you like it go through?
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
Quoted 82 lines · Rafael J. Wysocki
Quoted 72 lines · Vinod Koul
This patch series adds a simple macro
pm_runtime_last_busy_and_autosuspend()which invokespm_runtime_mark_last_busy()andpm_runtime_put_autosuspend()sequentially. Then we do a tree wide update of current patterns which are present. As evident from log below this pattern is frequent in the kernel.This series can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git
topic/pm_runtime_last_busy_and_autosuspendFengguang's kbuild has tested it so it shouldn't break things for anyone. Barring one patch (explictyly mentioned in its changelog) rest are simple replacements.
If all are okay, this should be merged thru PM tree as it depends on macro addition.
Subhransu S. Prusty (1):
PM: Add helperpm_runtime_last_busy_and_autosuspend()Vinod Koul (26):
dmaengine:ste_dma: usepm_runtime_last_busy_and_autosuspendhelper
extcon: arizona: usepm_runtime_last_busy_and_autosuspendhelper drm/i915: usepm_runtime_last_busy_and_autosuspendhelper drm/nouveau: usepm_runtime_last_busy_and_autosuspendhelper drm/radeon: usepm_runtime_last_busy_and_autosuspendhelper
vga_switcheroo: usepm_runtime_last_busy_and_autosuspendhelper
i2c: designware: usepm_runtime_last_busy_and_autosuspendhelper
i2c: omap: usepm_runtime_last_busy_and_autosuspendhelper
i2c: qup: usepm_runtime_last_busy_and_autosuspendhelper
mfd: ab8500-gpadc: usepm_runtime_last_busy_and_autosuspendhelper
mfd: arizona: usepm_runtime_last_busy_and_autosuspendhelper
mei: usepm_runtime_last_busy_and_autosuspendhelper
mmc: usepm_runtime_last_busy_and_autosuspendhelper
mmc: mmci: usepm_runtime_last_busy_and_autosuspendhelper
mmc:omap_hsmmc: usepm_runtime_last_busy_and_autosuspendhelper
mmc: sdhci-pxav3: usepm_runtime_last_busy_and_autosuspendhelper
mmc: sdhci: usepm_runtime_last_busy_and_autosuspendhelper
NFC: trf7970a: usepm_runtime_last_busy_and_autosuspendhelper
pm2301-charger: usepm_runtime_last_busy_and_autosuspendhelper
spi: omap2-mcspi: usepm_runtime_last_busy_and_autosuspendhelper
spi: orion: usepm_runtime_last_busy_and_autosuspendhelper
spi: ti-qspi: usepm_runtime_last_busy_and_autosuspendhelper
spi: core: usepm_runtime_last_busy_and_autosuspendhelper
tty: serial: omap: usepm_runtime_last_busy_and_autosuspendhelper
usb: musb: omap2430: usepm_runtime_last_busy_and_autosuspendhelper
video: fbdev: usepm_runtime_last_busy_and_autosuspendhelperDocumentation/power/runtime_pm.txt | 4 ++ drivers/dma/ste_dma40.c | 30 ++++--------- drivers/extcon/extcon-arizona.c | 6 +-- drivers/gpu/drm/i915/intel_pm.c | 3 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +--- drivers/gpu/drm/radeon/radeon_connectors.c | 15 ++---- drivers/gpu/drm/radeon/radeon_drv.c | 5 +- drivers/gpu/drm/radeon/radeon_kms.c | 6 +-- drivers/gpu/vga/vga_switcheroo.c | 7 +-- drivers/i2c/busses/i2c-designware-core.c | 3 +- drivers/i2c/busses/i2c-omap.c | 6 +-- drivers/i2c/busses/i2c-qup.c | 3 +- drivers/mfd/ab8500-gpadc.c | 6 +-- drivers/mfd/arizona-irq.c | 3 +- drivers/misc/mei/client.c | 12 ++---- drivers/mmc/core/core.c | 3 +- drivers/mmc/host/mmci.c | 12 ++---- drivers/mmc/host/omap_hsmmc.c | 19 ++------- drivers/mmc/host/sdhci-pxav3.c | 6 +-- drivers/mmc/host/sdhci.c | 3 +- drivers/nfc/trf7970a.c | 3 +- drivers/power/pm2301_charger.c | 3 +- drivers/spi/spi-omap2-mcspi.c | 9 +---Quoted 8 lines
drivers/spi/spi-orion.c | 3 +- drivers/spi/spi-ti-qspi.c | 5 +- drivers/spi/spi.c | 6 +-- drivers/tty/serial/omap-serial.c | 60 +++++++++------------------ drivers/usb/musb/omap2430.c | 6 +-- drivers/video/fbdev/auo_k190x.c | 9 +--- include/linux/pm_runtime.h | 6 +++ 31 files changed, 97 insertions(+), 177 deletions(-)
Quoted 3 lines
OK, I guess this is as good as it gets.
What tree would you like it go through?
Do we really need this new helper ? I mean, the very moment when we decide to implement ->runtime_idle() we will need to get rid of this change. I wonder if it's really valid...
Signature · 1 line
balbi
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 88 lines · Rafael J. Wysocki
Quoted 87 lines · Felipe Balbi
Quoted 85 lines · Rafael J. Wysocki
Quoted 72 lines · Vinod Koul
This patch series adds a simple macro
pm_runtime_last_busy_and_autosuspend()which invokespm_runtime_mark_last_busy()andpm_runtime_put_autosuspend()sequentially. Then we do a tree wide update of current patterns which are present. As evident from log below this pattern is frequent in the kernel.This series can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git
topic/pm_runtime_last_busy_and_autosuspendFengguang's kbuild has tested it so it shouldn't break things for anyone. Barring one patch (explictyly mentioned in its changelog) rest are simple replacements.
If all are okay, this should be merged thru PM tree as it depends on macro addition.
Subhransu S. Prusty (1):
PM: Add helperpm_runtime_last_busy_and_autosuspend()Vinod Koul (26):
dmaengine:ste_dma: usepm_runtime_last_busy_and_autosuspendhelper
extcon: arizona: usepm_runtime_last_busy_and_autosuspendhelper drm/i915: usepm_runtime_last_busy_and_autosuspendhelper drm/nouveau: usepm_runtime_last_busy_and_autosuspendhelper drm/radeon: usepm_runtime_last_busy_and_autosuspendhelper
vga_switcheroo: usepm_runtime_last_busy_and_autosuspendhelper
i2c: designware: usepm_runtime_last_busy_and_autosuspendhelper
i2c: omap: usepm_runtime_last_busy_and_autosuspendhelper
i2c: qup: usepm_runtime_last_busy_and_autosuspendhelper
mfd: ab8500-gpadc: usepm_runtime_last_busy_and_autosuspendhelper
mfd: arizona: usepm_runtime_last_busy_and_autosuspendhelper
mei: usepm_runtime_last_busy_and_autosuspendhelper
mmc: usepm_runtime_last_busy_and_autosuspendhelper
mmc: mmci: usepm_runtime_last_busy_and_autosuspendhelper
mmc:omap_hsmmc: usepm_runtime_last_busy_and_autosuspendhelper
mmc: sdhci-pxav3: usepm_runtime_last_busy_and_autosuspendhelper
mmc: sdhci: usepm_runtime_last_busy_and_autosuspendhelper
NFC: trf7970a: usepm_runtime_last_busy_and_autosuspendhelper
pm2301-charger: usepm_runtime_last_busy_and_autosuspendhelper
spi: omap2-mcspi: usepm_runtime_last_busy_and_autosuspendhelper
spi: orion: usepm_runtime_last_busy_and_autosuspendhelper
spi: ti-qspi: usepm_runtime_last_busy_and_autosuspendhelper
spi: core: usepm_runtime_last_busy_and_autosuspendhelper
tty: serial: omap: usepm_runtime_last_busy_and_autosuspendhelper
usb: musb: omap2430: usepm_runtime_last_busy_and_autosuspendhelper
video: fbdev: usepm_runtime_last_busy_and_autosuspendhelperDocumentation/power/runtime_pm.txt | 4 ++ drivers/dma/ste_dma40.c | 30 ++++--------- drivers/extcon/extcon-arizona.c | 6 +-- drivers/gpu/drm/i915/intel_pm.c | 3 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +--- drivers/gpu/drm/radeon/radeon_connectors.c | 15 ++---- drivers/gpu/drm/radeon/radeon_drv.c | 5 +- drivers/gpu/drm/radeon/radeon_kms.c | 6 +-- drivers/gpu/vga/vga_switcheroo.c | 7 +-- drivers/i2c/busses/i2c-designware-core.c | 3 +- drivers/i2c/busses/i2c-omap.c | 6 +-- drivers/i2c/busses/i2c-qup.c | 3 +- drivers/mfd/ab8500-gpadc.c | 6 +-- drivers/mfd/arizona-irq.c | 3 +- drivers/misc/mei/client.c | 12 ++---- drivers/mmc/core/core.c | 3 +- drivers/mmc/host/mmci.c | 12 ++---- drivers/mmc/host/omap_hsmmc.c | 19 ++------- drivers/mmc/host/sdhci-pxav3.c | 6 +-- drivers/mmc/host/sdhci.c | 3 +- drivers/nfc/trf7970a.c | 3 +- drivers/power/pm2301_charger.c | 3 +- drivers/spi/spi-omap2-mcspi.c | 9 +---Quoted 8 lines
drivers/spi/spi-orion.c | 3 +- drivers/spi/spi-ti-qspi.c | 5 +- drivers/spi/spi.c | 6 +-- drivers/tty/serial/omap-serial.c | 60 +++++++++------------------ drivers/usb/musb/omap2430.c | 6 +-- drivers/video/fbdev/auo_k190x.c | 9 +--- include/linux/pm_runtime.h | 6 +++ 31 files changed, 97 insertions(+), 177 deletions(-)OK, I guess this is as good as it gets.
What tree would you like it go through?
Quoted 7 lines
Quoted 3 lines
Do we really need this new helper ? I mean, the very moment when we decide to implement ->runtime_idle() we will need to get rid of this change. I wonder if it's really valid...
I'm not sure I'm following? This seems to simply implement what drivers have been doing already as one function. Why would it be invalid to reduce code duplication?
For two reasons:
1) the helper has no inteligence whatsoever. It just calls the same functions.
2) the duplication will vanish whenever someone implements ->runtime_idle() and have that call pm_runtime_autosuspend() (like PCI and USB buses are doing today). This will just be yet another line that needs to change.
Frankly though, no strong feelings, I just think it's a commit that doesn't bring that any benefits other than looking like one line was removed.
Signature · 1 line
balbi
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 07/27] vga_switcheroo: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 4 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>
Quoted 29 lines
--- drivers/gpu/vga/vga_switcheroo.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)drivers/gpu/vga/vga_switcheroo.c +3
-5@@ -682,10 +682,9 @@ static int vga_switcheroo_runtime_resume_hdmi_audio(struct device *dev) ret = dev->bus->pm->runtime_resume (dev);/* put the reference for the gpu */ -if (found) { -pm_runtime_mark_last_busy (&found->pdev->dev); -pm_runtime_put_autosuspend (&found->pdev->dev); - } +if (found) +pm_runtime_last_busy_and_autosuspend (&found->pdev->dev); +return ret; } --1.7.0.4
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 06/27] drm/radeon: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 4 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>
I don't care which tree this goes through.
Quoted 107 lines
--- drivers/gpu/drm/radeon/radeon_connectors.c | 15 +++++---------- drivers/gpu/drm/radeon/radeon_drv.c | 5 ++--- drivers/gpu/drm/radeon/radeon_kms.c | 6 ++---- 3 files changed, 9 insertions(+), 17 deletions(-)drivers/gpu/drm/radeon/radeon_connectors.c +5
-10@@ -852,8 +852,7 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)/* check acpi lid status ??? */ radeon_connector_update_scratch_regs (connector, ret); -pm_runtime_mark_last_busy (connector->dev->dev); -pm_runtime_put_autosuspend (connector->dev->dev); +pm_runtime_last_busy_and_autosuspend (connector->dev->dev);return ret; }@@ -1025,8 +1024,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force)radeon_connector_update_scratch_regs (connector, ret); out: -pm_runtime_mark_last_busy (connector->dev->dev); -pm_runtime_put_autosuspend (connector->dev->dev); +pm_runtime_last_busy_and_autosuspend (connector->dev->dev);return ret; }@@ -1103,8 +1101,7 @@ radeon_tv_detect(struct drm_connector *connector, bool force)if (ret == connector_status_connected) ret =radeon_connector_analog_encoder_conflict_solve (connector, encoder, ret, false);radeon_connector_update_scratch_regs (connector, ret); -pm_runtime_mark_last_busy (connector->dev->dev); -pm_runtime_put_autosuspend (connector->dev->dev); +pm_runtime_last_busy_and_autosuspend (connector->dev->dev);return ret; }@@ -1321,8 +1318,7 @@ out:radeon_connector_update_scratch_regs (connector, ret); exit: -pm_runtime_mark_last_busy (connector->dev->dev); -pm_runtime_put_autosuspend (connector->dev->dev); +pm_runtime_last_busy_and_autosuspend (connector->dev->dev);return ret; }@@ -1638,8 +1634,7 @@ radeon_dp_detect(struct drm_connector *connector, bool force)radeon_connector_update_scratch_regs (connector, ret); out: -pm_runtime_mark_last_busy (connector->dev->dev); -pm_runtime_put_autosuspend (connector->dev->dev); +pm_runtime_last_busy_and_autosuspend (connector->dev->dev);return ret; }drivers/gpu/drm/radeon/radeon_drv.c +2
-3@@ -503,9 +503,8 @@ long radeon_drm_ioctl(struct file *filp,return ret; ret =drm_ioctl (filp, cmd, arg); - -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); + +pm_runtime_last_busy_and_autosuspend (dev->dev);return ret; }drivers/gpu/drm/radeon/radeon_kms.c +2
-5@@ -147,8 +147,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)pm_runtime_set_autosuspend_delay (dev->dev,5000 );pm_runtime_set_active (dev->dev);pm_runtime_allow (dev->dev); -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); +pm_runtime_last_busy_and_autosuspend (dev->dev); } out:@@ -632,8 +631,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) file_priv->driver_priv = fpriv; } -pm_runtime_mark_last_busy (dev->dev); -pm_runtime_put_autosuspend (dev->dev); +pm_runtime_last_busy_and_autosuspend (dev->dev);return 0 ; } --1.7.0.4
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 83 lines · Felipe Balbi
Quoted 82 lines · Rafael J. Wysocki
Quoted 80 lines · Vinod Koul
This patch series adds a simple macro
pm_runtime_last_busy_and_autosuspend()which invokespm_runtime_mark_last_busy()andpm_runtime_put_autosuspend()sequentially. Then we do a tree wide update of current patterns which are present. As evident from log below this pattern is frequent in the kernel.This series can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git
topic/pm_runtime_last_busy_and_autosuspendFengguang's kbuild has tested it so it shouldn't break things for anyone. Barring one patch (explictyly mentioned in its changelog) rest are simple replacements.
If all are okay, this should be merged thru PM tree as it depends on macro addition.
Subhransu S. Prusty (1):
PM: Add helperpm_runtime_last_busy_and_autosuspend()Vinod Koul (26):
dmaengine:ste_dma: usepm_runtime_last_busy_and_autosuspendhelper
extcon: arizona: usepm_runtime_last_busy_and_autosuspendhelper drm/i915: usepm_runtime_last_busy_and_autosuspendhelper drm/nouveau: usepm_runtime_last_busy_and_autosuspendhelper drm/radeon: usepm_runtime_last_busy_and_autosuspendhelper
vga_switcheroo: usepm_runtime_last_busy_and_autosuspendhelper
i2c: designware: usepm_runtime_last_busy_and_autosuspendhelper
i2c: omap: usepm_runtime_last_busy_and_autosuspendhelper
i2c: qup: usepm_runtime_last_busy_and_autosuspendhelper
mfd: ab8500-gpadc: usepm_runtime_last_busy_and_autosuspendhelper
mfd: arizona: usepm_runtime_last_busy_and_autosuspendhelper
mei: usepm_runtime_last_busy_and_autosuspendhelper
mmc: usepm_runtime_last_busy_and_autosuspendhelper
mmc: mmci: usepm_runtime_last_busy_and_autosuspendhelper
mmc:omap_hsmmc: usepm_runtime_last_busy_and_autosuspendhelper
mmc: sdhci-pxav3: usepm_runtime_last_busy_and_autosuspendhelper
mmc: sdhci: usepm_runtime_last_busy_and_autosuspendhelper
NFC: trf7970a: usepm_runtime_last_busy_and_autosuspendhelper
pm2301-charger: usepm_runtime_last_busy_and_autosuspendhelper
spi: omap2-mcspi: usepm_runtime_last_busy_and_autosuspendhelper
spi: orion: usepm_runtime_last_busy_and_autosuspendhelper
spi: ti-qspi: usepm_runtime_last_busy_and_autosuspendhelper
spi: core: usepm_runtime_last_busy_and_autosuspendhelper
tty: serial: omap: usepm_runtime_last_busy_and_autosuspendhelper
usb: musb: omap2430: usepm_runtime_last_busy_and_autosuspendhelper
video: fbdev: usepm_runtime_last_busy_and_autosuspendhelperDocumentation/power/runtime_pm.txt | 4 ++ drivers/dma/ste_dma40.c | 30 ++++--------- drivers/extcon/extcon-arizona.c | 6 +-- drivers/gpu/drm/i915/intel_pm.c | 3 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +--- drivers/gpu/drm/radeon/radeon_connectors.c | 15 ++---- drivers/gpu/drm/radeon/radeon_drv.c | 5 +- drivers/gpu/drm/radeon/radeon_kms.c | 6 +-- drivers/gpu/vga/vga_switcheroo.c | 7 +-- drivers/i2c/busses/i2c-designware-core.c | 3 +- drivers/i2c/busses/i2c-omap.c | 6 +-- drivers/i2c/busses/i2c-qup.c | 3 +- drivers/mfd/ab8500-gpadc.c | 6 +-- drivers/mfd/arizona-irq.c | 3 +- drivers/misc/mei/client.c | 12 ++---- drivers/mmc/core/core.c | 3 +- drivers/mmc/host/mmci.c | 12 ++---- drivers/mmc/host/omap_hsmmc.c | 19 ++------- drivers/mmc/host/sdhci-pxav3.c | 6 +-- drivers/mmc/host/sdhci.c | 3 +- drivers/nfc/trf7970a.c | 3 +- drivers/power/pm2301_charger.c | 3 +- drivers/spi/spi-omap2-mcspi.c | 9 +--- drivers/spi/spi-orion.c | 3 +- drivers/spi/spi-ti-qspi.c | 5 +- drivers/spi/spi.c | 6 +-- drivers/tty/serial/omap-serial.c | 60 +++++++++------------------ drivers/usb/musb/omap2430.c | 6 +-- drivers/video/fbdev/auo_k190x.c | 9 +--- include/linux/pm_runtime.h | 6 +++ 31 files changed, 97 insertions(+), 177 deletions(-)
Quoted 7 lines
Quoted 3 lines
OK, I guess this is as good as it gets.
What tree would you like it go through?
Do we really need this new helper ? I mean, the very moment when we decide to implement ->runtime_idle() we will need to get rid of this change. I wonder if it's really valid...
I'm not sure I'm following? This seems to simply implement what drivers have been doing already as one function. Why would it be invalid to reduce code duplication?
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 03/27] extcon: arizona: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 24 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>--- drivers/extcon/extcon-arizona.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)drivers/extcon/extcon-arizona.c +1
-2@@ -323,8 +323,7 @@ static void arizona_stop_mic(struct arizona_extcon_info *info)if (change) {regulator_disable (info->micvdd); -pm_runtime_mark_last_busy (info->dev); -pm_runtime_put_autosuspend (info->dev); +pm_runtime_last_busy_and_autosuspend (info->dev); } }
drivers/extcon/extcon-arizona.c out: · line 1082
Quoted 9 lines
drivers/extcon/extcon-arizona.c +1
-2@@ -1077,8 +1076,7 @@ out:mutex_unlock (&info->lock); -pm_runtime_mark_last_busy (info->dev); -pm_runtime_put_autosuspend (info->dev); +pm_runtime_last_busy_and_autosuspend (info->dev);return IRQ_HANDLED ; }
Looks good to me about this patch.
Thanks,
Chanwoo Choi
Quoted 4 lines · Rafael J. Wysocki
OK, I guess this is as good as it gets.
What tree would you like it go through?
Since rest of the patches are dependent upon 1st patch which should go thru your tree, we should merge this thru your tree
Thanks
Signature · 1 line
~Vinod
Quoted 17 lines · Felipe Balbi
Quoted 11 lines
Quoted 7 lines
Quoted 3 lines
OK, I guess this is as good as it gets.
What tree would you like it go through?
Do we really need this new helper ? I mean, the very moment when we decide to implement ->runtime_idle() we will need to get rid of this change. I wonder if it's really valid...
I'm not sure I'm following? This seems to simply implement what drivers have been doing already as one function. Why would it be invalid to reduce code duplication?
For two reasons:
1) the helper has no inteligence whatsoever. It just calls the same functions.
Quoted 8 lines
2) the duplication will vanish whenever someone implements ->runtime_idle() and have that call
pm_runtime_autosuspend()(like PCI and USB buses are doing today). This will just be yet another line that needs to change.Frankly though, no strong feelings, I just think it's a commit that doesn't bring that any benefits other than looking like one line was removed.
and yes that is what it tries to do nothing more nothing less. If in future there are no users (today we have quite a few), then we can remove the dead macro, no harm. But that is not the situation today.
Thanks
Signature · 1 line
~Vinod
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 01/27] PM: Add helper pm_runtime_last_busy_and_autosuspend()
In reply to Pavel MachekQuoted 9 lines · Pavel Machek
Quoted 5 lines · Vinod Koul
From: Subhransu S. Prusty <[email protected]>
pm_runtime_mark_last_busyandpm_runtime_put_autosuspendare used together in quite a lot of places. Add a helper for these.
Also updated Documentation for thisWith function name as long as the implementation... I'm not sure if this is good helper :-).
am all ears if that is a general consensus to cut down on length and suggestions welcome :)
Signature · 1 line
~Vinod
Quoted 11 lines
Pavel
Quoted 5 lines
include/linux/pm_runtime.h +5
-0+static inline int pm_runtime_last_busy_and_autosuspend (struct device *dev) +{ +pm_runtime_mark_last_busy (dev); +return pm_runtime_put_autosuspend (dev); +}Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH 03/27] extcon: arizona: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 5 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>---
Thanks,
Charles
Re: [PATCH 12/27] mfd: arizona: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 5 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>---
Thanks,
Charles
Re: [PATCH 01/27] PM: Add helper pm_runtime_last_busy_and_autosuspend()
In reply to Vinod KoulQuoted 33 lines · Vinod Koul
From: Subhransu S. Prusty <[email protected]>
pm_runtime_mark_last_busyandpm_runtime_put_autosuspendare used together in quite a lot of places. Add a helper for these.
Also updated Documentation for thisSigned-off-by Subhransu S. Prusty <[email protected]>Signed-off-by Vinod Koul <[email protected]>--- Documentation/power/runtime_pm.txt | 4 ++++ include/linux/pm_runtime.h | 6 ++++++ 2 files changed, 10 insertions(+), 0 deletions(-)Documentation/power/runtime_pm.txt +4
-0@@ -490,6 +490,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: power.use_autosuspend isn't set, otherwise returns the expiration time in jiffies + int pm_runtime_last_busy_and_autosuspend(struct device *dev); + - invoke pm_runtime_mark_last_busy(dev) and then run + pm_runtime_put_autosuspend(dev) and return its result + It is safe to execute the following helper functions from interrupt context: pm_request_idle()include/linux/pm_runtime.h +0
-0
include/linux/pm_runtime.h static inline void pm_runtime_dont_use_autosuspend(struct device *dev) · line 280
Quoted 4 lines
include/linux/pm_runtime.h +1
-0@@ -277,4 +277,10 @@ static inline void pm_runtime_dont_use_autosuspend(struct device *dev)__pm_runtime_use_autosuspend (dev, false); } +static inline int pm_runtime_last_busy_and_autosuspend (struct device *dev)
This doesn't help code readability I think. The function name is quite long as Pavel also pointed out. :-)
And, I also lack the "put" prefix, following the other functions in the runtime PM API - which would make the name even longer. :-)
Kind regards
Uffe
Re: [PATCH 21/27] spi: omap2-mcspi: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 2 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same code
though I have to say that the function name is rather spectacularly long here.
Re: [PATCH 22/27] spi: orion: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 2 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same code
Re: [PATCH 23/27] spi: ti-qspi: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 2 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same code
Re: [PATCH 24/27] spi: core: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 2 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same code
Re: [PATCH 02/27] dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 4 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>
Yours,
Linus Walleij
Quoted 23 lines · Vinod Koul
Quoted 22 lines · Felipe Balbi
Quoted 11 lines
Quoted 7 lines
Quoted 3 lines
OK, I guess this is as good as it gets.
What tree would you like it go through?
Do we really need this new helper ? I mean, the very moment when we decide to implement ->runtime_idle() we will need to get rid of this change. I wonder if it's really valid...
I'm not sure I'm following? This seems to simply implement what drivers have been doing already as one function. Why would it be invalid to reduce code duplication?
For two reasons:
1) the helper has no inteligence whatsoever. It just calls the same functions.
2) the duplication will vanish whenever someone implements ->runtime_idle() and have that call
pm_runtime_autosuspend()(like PCI and USB buses are doing today). This will just be yet another line that needs to change.
Quoted 6 lines
Quoted 3 lines
Frankly though, no strong feelings, I just think it's a commit that doesn't bring that any benefits other than looking like one line was removed.
and yes that is what it tries to do nothing more nothing less. If in future there are no users (today we have quite a few), then we can remove the dead macro, no harm. But that is not the situation today.
as I said, a commit that's bound to be useless. It's not like you're saving 10 lines of code, it's only one. Replacing two simple lines with a function which takes <joke> almost as many characters to type </joke>.
IMO, this is pretty useless and I'd rather not see them in the drivers I maintain, sorry.
cheers
Signature · 1 line
balbi
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 31 lines · Felipe Balbi
Quoted 23 lines · Vinod Koul
Quoted 22 lines · Felipe Balbi
Quoted 11 lines
Quoted 7 lines
Quoted 3 lines
OK, I guess this is as good as it gets.
What tree would you like it go through?
Do we really need this new helper ? I mean, the very moment when we decide to implement ->runtime_idle() we will need to get rid of this change. I wonder if it's really valid...
I'm not sure I'm following? This seems to simply implement what drivers have been doing already as one function. Why would it be invalid to reduce code duplication?
For two reasons:
1) the helper has no inteligence whatsoever. It just calls the same functions.
2) the duplication will vanish whenever someone implements ->runtime_idle() and have that call
pm_runtime_autosuspend()(like PCI and USB buses are doing today). This will just be yet another line that needs to change.Quoted 6 lines
Quoted 3 lines
Frankly though, no strong feelings, I just think it's a commit that doesn't bring that any benefits other than looking like one line was removed.
and yes that is what it tries to do nothing more nothing less. If in future there are no users (today we have quite a few), then we can remove the dead macro, no harm. But that is not the situation today.
Quoted 6 lines
as I said, a commit that's bound to be useless. It's not like you're saving 10 lines of code, it's only one. Replacing two simple lines with a function which takes <joke> almost as many characters to type </joke>.
IMO, this is pretty useless and I'd rather not see them in the drivers I maintain, sorry.
It is not a NACK from me; yet from a high-level perspective I agree with Felipe.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 52 lines · Wolfram Sang
--Bn2rw/3z4jIqBvZU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printableQuoted 7 lines · Felipe Balbi
Quoted 6 lines · Vinod Koul
Quoted 5 lines · Felipe Balbi
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
OK, I guess this is as good as it gets.
=20
What tree would you like it go through?=20
Do we really need this new helper ? I mean, the very moment when =we
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
decide to implement ->runtime_idle() we will need to get rid of t=
his
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
change. I wonder if it's really valid...
=20
I'm not sure I'm following? This seems to simply implement what dr=ivers
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
have been doing already as one function. Why would it be invalid t=
o reduce
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
code duplication?
=20
For two reasons:
=20
1) the helper has no inteligence whatsoever. It just calls the same functions.
=20
2) the duplication will vanish whenever someone implements ->runtime_idle() and have that callpm_runtime_autosuspend()(like PCI and USB buses are doing today). This will just be yet another line th=at
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
needs to change.
=20
Frankly though, no strong feelings, I just think it's a commit that doesn't bring that any benefits other than looking like one line was removed.and yes that is what it tries to do nothing more nothing less. If in fu=
ture
Quoted 1 line
Quoted 1 line
there are no users (today we have quite a few), then we can remove the =
dead
Quoted 8 lines
Quoted 1 line
macro, no harm. But that is not the situation today.
=20
as I said, a commit that's bound to be useless. It's not like you're saving 10 lines of code, it's only one. Replacing two simple lines with a function which takes <joke> almost as many characters to type </joke>. =20
IMO, this is pretty useless and I'd rather not see them in the drivers I maintain, sorry.
Quoted 2 lines
It is not a NACK from me; yet from a high-level perspective I agree with Felipe.
OK
I'd rather not merge something that driver people don't want to use.
Vinod?
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
Re: [PATCH 11/27] mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 4 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>
Yours,
Linus Walleij
Quoted 53 lines · Rafael J. Wysocki
Quoted 52 lines · Wolfram Sang
--Bn2rw/3z4jIqBvZU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printableQuoted 7 lines · Felipe Balbi
Quoted 6 lines · Vinod Koul
Quoted 5 lines · Felipe Balbi
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
OK, I guess this is as good as it gets.
=20
What tree would you like it go through?=20
Do we really need this new helper ? I mean, the very moment when =we
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
decide to implement ->runtime_idle() we will need to get rid of t=
his
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
change. I wonder if it's really valid...
=20
I'm not sure I'm following? This seems to simply implement what dr=ivers
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
have been doing already as one function. Why would it be invalid t=
o reduce
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
code duplication?
=20
For two reasons:
=20
1) the helper has no inteligence whatsoever. It just calls the same functions.
=20
2) the duplication will vanish whenever someone implements ->runtime_idle() and have that callpm_runtime_autosuspend()(like PCI and USB buses are doing today). This will just be yet another line th=at
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
needs to change.
=20
Frankly though, no strong feelings, I just think it's a commit that doesn't bring that any benefits other than looking like one line was removed.and yes that is what it tries to do nothing more nothing less. If in fu=
ture
Quoted 1 line
Quoted 1 line
there are no users (today we have quite a few), then we can remove the =
dead
Quoted 8 lines
Quoted 1 line
macro, no harm. But that is not the situation today.
=20
as I said, a commit that's bound to be useless. It's not like you're saving 10 lines of code, it's only one. Replacing two simple lines with a function which takes <joke> almost as many characters to type </joke>. =20
IMO, this is pretty useless and I'd rather not see them in the drivers I maintain, sorry.
Quoted 8 lines
Quoted 2 lines
It is not a NACK from me; yet from a high-level perspective I agree with Felipe.
OK
I'd rather not merge something that driver people don't want to use.
Vinod?
There have been quite a few ACKs as well. Either way am okay. If you feel this will get removed as discussed, then there is no point in merging
Signature · 1 line
~Vinod
Re: [PATCH 11/27] mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 7 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>--- drivers/mfd/ab8500-gpadc.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
Applied with Linus' Ack.
Quoted 24 lines
drivers/mfd/ab8500-gpadc.c +2
-4@@ -571,8 +571,7 @@ int ab8500_gpadc_double_read_raw(struct ab8500_gpadc *gpadc, u8 channel, }/* Disable VTVout LDO this is required for GPADC */ -pm_runtime_mark_last_busy (gpadc->dev); -pm_runtime_put_autosuspend (gpadc->dev); +pm_runtime_last_busy_and_autosuspend (gpadc->dev);mutex_unlock (&gpadc->ab8500_gpadc_lock);@@ -910,8 +909,7 @@ static int ab8500_gpadc_resume(struct device *dev)if (ret)dev_err (dev,"Failed to enable vtvout LDO: %d\n" , ret); -pm_runtime_mark_last_busy (gpadc->dev); -pm_runtime_put_autosuspend (gpadc->dev); +pm_runtime_last_busy_and_autosuspend (gpadc->dev);mutex_unlock (&gpadc->ab8500_gpadc_lock);return ret;
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Lee Jones
AppliedRe: [PATCH 12/27] mfd: arizona: use pm_runtime_last_busy_and_autosuspend helper
In reply to Vinod KoulQuoted 7 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>--- drivers/mfd/arizona-irq.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Applied to v3.19 (same as patch 11), with Charles' Ack.
Quoted 14 lines
drivers/mfd/arizona-irq.c +1
-2@@ -138,8 +138,7 @@ static irqreturn_t arizona_irq_thread(int irq, void *data) } }while (poll); -pm_runtime_mark_last_busy (arizona->dev); -pm_runtime_put_autosuspend (arizona->dev); +pm_runtime_last_busy_and_autosuspend (arizona->dev);return IRQ_HANDLED ; }
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH 12/27] mfd: arizona: use pm_runtime_last_busy_and_autosuspend helper
Quoted 11 lines · Lee Jones
Quoted 7 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>--- drivers/mfd/arizona-irq.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)Applied to v3.19 (same as patch 11), with Charles' Ack.
Okay, I just had to search online for the other patches (as you left me off PATCH 00/27). It appears this approach has gone down like a lead balloon. For this reason I'm pulling these patches from my v3.19 branch.
Quoted 15 lines
Quoted 14 lines
drivers/mfd/arizona-irq.c +1
-2@@ -138,8 +138,7 @@ static irqreturn_t arizona_irq_thread(int irq, void *data) } }while (poll); -pm_runtime_mark_last_busy (arizona->dev); -pm_runtime_put_autosuspend (arizona->dev); +pm_runtime_last_busy_and_autosuspend (arizona->dev);return IRQ_HANDLED ; }
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH 11/27] mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper
In reply to Lee JonesQuoted 11 lines · Lee Jones
Quoted 7 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>--- drivers/mfd/ab8500-gpadc.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)Applied with Linus' Ack.
Okay, I just had to search online for the other patches (as you left me off PATCH 00/27). It appears this approach has gone down like a lead balloon. For this reason I'm pulling these patches from my v3.19 branch.
Quoted 25 lines
Quoted 24 lines
drivers/mfd/ab8500-gpadc.c +2
-4@@ -571,8 +571,7 @@ int ab8500_gpadc_double_read_raw(struct ab8500_gpadc *gpadc, u8 channel, }/* Disable VTVout LDO this is required for GPADC */ -pm_runtime_mark_last_busy (gpadc->dev); -pm_runtime_put_autosuspend (gpadc->dev); +pm_runtime_last_busy_and_autosuspend (gpadc->dev);mutex_unlock (&gpadc->ab8500_gpadc_lock);@@ -910,8 +909,7 @@ static int ab8500_gpadc_resume(struct device *dev)if (ret)dev_err (dev,"Failed to enable vtvout LDO: %d\n" , ret); -pm_runtime_mark_last_busy (gpadc->dev); -pm_runtime_put_autosuspend (gpadc->dev); +pm_runtime_last_busy_and_autosuspend (gpadc->dev);mutex_unlock (&gpadc->ab8500_gpadc_lock);return ret;
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH 11/27] mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper
Quoted 12 lines · Lee Jones
Quoted 10 lines · Lee Jones
Quoted 7 lines · Vinod Koul
Use the new
pm_runtime_last_busy_and_autosuspendhelper instead of open coding the same codeSigned-off-by Vinod Koul <[email protected]>--- drivers/mfd/ab8500-gpadc.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
Quoted 6 lines
Quoted 1 line
Applied with Linus' Ack.
Okay, I just had to search online for the other patches (as you left me off PATCH 00/27). It appears this approach has gone down like a lead balloon. For this reason I'm pulling these patches from my v3.19 branch.
I was about to reply to you to revert.
I need to fix the script I used to do CC on 0th patch, looks like few people were left off while collecting the names. Sorry about that
Signature · 1 line
~Vinod
Quoted 32 lines
Quoted 26 lines
Quoted 25 lines
drivers/mfd/ab8500-gpadc.c +2
-4@@ -571,8 +571,7 @@ int ab8500_gpadc_double_read_raw(struct ab8500_gpadc *gpadc, u8 channel, }/* Disable VTVout LDO this is required for GPADC */ -pm_runtime_mark_last_busy (gpadc->dev); -pm_runtime_put_autosuspend (gpadc->dev); +pm_runtime_last_busy_and_autosuspend (gpadc->dev);mutex_unlock (&gpadc->ab8500_gpadc_lock);@@ -910,8 +909,7 @@ static int ab8500_gpadc_resume(struct device *dev)if (ret)dev_err (dev,"Failed to enable vtvout LDO: %d\n" , ret); -pm_runtime_mark_last_busy (gpadc->dev); -pm_runtime_put_autosuspend (gpadc->dev); +pm_runtime_last_busy_and_autosuspend (gpadc->dev);mutex_unlock (&gpadc->ab8500_gpadc_lock);return ret;Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog