All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-04  9:41 ` Sakari Ailus
  0 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi
  Cc: laurent.pinchart, rafael, Andy Shevchenko

Hello everyone,

This set will switch the users of pm_runtime_put_autosuspend() to
__pm_runtime_put_autosuspend() while the former will soon be re-purposed
to include a call to pm_runtime_mark_last_busy(). The two are almost
always used together, apart from bugs which are likely common. Going
forward, most new users should be using pm_runtime_put_autosuspend().

Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
and pm_runtime_mark_last_busy().

The diff in these patches have been generated using the following
Coccinelle script (besides a manual change in
drivers/iio/magnetometer/af8133j.c):

----------8<-------------------
@@
expression E1;

@@

- pm_runtime_put_autosuspend(E1)
+ __pm_runtime_put_autosuspend(E1)
----------8<-------------------

These patches are on top of today's linux-next (i.e. next-20241004).

Sakari Ailus (51):
  accel/ivpu: Switch to __pm_runtime_put_autosuspend()
  bluetooth: Switch to __pm_runtime_put_autosuspend()
  bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
  hwrng: Switch to __pm_runtime_put_autosuspend()
  clk: Switch to __pm_runtime_put_autosuspend()
  crypto: Switch to __pm_runtime_put_autosuspend()
  dmaengine: Switch to __pm_runtime_put_autosuspend()
  gpio: Switch to __pm_runtime_put_autosuspend()
  drm/amd: Switch to __pm_runtime_put_autosuspend()
  drm/nouveau: Switch to __pm_runtime_put_autosuspend()
  drm/radeon: Switch to __pm_runtime_put_autosuspend()
  drm/panfrost: Switch to __pm_runtime_put_autosuspend()
  drivers: drm: Switch to __pm_runtime_put_autosuspend()
  HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
  stm class: Switch to __pm_runtime_put_autosuspend()
  i2c: Switch to __pm_runtime_put_autosuspend()
  i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
  i3c: dw: Switch to __pm_runtime_put_autosuspend()
  iio: Switch to __pm_runtime_put_autosuspend()
  Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
  Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
  iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
  irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
  mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
  media: Switch to __pm_runtime_put_autosuspend()
  mfd: Switch to __pm_runtime_put_autosuspend()
  mei: Switch to __pm_runtime_put_autosuspend()
  mmc: Switch to __pm_runtime_put_autosuspend()
  mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
  net: Switch to __pm_runtime_put_autosuspend()
  nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
  PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
  phy: motorola: phy-mapphone-mdm6600: Switch to
    __pm_runtime_put_autosuspend()
  phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
  power: Switch to __pm_runtime_put_autosuspend()
  pwm: img: Switch to __pm_runtime_put_autosuspend()
  regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
  remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
  slimbus: Switch to __pm_runtime_put_autosuspend()
  soundwire: Switch to __pm_runtime_put_autosuspend()
  spi: Switch to __pm_runtime_put_autosuspend()
  staging: Switch to __pm_runtime_put_autosuspend()
  thunderbolt: Switch to __pm_runtime_put_autosuspend()
  serial: Switch to __pm_runtime_put_autosuspend()
  usb: Switch to __pm_runtime_put_autosuspend()
  w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
  staging: greybus: Switch to __pm_runtime_put_autosuspend()
  ALSA: hda: Switch to __pm_runtime_put_autosuspend()
  ASoC: Switch to __pm_runtime_put_autosuspend()
  ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
  soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()

 drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
 drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
 drivers/bluetooth/btmtksdio.c                 |   2 +-
 drivers/bluetooth/hci_bcm.c                   |   6 +-
 drivers/bluetooth/hci_h5.c                    |   4 +-
 drivers/bluetooth/hci_intel.c                 |   6 +-
 drivers/bus/sunxi-rsb.c                       |   4 +-
 drivers/char/hw_random/cctrng.c               |   2 +-
 drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
 drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
 drivers/clk/imx/clk-scu.c                     |   2 +-
 drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
 drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
 drivers/crypto/ccree/cc_pm.c                  |   2 +-
 drivers/crypto/hisilicon/qm.c                 |   2 +-
 drivers/crypto/omap-aes-gcm.c                 |   2 +-
 drivers/crypto/omap-aes.c                     |   2 +-
 drivers/crypto/omap-des.c                     |   2 +-
 drivers/crypto/omap-sham.c                    |   2 +-
 drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
 .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
 drivers/crypto/stm32/stm32-crc32.c            |   4 +-
 drivers/crypto/stm32/stm32-cryp.c             |   2 +-
 drivers/crypto/stm32/stm32-hash.c             |   2 +-
 drivers/dma/at_xdmac.c                        |  24 +--
 drivers/dma/pl330.c                           |  14 +-
 drivers/dma/qcom/bam_dma.c                    |  10 +-
 drivers/dma/qcom/hidma.c                      |  18 +-
 drivers/dma/qcom/hidma_dbg.c                  |   2 +-
 drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
 drivers/dma/ste_dma40.c                       |  16 +-
 drivers/dma/ti/cppi41.c                       |  10 +-
 drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
 drivers/gpio/gpio-arizona.c                   |  10 +-
 drivers/gpio/gpio-mxc.c                       |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
 .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
 drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
 drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
 drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
 drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
 drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
 drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
 drivers/gpu/drm/lima/lima_sched.c             |   2 +-
 drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
 drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
 drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
 drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
 drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
 drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
 drivers/gpu/drm/panel/panel-edp.c             |   8 +-
 .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
 drivers/gpu/drm/panel/panel-simple.c          |   6 +-
 drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
 drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
 drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
 drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
 drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
 drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
 drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
 drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
 drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
 drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
 drivers/gpu/drm/tegra/submit.c                |   2 +-
 drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
 drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
 drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
 drivers/hwtracing/stm/core.c                  |   8 +-
 drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
 drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
 drivers/i2c/busses/i2c-at91-master.c          |   2 +-
 drivers/i2c/busses/i2c-cadence.c              |   2 +-
 drivers/i2c/busses/i2c-davinci.c              |   4 +-
 drivers/i2c/busses/i2c-designware-master.c    |   2 +-
 drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
 drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
 drivers/i2c/busses/i2c-i801.c                 |   4 +-
 drivers/i2c/busses/i2c-img-scb.c              |   6 +-
 drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
 drivers/i2c/busses/i2c-imx.c                  |   4 +-
 drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
 drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
 drivers/i2c/busses/i2c-omap.c                 |   6 +-
 drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
 drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
 drivers/i2c/busses/i2c-qup.c                  |   4 +-
 drivers/i2c/busses/i2c-riic.c                 |   4 +-
 drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
 drivers/i2c/busses/i2c-sprd.c                 |   4 +-
 drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
 drivers/i2c/busses/i2c-xiic.c                 |   2 +-
 drivers/i3c/master/dw-i3c-master.c            |  16 +-
 drivers/i3c/master/svc-i3c-master.c           |  16 +-
 drivers/iio/accel/bmc150-accel-core.c         |   2 +-
 drivers/iio/accel/bmi088-accel-core.c         |   6 +-
 drivers/iio/accel/fxls8962af-core.c           |   2 +-
 drivers/iio/accel/kxcjk-1013.c                |   2 +-
 drivers/iio/accel/kxsd9.c                     |   6 +-
 drivers/iio/accel/mma8452.c                   |   2 +-
 drivers/iio/accel/mma9551_core.c              |   2 +-
 drivers/iio/accel/msa311.c                    |  12 +-
 drivers/iio/adc/ab8500-gpadc.c                |   2 +-
 drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
 drivers/iio/adc/rcar-gyroadc.c                |   2 +-
 drivers/iio/adc/stm32-adc-core.c              |   2 +-
 drivers/iio/adc/stm32-adc.c                   |  12 +-
 drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
 drivers/iio/adc/ti-ads1015.c                  |   2 +-
 drivers/iio/adc/ti-ads1100.c                  |   2 +-
 drivers/iio/adc/ti-ads1119.c                  |   4 +-
 drivers/iio/chemical/atlas-sensor.c           |   4 +-
 .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
 drivers/iio/dac/stm32-dac.c                   |   6 +-
 drivers/iio/gyro/bmg160_core.c                |   2 +-
 drivers/iio/gyro/fxas21002c_core.c            |   2 +-
 drivers/iio/gyro/mpu3050-core.c               |   6 +-
 drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
 .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
 .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
 drivers/iio/imu/kmx61.c                       |   2 +-
 drivers/iio/light/apds9306.c                  |   6 +-
 drivers/iio/light/apds9960.c                  |   4 +-
 drivers/iio/light/bh1780.c                    |   2 +-
 drivers/iio/light/gp2ap002.c                  |   4 +-
 drivers/iio/light/isl29028.c                  |   2 +-
 drivers/iio/light/ltrf216a.c                  |   2 +-
 drivers/iio/light/pa12203001.c                |   2 +-
 drivers/iio/light/rpr0521.c                   |   2 +-
 drivers/iio/light/tsl2583.c                   |   2 +-
 drivers/iio/light/tsl2591.c                   |   4 +-
 drivers/iio/light/us5182d.c                   |   2 +-
 drivers/iio/light/vcnl4000.c                  |   2 +-
 drivers/iio/light/vcnl4035.c                  |   2 +-
 drivers/iio/magnetometer/af8133j.c            |   4 +-
 drivers/iio/magnetometer/ak8974.c             |   4 +-
 drivers/iio/magnetometer/ak8975.c             |   2 +-
 drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
 drivers/iio/magnetometer/tmag5273.c           |   4 +-
 drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
 drivers/iio/pressure/bmp280-core.c            |  10 +-
 drivers/iio/pressure/icp10100.c               |   2 +-
 drivers/iio/pressure/mpl115.c                 |   4 +-
 drivers/iio/pressure/zpa2326.c                |   4 +-
 .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
 drivers/iio/proximity/srf04.c                 |   2 +-
 drivers/iio/temperature/mlx90614.c            |   4 +-
 drivers/iio/temperature/mlx90632.c            |   4 +-
 drivers/iio/temperature/mlx90635.c            |   4 +-
 drivers/input/keyboard/omap4-keypad.c         |   8 +-
 drivers/input/misc/cs40l50-vibra.c            |   8 +-
 drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
 drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
 drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
 drivers/media/i2c/alvium-csi2.c               |   2 +-
 drivers/media/i2c/ccs/ccs-core.c              |  10 +-
 drivers/media/i2c/dw9719.c                    |   2 +-
 drivers/media/i2c/gc0308.c                    |   6 +-
 drivers/media/i2c/gc2145.c                    |   8 +-
 drivers/media/i2c/imx283.c                    |   6 +-
 drivers/media/i2c/imx290.c                    |   6 +-
 drivers/media/i2c/imx296.c                    |   4 +-
 drivers/media/i2c/imx415.c                    |   4 +-
 drivers/media/i2c/mt9m114.c                   |  12 +-
 drivers/media/i2c/ov2680.c                    |   2 +-
 drivers/media/i2c/ov4689.c                    |   6 +-
 drivers/media/i2c/ov5640.c                    |   8 +-
 drivers/media/i2c/ov5645.c                    |   6 +-
 drivers/media/i2c/ov5693.c                    |   2 +-
 drivers/media/i2c/ov64a40.c                   |   8 +-
 drivers/media/i2c/ov7251.c                    |   2 +-
 drivers/media/i2c/ov8858.c                    |   4 +-
 drivers/media/i2c/thp7312.c                   |   8 +-
 drivers/media/i2c/video-i2c.c                 |   8 +-
 .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
 drivers/media/platform/qcom/venus/vdec.c      |   4 +-
 drivers/media/platform/qcom/venus/venc.c      |   4 +-
 .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
 .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
 drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
 .../media/platform/verisilicon/hantro_drv.c   |   2 +-
 drivers/media/rc/gpio-ir-recv.c               |   2 +-
 drivers/mfd/arizona-irq.c                     |   2 +-
 drivers/mfd/cs40l50-core.c                    |   2 +-
 drivers/mfd/cs42l43.c                         |   2 +-
 drivers/misc/mei/client.c                     |  14 +-
 drivers/mmc/core/core.c                       |   4 +-
 drivers/mmc/host/atmel-mci.c                  |   4 +-
 drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
 drivers/mmc/host/dw_mmc.c                     |   2 +-
 drivers/mmc/host/mmci.c                       |   2 +-
 drivers/mmc/host/omap_hsmmc.c                 |   6 +-
 drivers/mmc/host/sdhci-msm.c                  |   2 +-
 drivers/mmc/host/sdhci-of-at91.c              |   2 +-
 drivers/mmc/host/sdhci-omap.c                 |   4 +-
 drivers/mmc/host/sdhci-pci-core.c             |   2 +-
 drivers/mmc/host/sdhci-pxav3.c                |   6 +-
 drivers/mmc/host/sdhci-sprd.c                 |   2 +-
 drivers/mmc/host/sdhci-xenon.c                |   2 +-
 drivers/mmc/host/sdhci_am654.c                |   2 +-
 drivers/mmc/host/tmio_mmc_core.c              |   2 +-
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
 drivers/net/ethernet/cadence/macb_main.c      |  10 +-
 drivers/net/ethernet/freescale/fec_main.c     |  16 +-
 drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
 drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
 drivers/net/ipa/ipa_interrupt.c               |   2 +-
 drivers/net/ipa/ipa_main.c                    |   2 +-
 drivers/net/ipa/ipa_modem.c                   |   8 +-
 drivers/net/ipa/ipa_smp2p.c                   |   4 +-
 drivers/net/ipa/ipa_uc.c                      |   4 +-
 drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
 drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
 drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
 drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
 drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
 drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
 drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
 drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
 drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
 drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
 drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
 drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
 drivers/nfc/trf7970a.c                        |   2 +-
 drivers/pci/pcie/portdrv.c                    |   2 +-
 drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
 drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
 drivers/power/supply/bq24190_charger.c        |  28 +--
 drivers/power/supply/twl4030_charger.c        |   2 +-
 drivers/pwm/pwm-img.c                         |   4 +-
 drivers/regulator/stm32-vrefbuf.c             |  12 +-
 drivers/remoteproc/omap_remoteproc.c          |   6 +-
 drivers/slimbus/core.c                        |   2 +-
 drivers/slimbus/messaging.c                   |   4 +-
 drivers/soc/apple/mailbox.c                   |   2 +-
 drivers/soundwire/bus.c                       |   2 +-
 drivers/soundwire/cadence_master.c            |   2 +-
 drivers/soundwire/qcom.c                      |   6 +-
 drivers/spi/atmel-quadspi.c                   |  10 +-
 drivers/spi/spi-cadence-quadspi.c             |   4 +-
 drivers/spi/spi-cadence.c                     |   2 +-
 drivers/spi/spi-dw-pci.c                      |   2 +-
 drivers/spi/spi-fsl-espi.c                    |   4 +-
 drivers/spi/spi-fsl-lpspi.c                   |   4 +-
 drivers/spi/spi-imx.c                         |   6 +-
 drivers/spi/spi-mtk-nor.c                     |   2 +-
 drivers/spi/spi-omap2-mcspi.c                 |   6 +-
 drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
 drivers/spi/spi-s3c64xx.c                     |   6 +-
 drivers/spi/spi-sprd.c                        |   2 +-
 drivers/spi/spi-stm32-qspi.c                  |  14 +-
 drivers/spi/spi-stm32.c                       |   4 +-
 drivers/spi/spi-ti-qspi.c                     |   4 +-
 drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
 drivers/spi/spi.c                             |   6 +-
 drivers/staging/greybus/gbphy.h               |   2 +-
 drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
 drivers/thunderbolt/debugfs.c                 |  22 +--
 drivers/thunderbolt/domain.c                  |   4 +-
 drivers/thunderbolt/icm.c                     |  14 +-
 drivers/thunderbolt/nhi.c                     |   2 +-
 drivers/thunderbolt/retimer.c                 |   4 +-
 drivers/thunderbolt/switch.c                  |   6 +-
 drivers/thunderbolt/tb.c                      |  18 +-
 drivers/thunderbolt/usb4_port.c               |   4 +-
 drivers/tty/serial/8250/8250_omap.c           |  18 +-
 drivers/tty/serial/8250/8250_port.c           |   4 +-
 drivers/tty/serial/fsl_lpuart.c               |   2 +-
 drivers/tty/serial/serial_core.c              |   2 +-
 drivers/tty/serial/uartlite.c                 |   4 +-
 drivers/tty/serial/xilinx_uartps.c            |   2 +-
 drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
 drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
 drivers/usb/chipidea/core.c                   |   2 +-
 drivers/usb/chipidea/otg_fsm.c                |   2 +-
 drivers/usb/dwc3/core.c                       |   2 +-
 drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
 drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
 drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
 drivers/usb/host/xhci-mtk.c                   |   2 +-
 drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
 drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
 drivers/usb/musb/musb_core.c                  |  10 +-
 drivers/usb/musb/musb_debugfs.c               |  10 +-
 drivers/usb/musb/musb_dsps.c                  |   2 +-
 drivers/usb/musb/musb_gadget.c                |   8 +-
 drivers/usb/musb/omap2430.c                   |   2 +-
 drivers/w1/masters/omap_hdq.c                 |  10 +-
 include/linux/greybus/bundle.h                |   2 +-
 sound/hda/hdac_device.c                       |   2 +-
 sound/pci/hda/cs35l41_hda.c                   |   8 +-
 sound/pci/hda/cs35l56_hda.c                   |   2 +-
 sound/pci/hda/hda_intel.c                     |   2 +-
 sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
 sound/soc/atmel/mchp-spdifrx.c                |  12 +-
 sound/soc/codecs/arizona-jack.c               |  12 +-
 sound/soc/codecs/arizona.c                    |   2 +-
 sound/soc/codecs/cs35l41.c                    |   4 +-
 sound/soc/codecs/cs35l45.c                    |   2 +-
 sound/soc/codecs/cs35l56-sdw.c                |   4 +-
 sound/soc/codecs/cs35l56-shared.c             |   2 +-
 sound/soc/codecs/cs35l56.c                    |   2 +-
 sound/soc/codecs/cs42l42-sdw.c                |   2 +-
 sound/soc/codecs/cs42l42.c                    |   4 +-
 sound/soc/codecs/cs42l43-jack.c               |  10 +-
 sound/soc/codecs/cs42l43.c                    |   4 +-
 sound/soc/codecs/hda.c                        |   6 +-
 sound/soc/codecs/madera.c                     |   6 +-
 sound/soc/codecs/max98363.c                   |   2 +-
 sound/soc/codecs/max98373-sdw.c               |   2 +-
 sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
 sound/soc/codecs/rt1308-sdw.c                 |   2 +-
 sound/soc/codecs/rt1316-sdw.c                 |   2 +-
 sound/soc/codecs/rt1318-sdw.c                 |   2 +-
 sound/soc/codecs/rt1320-sdw.c                 |   2 +-
 sound/soc/codecs/rt5682-sdw.c                 |   2 +-
 sound/soc/codecs/rt700.c                      |   4 +-
 sound/soc/codecs/rt711-sdca.c                 |   4 +-
 sound/soc/codecs/rt711.c                      |   4 +-
 sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
 sound/soc/codecs/rt712-sdca.c                 |   4 +-
 sound/soc/codecs/rt715-sdca.c                 |   2 +-
 sound/soc/codecs/rt715.c                      |   2 +-
 sound/soc/codecs/rt722-sdca.c                 |   4 +-
 sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
 sound/soc/codecs/wsa881x.c                    |   2 +-
 sound/soc/codecs/wsa884x.c                    |   2 +-
 sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
 sound/soc/intel/avs/core.c                    |   2 +-
 sound/soc/intel/avs/debugfs.c                 |   4 +-
 sound/soc/intel/avs/pcm.c                     |   2 +-
 sound/soc/intel/catpt/pcm.c                   |  12 +-
 sound/soc/intel/catpt/sysfs.c                 |   2 +-
 sound/soc/soc-component.c                     |   2 +-
 sound/soc/sof/control.c                       |   2 +-
 sound/soc/sof/debug.c                         |   2 +-
 sound/soc/sof/ipc3-dtrace.c                   |   2 +-
 sound/soc/sof/ipc4-loader.c                   |   2 +-
 sound/soc/sof/pcm.c                           |   2 +-
 sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
 .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
 sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
 sound/soc/sof/sof-client-probes.c             |   6 +-
 sound/x86/intel_hdmi_audio.c                  |   6 +-
 373 files changed, 1076 insertions(+), 1076 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-04  9:41 ` Sakari Ailus
  0 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi
  Cc: laurent.pinchart, rafael, Andy Shevchenko

Hello everyone,

This set will switch the users of pm_runtime_put_autosuspend() to
__pm_runtime_put_autosuspend() while the former will soon be re-purposed
to include a call to pm_runtime_mark_last_busy(). The two are almost
always used together, apart from bugs which are likely common. Going
forward, most new users should be using pm_runtime_put_autosuspend().

Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
and pm_runtime_mark_last_busy().

The diff in these patches have been generated using the following
Coccinelle script (besides a manual change in
drivers/iio/magnetometer/af8133j.c):

----------8<-------------------
@@
expression E1;

@@

- pm_runtime_put_autosuspend(E1)
+ __pm_runtime_put_autosuspend(E1)
----------8<-------------------

These patches are on top of today's linux-next (i.e. next-20241004).

Sakari Ailus (51):
  accel/ivpu: Switch to __pm_runtime_put_autosuspend()
  bluetooth: Switch to __pm_runtime_put_autosuspend()
  bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
  hwrng: Switch to __pm_runtime_put_autosuspend()
  clk: Switch to __pm_runtime_put_autosuspend()
  crypto: Switch to __pm_runtime_put_autosuspend()
  dmaengine: Switch to __pm_runtime_put_autosuspend()
  gpio: Switch to __pm_runtime_put_autosuspend()
  drm/amd: Switch to __pm_runtime_put_autosuspend()
  drm/nouveau: Switch to __pm_runtime_put_autosuspend()
  drm/radeon: Switch to __pm_runtime_put_autosuspend()
  drm/panfrost: Switch to __pm_runtime_put_autosuspend()
  drivers: drm: Switch to __pm_runtime_put_autosuspend()
  HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
  stm class: Switch to __pm_runtime_put_autosuspend()
  i2c: Switch to __pm_runtime_put_autosuspend()
  i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
  i3c: dw: Switch to __pm_runtime_put_autosuspend()
  iio: Switch to __pm_runtime_put_autosuspend()
  Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
  Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
  iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
  irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
  mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
  media: Switch to __pm_runtime_put_autosuspend()
  mfd: Switch to __pm_runtime_put_autosuspend()
  mei: Switch to __pm_runtime_put_autosuspend()
  mmc: Switch to __pm_runtime_put_autosuspend()
  mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
  net: Switch to __pm_runtime_put_autosuspend()
  nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
  PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
  phy: motorola: phy-mapphone-mdm6600: Switch to
    __pm_runtime_put_autosuspend()
  phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
  power: Switch to __pm_runtime_put_autosuspend()
  pwm: img: Switch to __pm_runtime_put_autosuspend()
  regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
  remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
  slimbus: Switch to __pm_runtime_put_autosuspend()
  soundwire: Switch to __pm_runtime_put_autosuspend()
  spi: Switch to __pm_runtime_put_autosuspend()
  staging: Switch to __pm_runtime_put_autosuspend()
  thunderbolt: Switch to __pm_runtime_put_autosuspend()
  serial: Switch to __pm_runtime_put_autosuspend()
  usb: Switch to __pm_runtime_put_autosuspend()
  w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
  staging: greybus: Switch to __pm_runtime_put_autosuspend()
  ALSA: hda: Switch to __pm_runtime_put_autosuspend()
  ASoC: Switch to __pm_runtime_put_autosuspend()
  ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
  soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()

 drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
 drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
 drivers/bluetooth/btmtksdio.c                 |   2 +-
 drivers/bluetooth/hci_bcm.c                   |   6 +-
 drivers/bluetooth/hci_h5.c                    |   4 +-
 drivers/bluetooth/hci_intel.c                 |   6 +-
 drivers/bus/sunxi-rsb.c                       |   4 +-
 drivers/char/hw_random/cctrng.c               |   2 +-
 drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
 drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
 drivers/clk/imx/clk-scu.c                     |   2 +-
 drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
 drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
 drivers/crypto/ccree/cc_pm.c                  |   2 +-
 drivers/crypto/hisilicon/qm.c                 |   2 +-
 drivers/crypto/omap-aes-gcm.c                 |   2 +-
 drivers/crypto/omap-aes.c                     |   2 +-
 drivers/crypto/omap-des.c                     |   2 +-
 drivers/crypto/omap-sham.c                    |   2 +-
 drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
 .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
 drivers/crypto/stm32/stm32-crc32.c            |   4 +-
 drivers/crypto/stm32/stm32-cryp.c             |   2 +-
 drivers/crypto/stm32/stm32-hash.c             |   2 +-
 drivers/dma/at_xdmac.c                        |  24 +--
 drivers/dma/pl330.c                           |  14 +-
 drivers/dma/qcom/bam_dma.c                    |  10 +-
 drivers/dma/qcom/hidma.c                      |  18 +-
 drivers/dma/qcom/hidma_dbg.c                  |   2 +-
 drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
 drivers/dma/ste_dma40.c                       |  16 +-
 drivers/dma/ti/cppi41.c                       |  10 +-
 drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
 drivers/gpio/gpio-arizona.c                   |  10 +-
 drivers/gpio/gpio-mxc.c                       |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
 .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
 drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
 drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
 drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
 drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
 drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
 drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
 drivers/gpu/drm/lima/lima_sched.c             |   2 +-
 drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
 drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
 drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
 drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
 drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
 drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
 drivers/gpu/drm/panel/panel-edp.c             |   8 +-
 .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
 drivers/gpu/drm/panel/panel-simple.c          |   6 +-
 drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
 drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
 drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
 drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
 drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
 drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
 drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
 drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
 drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
 drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
 drivers/gpu/drm/tegra/submit.c                |   2 +-
 drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
 drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
 drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
 drivers/hwtracing/stm/core.c                  |   8 +-
 drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
 drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
 drivers/i2c/busses/i2c-at91-master.c          |   2 +-
 drivers/i2c/busses/i2c-cadence.c              |   2 +-
 drivers/i2c/busses/i2c-davinci.c              |   4 +-
 drivers/i2c/busses/i2c-designware-master.c    |   2 +-
 drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
 drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
 drivers/i2c/busses/i2c-i801.c                 |   4 +-
 drivers/i2c/busses/i2c-img-scb.c              |   6 +-
 drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
 drivers/i2c/busses/i2c-imx.c                  |   4 +-
 drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
 drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
 drivers/i2c/busses/i2c-omap.c                 |   6 +-
 drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
 drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
 drivers/i2c/busses/i2c-qup.c                  |   4 +-
 drivers/i2c/busses/i2c-riic.c                 |   4 +-
 drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
 drivers/i2c/busses/i2c-sprd.c                 |   4 +-
 drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
 drivers/i2c/busses/i2c-xiic.c                 |   2 +-
 drivers/i3c/master/dw-i3c-master.c            |  16 +-
 drivers/i3c/master/svc-i3c-master.c           |  16 +-
 drivers/iio/accel/bmc150-accel-core.c         |   2 +-
 drivers/iio/accel/bmi088-accel-core.c         |   6 +-
 drivers/iio/accel/fxls8962af-core.c           |   2 +-
 drivers/iio/accel/kxcjk-1013.c                |   2 +-
 drivers/iio/accel/kxsd9.c                     |   6 +-
 drivers/iio/accel/mma8452.c                   |   2 +-
 drivers/iio/accel/mma9551_core.c              |   2 +-
 drivers/iio/accel/msa311.c                    |  12 +-
 drivers/iio/adc/ab8500-gpadc.c                |   2 +-
 drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
 drivers/iio/adc/rcar-gyroadc.c                |   2 +-
 drivers/iio/adc/stm32-adc-core.c              |   2 +-
 drivers/iio/adc/stm32-adc.c                   |  12 +-
 drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
 drivers/iio/adc/ti-ads1015.c                  |   2 +-
 drivers/iio/adc/ti-ads1100.c                  |   2 +-
 drivers/iio/adc/ti-ads1119.c                  |   4 +-
 drivers/iio/chemical/atlas-sensor.c           |   4 +-
 .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
 drivers/iio/dac/stm32-dac.c                   |   6 +-
 drivers/iio/gyro/bmg160_core.c                |   2 +-
 drivers/iio/gyro/fxas21002c_core.c            |   2 +-
 drivers/iio/gyro/mpu3050-core.c               |   6 +-
 drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
 .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
 .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
 drivers/iio/imu/kmx61.c                       |   2 +-
 drivers/iio/light/apds9306.c                  |   6 +-
 drivers/iio/light/apds9960.c                  |   4 +-
 drivers/iio/light/bh1780.c                    |   2 +-
 drivers/iio/light/gp2ap002.c                  |   4 +-
 drivers/iio/light/isl29028.c                  |   2 +-
 drivers/iio/light/ltrf216a.c                  |   2 +-
 drivers/iio/light/pa12203001.c                |   2 +-
 drivers/iio/light/rpr0521.c                   |   2 +-
 drivers/iio/light/tsl2583.c                   |   2 +-
 drivers/iio/light/tsl2591.c                   |   4 +-
 drivers/iio/light/us5182d.c                   |   2 +-
 drivers/iio/light/vcnl4000.c                  |   2 +-
 drivers/iio/light/vcnl4035.c                  |   2 +-
 drivers/iio/magnetometer/af8133j.c            |   4 +-
 drivers/iio/magnetometer/ak8974.c             |   4 +-
 drivers/iio/magnetometer/ak8975.c             |   2 +-
 drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
 drivers/iio/magnetometer/tmag5273.c           |   4 +-
 drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
 drivers/iio/pressure/bmp280-core.c            |  10 +-
 drivers/iio/pressure/icp10100.c               |   2 +-
 drivers/iio/pressure/mpl115.c                 |   4 +-
 drivers/iio/pressure/zpa2326.c                |   4 +-
 .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
 drivers/iio/proximity/srf04.c                 |   2 +-
 drivers/iio/temperature/mlx90614.c            |   4 +-
 drivers/iio/temperature/mlx90632.c            |   4 +-
 drivers/iio/temperature/mlx90635.c            |   4 +-
 drivers/input/keyboard/omap4-keypad.c         |   8 +-
 drivers/input/misc/cs40l50-vibra.c            |   8 +-
 drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
 drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
 drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
 drivers/media/i2c/alvium-csi2.c               |   2 +-
 drivers/media/i2c/ccs/ccs-core.c              |  10 +-
 drivers/media/i2c/dw9719.c                    |   2 +-
 drivers/media/i2c/gc0308.c                    |   6 +-
 drivers/media/i2c/gc2145.c                    |   8 +-
 drivers/media/i2c/imx283.c                    |   6 +-
 drivers/media/i2c/imx290.c                    |   6 +-
 drivers/media/i2c/imx296.c                    |   4 +-
 drivers/media/i2c/imx415.c                    |   4 +-
 drivers/media/i2c/mt9m114.c                   |  12 +-
 drivers/media/i2c/ov2680.c                    |   2 +-
 drivers/media/i2c/ov4689.c                    |   6 +-
 drivers/media/i2c/ov5640.c                    |   8 +-
 drivers/media/i2c/ov5645.c                    |   6 +-
 drivers/media/i2c/ov5693.c                    |   2 +-
 drivers/media/i2c/ov64a40.c                   |   8 +-
 drivers/media/i2c/ov7251.c                    |   2 +-
 drivers/media/i2c/ov8858.c                    |   4 +-
 drivers/media/i2c/thp7312.c                   |   8 +-
 drivers/media/i2c/video-i2c.c                 |   8 +-
 .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
 drivers/media/platform/qcom/venus/vdec.c      |   4 +-
 drivers/media/platform/qcom/venus/venc.c      |   4 +-
 .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
 .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
 drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
 .../media/platform/verisilicon/hantro_drv.c   |   2 +-
 drivers/media/rc/gpio-ir-recv.c               |   2 +-
 drivers/mfd/arizona-irq.c                     |   2 +-
 drivers/mfd/cs40l50-core.c                    |   2 +-
 drivers/mfd/cs42l43.c                         |   2 +-
 drivers/misc/mei/client.c                     |  14 +-
 drivers/mmc/core/core.c                       |   4 +-
 drivers/mmc/host/atmel-mci.c                  |   4 +-
 drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
 drivers/mmc/host/dw_mmc.c                     |   2 +-
 drivers/mmc/host/mmci.c                       |   2 +-
 drivers/mmc/host/omap_hsmmc.c                 |   6 +-
 drivers/mmc/host/sdhci-msm.c                  |   2 +-
 drivers/mmc/host/sdhci-of-at91.c              |   2 +-
 drivers/mmc/host/sdhci-omap.c                 |   4 +-
 drivers/mmc/host/sdhci-pci-core.c             |   2 +-
 drivers/mmc/host/sdhci-pxav3.c                |   6 +-
 drivers/mmc/host/sdhci-sprd.c                 |   2 +-
 drivers/mmc/host/sdhci-xenon.c                |   2 +-
 drivers/mmc/host/sdhci_am654.c                |   2 +-
 drivers/mmc/host/tmio_mmc_core.c              |   2 +-
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
 drivers/net/ethernet/cadence/macb_main.c      |  10 +-
 drivers/net/ethernet/freescale/fec_main.c     |  16 +-
 drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
 drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
 drivers/net/ipa/ipa_interrupt.c               |   2 +-
 drivers/net/ipa/ipa_main.c                    |   2 +-
 drivers/net/ipa/ipa_modem.c                   |   8 +-
 drivers/net/ipa/ipa_smp2p.c                   |   4 +-
 drivers/net/ipa/ipa_uc.c                      |   4 +-
 drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
 drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
 drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
 drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
 drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
 drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
 drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
 drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
 drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
 drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
 drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
 drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
 drivers/nfc/trf7970a.c                        |   2 +-
 drivers/pci/pcie/portdrv.c                    |   2 +-
 drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
 drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
 drivers/power/supply/bq24190_charger.c        |  28 +--
 drivers/power/supply/twl4030_charger.c        |   2 +-
 drivers/pwm/pwm-img.c                         |   4 +-
 drivers/regulator/stm32-vrefbuf.c             |  12 +-
 drivers/remoteproc/omap_remoteproc.c          |   6 +-
 drivers/slimbus/core.c                        |   2 +-
 drivers/slimbus/messaging.c                   |   4 +-
 drivers/soc/apple/mailbox.c                   |   2 +-
 drivers/soundwire/bus.c                       |   2 +-
 drivers/soundwire/cadence_master.c            |   2 +-
 drivers/soundwire/qcom.c                      |   6 +-
 drivers/spi/atmel-quadspi.c                   |  10 +-
 drivers/spi/spi-cadence-quadspi.c             |   4 +-
 drivers/spi/spi-cadence.c                     |   2 +-
 drivers/spi/spi-dw-pci.c                      |   2 +-
 drivers/spi/spi-fsl-espi.c                    |   4 +-
 drivers/spi/spi-fsl-lpspi.c                   |   4 +-
 drivers/spi/spi-imx.c                         |   6 +-
 drivers/spi/spi-mtk-nor.c                     |   2 +-
 drivers/spi/spi-omap2-mcspi.c                 |   6 +-
 drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
 drivers/spi/spi-s3c64xx.c                     |   6 +-
 drivers/spi/spi-sprd.c                        |   2 +-
 drivers/spi/spi-stm32-qspi.c                  |  14 +-
 drivers/spi/spi-stm32.c                       |   4 +-
 drivers/spi/spi-ti-qspi.c                     |   4 +-
 drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
 drivers/spi/spi.c                             |   6 +-
 drivers/staging/greybus/gbphy.h               |   2 +-
 drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
 drivers/thunderbolt/debugfs.c                 |  22 +--
 drivers/thunderbolt/domain.c                  |   4 +-
 drivers/thunderbolt/icm.c                     |  14 +-
 drivers/thunderbolt/nhi.c                     |   2 +-
 drivers/thunderbolt/retimer.c                 |   4 +-
 drivers/thunderbolt/switch.c                  |   6 +-
 drivers/thunderbolt/tb.c                      |  18 +-
 drivers/thunderbolt/usb4_port.c               |   4 +-
 drivers/tty/serial/8250/8250_omap.c           |  18 +-
 drivers/tty/serial/8250/8250_port.c           |   4 +-
 drivers/tty/serial/fsl_lpuart.c               |   2 +-
 drivers/tty/serial/serial_core.c              |   2 +-
 drivers/tty/serial/uartlite.c                 |   4 +-
 drivers/tty/serial/xilinx_uartps.c            |   2 +-
 drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
 drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
 drivers/usb/chipidea/core.c                   |   2 +-
 drivers/usb/chipidea/otg_fsm.c                |   2 +-
 drivers/usb/dwc3/core.c                       |   2 +-
 drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
 drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
 drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
 drivers/usb/host/xhci-mtk.c                   |   2 +-
 drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
 drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
 drivers/usb/musb/musb_core.c                  |  10 +-
 drivers/usb/musb/musb_debugfs.c               |  10 +-
 drivers/usb/musb/musb_dsps.c                  |   2 +-
 drivers/usb/musb/musb_gadget.c                |   8 +-
 drivers/usb/musb/omap2430.c                   |   2 +-
 drivers/w1/masters/omap_hdq.c                 |  10 +-
 include/linux/greybus/bundle.h                |   2 +-
 sound/hda/hdac_device.c                       |   2 +-
 sound/pci/hda/cs35l41_hda.c                   |   8 +-
 sound/pci/hda/cs35l56_hda.c                   |   2 +-
 sound/pci/hda/hda_intel.c                     |   2 +-
 sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
 sound/soc/atmel/mchp-spdifrx.c                |  12 +-
 sound/soc/codecs/arizona-jack.c               |  12 +-
 sound/soc/codecs/arizona.c                    |   2 +-
 sound/soc/codecs/cs35l41.c                    |   4 +-
 sound/soc/codecs/cs35l45.c                    |   2 +-
 sound/soc/codecs/cs35l56-sdw.c                |   4 +-
 sound/soc/codecs/cs35l56-shared.c             |   2 +-
 sound/soc/codecs/cs35l56.c                    |   2 +-
 sound/soc/codecs/cs42l42-sdw.c                |   2 +-
 sound/soc/codecs/cs42l42.c                    |   4 +-
 sound/soc/codecs/cs42l43-jack.c               |  10 +-
 sound/soc/codecs/cs42l43.c                    |   4 +-
 sound/soc/codecs/hda.c                        |   6 +-
 sound/soc/codecs/madera.c                     |   6 +-
 sound/soc/codecs/max98363.c                   |   2 +-
 sound/soc/codecs/max98373-sdw.c               |   2 +-
 sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
 sound/soc/codecs/rt1308-sdw.c                 |   2 +-
 sound/soc/codecs/rt1316-sdw.c                 |   2 +-
 sound/soc/codecs/rt1318-sdw.c                 |   2 +-
 sound/soc/codecs/rt1320-sdw.c                 |   2 +-
 sound/soc/codecs/rt5682-sdw.c                 |   2 +-
 sound/soc/codecs/rt700.c                      |   4 +-
 sound/soc/codecs/rt711-sdca.c                 |   4 +-
 sound/soc/codecs/rt711.c                      |   4 +-
 sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
 sound/soc/codecs/rt712-sdca.c                 |   4 +-
 sound/soc/codecs/rt715-sdca.c                 |   2 +-
 sound/soc/codecs/rt715.c                      |   2 +-
 sound/soc/codecs/rt722-sdca.c                 |   4 +-
 sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
 sound/soc/codecs/wsa881x.c                    |   2 +-
 sound/soc/codecs/wsa884x.c                    |   2 +-
 sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
 sound/soc/intel/avs/core.c                    |   2 +-
 sound/soc/intel/avs/debugfs.c                 |   4 +-
 sound/soc/intel/avs/pcm.c                     |   2 +-
 sound/soc/intel/catpt/pcm.c                   |  12 +-
 sound/soc/intel/catpt/sysfs.c                 |   2 +-
 sound/soc/soc-component.c                     |   2 +-
 sound/soc/sof/control.c                       |   2 +-
 sound/soc/sof/debug.c                         |   2 +-
 sound/soc/sof/ipc3-dtrace.c                   |   2 +-
 sound/soc/sof/ipc4-loader.c                   |   2 +-
 sound/soc/sof/pcm.c                           |   2 +-
 sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
 .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
 sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
 sound/soc/sof/sof-client-probes.c             |   6 +-
 sound/x86/intel_hdmi_audio.c                  |   6 +-
 373 files changed, 1076 insertions(+), 1076 deletions(-)

-- 
2.39.5


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-04  9:41 ` Sakari Ailus
  0 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi
  Cc: laurent.pinchart, rafael, Andy Shevchenko

Hello everyone,

This set will switch the users of pm_runtime_put_autosuspend() to
__pm_runtime_put_autosuspend() while the former will soon be re-purposed
to include a call to pm_runtime_mark_last_busy(). The two are almost
always used together, apart from bugs which are likely common. Going
forward, most new users should be using pm_runtime_put_autosuspend().

Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
and pm_runtime_mark_last_busy().

The diff in these patches have been generated using the following
Coccinelle script (besides a manual change in
drivers/iio/magnetometer/af8133j.c):

----------8<-------------------
@@
expression E1;

@@

- pm_runtime_put_autosuspend(E1)
+ __pm_runtime_put_autosuspend(E1)
----------8<-------------------

These patches are on top of today's linux-next (i.e. next-20241004).

Sakari Ailus (51):
  accel/ivpu: Switch to __pm_runtime_put_autosuspend()
  bluetooth: Switch to __pm_runtime_put_autosuspend()
  bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
  hwrng: Switch to __pm_runtime_put_autosuspend()
  clk: Switch to __pm_runtime_put_autosuspend()
  crypto: Switch to __pm_runtime_put_autosuspend()
  dmaengine: Switch to __pm_runtime_put_autosuspend()
  gpio: Switch to __pm_runtime_put_autosuspend()
  drm/amd: Switch to __pm_runtime_put_autosuspend()
  drm/nouveau: Switch to __pm_runtime_put_autosuspend()
  drm/radeon: Switch to __pm_runtime_put_autosuspend()
  drm/panfrost: Switch to __pm_runtime_put_autosuspend()
  drivers: drm: Switch to __pm_runtime_put_autosuspend()
  HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
  stm class: Switch to __pm_runtime_put_autosuspend()
  i2c: Switch to __pm_runtime_put_autosuspend()
  i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
  i3c: dw: Switch to __pm_runtime_put_autosuspend()
  iio: Switch to __pm_runtime_put_autosuspend()
  Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
  Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
  iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
  irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
  mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
  media: Switch to __pm_runtime_put_autosuspend()
  mfd: Switch to __pm_runtime_put_autosuspend()
  mei: Switch to __pm_runtime_put_autosuspend()
  mmc: Switch to __pm_runtime_put_autosuspend()
  mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
  net: Switch to __pm_runtime_put_autosuspend()
  nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
  PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
  phy: motorola: phy-mapphone-mdm6600: Switch to
    __pm_runtime_put_autosuspend()
  phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
  power: Switch to __pm_runtime_put_autosuspend()
  pwm: img: Switch to __pm_runtime_put_autosuspend()
  regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
  remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
  slimbus: Switch to __pm_runtime_put_autosuspend()
  soundwire: Switch to __pm_runtime_put_autosuspend()
  spi: Switch to __pm_runtime_put_autosuspend()
  staging: Switch to __pm_runtime_put_autosuspend()
  thunderbolt: Switch to __pm_runtime_put_autosuspend()
  serial: Switch to __pm_runtime_put_autosuspend()
  usb: Switch to __pm_runtime_put_autosuspend()
  w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
  staging: greybus: Switch to __pm_runtime_put_autosuspend()
  ALSA: hda: Switch to __pm_runtime_put_autosuspend()
  ASoC: Switch to __pm_runtime_put_autosuspend()
  ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
  soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()

 drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
 drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
 drivers/bluetooth/btmtksdio.c                 |   2 +-
 drivers/bluetooth/hci_bcm.c                   |   6 +-
 drivers/bluetooth/hci_h5.c                    |   4 +-
 drivers/bluetooth/hci_intel.c                 |   6 +-
 drivers/bus/sunxi-rsb.c                       |   4 +-
 drivers/char/hw_random/cctrng.c               |   2 +-
 drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
 drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
 drivers/clk/imx/clk-scu.c                     |   2 +-
 drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
 drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
 drivers/crypto/ccree/cc_pm.c                  |   2 +-
 drivers/crypto/hisilicon/qm.c                 |   2 +-
 drivers/crypto/omap-aes-gcm.c                 |   2 +-
 drivers/crypto/omap-aes.c                     |   2 +-
 drivers/crypto/omap-des.c                     |   2 +-
 drivers/crypto/omap-sham.c                    |   2 +-
 drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
 .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
 drivers/crypto/stm32/stm32-crc32.c            |   4 +-
 drivers/crypto/stm32/stm32-cryp.c             |   2 +-
 drivers/crypto/stm32/stm32-hash.c             |   2 +-
 drivers/dma/at_xdmac.c                        |  24 +--
 drivers/dma/pl330.c                           |  14 +-
 drivers/dma/qcom/bam_dma.c                    |  10 +-
 drivers/dma/qcom/hidma.c                      |  18 +-
 drivers/dma/qcom/hidma_dbg.c                  |   2 +-
 drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
 drivers/dma/ste_dma40.c                       |  16 +-
 drivers/dma/ti/cppi41.c                       |  10 +-
 drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
 drivers/gpio/gpio-arizona.c                   |  10 +-
 drivers/gpio/gpio-mxc.c                       |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
 .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
 drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
 drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
 drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
 drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
 drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
 drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
 drivers/gpu/drm/lima/lima_sched.c             |   2 +-
 drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
 drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
 drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
 drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
 drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
 drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
 drivers/gpu/drm/panel/panel-edp.c             |   8 +-
 .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
 drivers/gpu/drm/panel/panel-simple.c          |   6 +-
 drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
 drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
 drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
 drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
 drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
 drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
 drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
 drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
 drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
 drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
 drivers/gpu/drm/tegra/submit.c                |   2 +-
 drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
 drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
 drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
 drivers/hwtracing/stm/core.c                  |   8 +-
 drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
 drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
 drivers/i2c/busses/i2c-at91-master.c          |   2 +-
 drivers/i2c/busses/i2c-cadence.c              |   2 +-
 drivers/i2c/busses/i2c-davinci.c              |   4 +-
 drivers/i2c/busses/i2c-designware-master.c    |   2 +-
 drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
 drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
 drivers/i2c/busses/i2c-i801.c                 |   4 +-
 drivers/i2c/busses/i2c-img-scb.c              |   6 +-
 drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
 drivers/i2c/busses/i2c-imx.c                  |   4 +-
 drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
 drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
 drivers/i2c/busses/i2c-omap.c                 |   6 +-
 drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
 drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
 drivers/i2c/busses/i2c-qup.c                  |   4 +-
 drivers/i2c/busses/i2c-riic.c                 |   4 +-
 drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
 drivers/i2c/busses/i2c-sprd.c                 |   4 +-
 drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
 drivers/i2c/busses/i2c-xiic.c                 |   2 +-
 drivers/i3c/master/dw-i3c-master.c            |  16 +-
 drivers/i3c/master/svc-i3c-master.c           |  16 +-
 drivers/iio/accel/bmc150-accel-core.c         |   2 +-
 drivers/iio/accel/bmi088-accel-core.c         |   6 +-
 drivers/iio/accel/fxls8962af-core.c           |   2 +-
 drivers/iio/accel/kxcjk-1013.c                |   2 +-
 drivers/iio/accel/kxsd9.c                     |   6 +-
 drivers/iio/accel/mma8452.c                   |   2 +-
 drivers/iio/accel/mma9551_core.c              |   2 +-
 drivers/iio/accel/msa311.c                    |  12 +-
 drivers/iio/adc/ab8500-gpadc.c                |   2 +-
 drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
 drivers/iio/adc/rcar-gyroadc.c                |   2 +-
 drivers/iio/adc/stm32-adc-core.c              |   2 +-
 drivers/iio/adc/stm32-adc.c                   |  12 +-
 drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
 drivers/iio/adc/ti-ads1015.c                  |   2 +-
 drivers/iio/adc/ti-ads1100.c                  |   2 +-
 drivers/iio/adc/ti-ads1119.c                  |   4 +-
 drivers/iio/chemical/atlas-sensor.c           |   4 +-
 .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
 drivers/iio/dac/stm32-dac.c                   |   6 +-
 drivers/iio/gyro/bmg160_core.c                |   2 +-
 drivers/iio/gyro/fxas21002c_core.c            |   2 +-
 drivers/iio/gyro/mpu3050-core.c               |   6 +-
 drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
 .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
 .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
 drivers/iio/imu/kmx61.c                       |   2 +-
 drivers/iio/light/apds9306.c                  |   6 +-
 drivers/iio/light/apds9960.c                  |   4 +-
 drivers/iio/light/bh1780.c                    |   2 +-
 drivers/iio/light/gp2ap002.c                  |   4 +-
 drivers/iio/light/isl29028.c                  |   2 +-
 drivers/iio/light/ltrf216a.c                  |   2 +-
 drivers/iio/light/pa12203001.c                |   2 +-
 drivers/iio/light/rpr0521.c                   |   2 +-
 drivers/iio/light/tsl2583.c                   |   2 +-
 drivers/iio/light/tsl2591.c                   |   4 +-
 drivers/iio/light/us5182d.c                   |   2 +-
 drivers/iio/light/vcnl4000.c                  |   2 +-
 drivers/iio/light/vcnl4035.c                  |   2 +-
 drivers/iio/magnetometer/af8133j.c            |   4 +-
 drivers/iio/magnetometer/ak8974.c             |   4 +-
 drivers/iio/magnetometer/ak8975.c             |   2 +-
 drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
 drivers/iio/magnetometer/tmag5273.c           |   4 +-
 drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
 drivers/iio/pressure/bmp280-core.c            |  10 +-
 drivers/iio/pressure/icp10100.c               |   2 +-
 drivers/iio/pressure/mpl115.c                 |   4 +-
 drivers/iio/pressure/zpa2326.c                |   4 +-
 .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
 drivers/iio/proximity/srf04.c                 |   2 +-
 drivers/iio/temperature/mlx90614.c            |   4 +-
 drivers/iio/temperature/mlx90632.c            |   4 +-
 drivers/iio/temperature/mlx90635.c            |   4 +-
 drivers/input/keyboard/omap4-keypad.c         |   8 +-
 drivers/input/misc/cs40l50-vibra.c            |   8 +-
 drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
 drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
 drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
 drivers/media/i2c/alvium-csi2.c               |   2 +-
 drivers/media/i2c/ccs/ccs-core.c              |  10 +-
 drivers/media/i2c/dw9719.c                    |   2 +-
 drivers/media/i2c/gc0308.c                    |   6 +-
 drivers/media/i2c/gc2145.c                    |   8 +-
 drivers/media/i2c/imx283.c                    |   6 +-
 drivers/media/i2c/imx290.c                    |   6 +-
 drivers/media/i2c/imx296.c                    |   4 +-
 drivers/media/i2c/imx415.c                    |   4 +-
 drivers/media/i2c/mt9m114.c                   |  12 +-
 drivers/media/i2c/ov2680.c                    |   2 +-
 drivers/media/i2c/ov4689.c                    |   6 +-
 drivers/media/i2c/ov5640.c                    |   8 +-
 drivers/media/i2c/ov5645.c                    |   6 +-
 drivers/media/i2c/ov5693.c                    |   2 +-
 drivers/media/i2c/ov64a40.c                   |   8 +-
 drivers/media/i2c/ov7251.c                    |   2 +-
 drivers/media/i2c/ov8858.c                    |   4 +-
 drivers/media/i2c/thp7312.c                   |   8 +-
 drivers/media/i2c/video-i2c.c                 |   8 +-
 .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
 drivers/media/platform/qcom/venus/vdec.c      |   4 +-
 drivers/media/platform/qcom/venus/venc.c      |   4 +-
 .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
 .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
 drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
 .../media/platform/verisilicon/hantro_drv.c   |   2 +-
 drivers/media/rc/gpio-ir-recv.c               |   2 +-
 drivers/mfd/arizona-irq.c                     |   2 +-
 drivers/mfd/cs40l50-core.c                    |   2 +-
 drivers/mfd/cs42l43.c                         |   2 +-
 drivers/misc/mei/client.c                     |  14 +-
 drivers/mmc/core/core.c                       |   4 +-
 drivers/mmc/host/atmel-mci.c                  |   4 +-
 drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
 drivers/mmc/host/dw_mmc.c                     |   2 +-
 drivers/mmc/host/mmci.c                       |   2 +-
 drivers/mmc/host/omap_hsmmc.c                 |   6 +-
 drivers/mmc/host/sdhci-msm.c                  |   2 +-
 drivers/mmc/host/sdhci-of-at91.c              |   2 +-
 drivers/mmc/host/sdhci-omap.c                 |   4 +-
 drivers/mmc/host/sdhci-pci-core.c             |   2 +-
 drivers/mmc/host/sdhci-pxav3.c                |   6 +-
 drivers/mmc/host/sdhci-sprd.c                 |   2 +-
 drivers/mmc/host/sdhci-xenon.c                |   2 +-
 drivers/mmc/host/sdhci_am654.c                |   2 +-
 drivers/mmc/host/tmio_mmc_core.c              |   2 +-
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
 drivers/net/ethernet/cadence/macb_main.c      |  10 +-
 drivers/net/ethernet/freescale/fec_main.c     |  16 +-
 drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
 drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
 drivers/net/ipa/ipa_interrupt.c               |   2 +-
 drivers/net/ipa/ipa_main.c                    |   2 +-
 drivers/net/ipa/ipa_modem.c                   |   8 +-
 drivers/net/ipa/ipa_smp2p.c                   |   4 +-
 drivers/net/ipa/ipa_uc.c                      |   4 +-
 drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
 drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
 drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
 drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
 drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
 drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
 drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
 drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
 drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
 drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
 drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
 drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
 drivers/nfc/trf7970a.c                        |   2 +-
 drivers/pci/pcie/portdrv.c                    |   2 +-
 drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
 drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
 drivers/power/supply/bq24190_charger.c        |  28 +--
 drivers/power/supply/twl4030_charger.c        |   2 +-
 drivers/pwm/pwm-img.c                         |   4 +-
 drivers/regulator/stm32-vrefbuf.c             |  12 +-
 drivers/remoteproc/omap_remoteproc.c          |   6 +-
 drivers/slimbus/core.c                        |   2 +-
 drivers/slimbus/messaging.c                   |   4 +-
 drivers/soc/apple/mailbox.c                   |   2 +-
 drivers/soundwire/bus.c                       |   2 +-
 drivers/soundwire/cadence_master.c            |   2 +-
 drivers/soundwire/qcom.c                      |   6 +-
 drivers/spi/atmel-quadspi.c                   |  10 +-
 drivers/spi/spi-cadence-quadspi.c             |   4 +-
 drivers/spi/spi-cadence.c                     |   2 +-
 drivers/spi/spi-dw-pci.c                      |   2 +-
 drivers/spi/spi-fsl-espi.c                    |   4 +-
 drivers/spi/spi-fsl-lpspi.c                   |   4 +-
 drivers/spi/spi-imx.c                         |   6 +-
 drivers/spi/spi-mtk-nor.c                     |   2 +-
 drivers/spi/spi-omap2-mcspi.c                 |   6 +-
 drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
 drivers/spi/spi-s3c64xx.c                     |   6 +-
 drivers/spi/spi-sprd.c                        |   2 +-
 drivers/spi/spi-stm32-qspi.c                  |  14 +-
 drivers/spi/spi-stm32.c                       |   4 +-
 drivers/spi/spi-ti-qspi.c                     |   4 +-
 drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
 drivers/spi/spi.c                             |   6 +-
 drivers/staging/greybus/gbphy.h               |   2 +-
 drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
 drivers/thunderbolt/debugfs.c                 |  22 +--
 drivers/thunderbolt/domain.c                  |   4 +-
 drivers/thunderbolt/icm.c                     |  14 +-
 drivers/thunderbolt/nhi.c                     |   2 +-
 drivers/thunderbolt/retimer.c                 |   4 +-
 drivers/thunderbolt/switch.c                  |   6 +-
 drivers/thunderbolt/tb.c                      |  18 +-
 drivers/thunderbolt/usb4_port.c               |   4 +-
 drivers/tty/serial/8250/8250_omap.c           |  18 +-
 drivers/tty/serial/8250/8250_port.c           |   4 +-
 drivers/tty/serial/fsl_lpuart.c               |   2 +-
 drivers/tty/serial/serial_core.c              |   2 +-
 drivers/tty/serial/uartlite.c                 |   4 +-
 drivers/tty/serial/xilinx_uartps.c            |   2 +-
 drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
 drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
 drivers/usb/chipidea/core.c                   |   2 +-
 drivers/usb/chipidea/otg_fsm.c                |   2 +-
 drivers/usb/dwc3/core.c                       |   2 +-
 drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
 drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
 drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
 drivers/usb/host/xhci-mtk.c                   |   2 +-
 drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
 drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
 drivers/usb/musb/musb_core.c                  |  10 +-
 drivers/usb/musb/musb_debugfs.c               |  10 +-
 drivers/usb/musb/musb_dsps.c                  |   2 +-
 drivers/usb/musb/musb_gadget.c                |   8 +-
 drivers/usb/musb/omap2430.c                   |   2 +-
 drivers/w1/masters/omap_hdq.c                 |  10 +-
 include/linux/greybus/bundle.h                |   2 +-
 sound/hda/hdac_device.c                       |   2 +-
 sound/pci/hda/cs35l41_hda.c                   |   8 +-
 sound/pci/hda/cs35l56_hda.c                   |   2 +-
 sound/pci/hda/hda_intel.c                     |   2 +-
 sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
 sound/soc/atmel/mchp-spdifrx.c                |  12 +-
 sound/soc/codecs/arizona-jack.c               |  12 +-
 sound/soc/codecs/arizona.c                    |   2 +-
 sound/soc/codecs/cs35l41.c                    |   4 +-
 sound/soc/codecs/cs35l45.c                    |   2 +-
 sound/soc/codecs/cs35l56-sdw.c                |   4 +-
 sound/soc/codecs/cs35l56-shared.c             |   2 +-
 sound/soc/codecs/cs35l56.c                    |   2 +-
 sound/soc/codecs/cs42l42-sdw.c                |   2 +-
 sound/soc/codecs/cs42l42.c                    |   4 +-
 sound/soc/codecs/cs42l43-jack.c               |  10 +-
 sound/soc/codecs/cs42l43.c                    |   4 +-
 sound/soc/codecs/hda.c                        |   6 +-
 sound/soc/codecs/madera.c                     |   6 +-
 sound/soc/codecs/max98363.c                   |   2 +-
 sound/soc/codecs/max98373-sdw.c               |   2 +-
 sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
 sound/soc/codecs/rt1308-sdw.c                 |   2 +-
 sound/soc/codecs/rt1316-sdw.c                 |   2 +-
 sound/soc/codecs/rt1318-sdw.c                 |   2 +-
 sound/soc/codecs/rt1320-sdw.c                 |   2 +-
 sound/soc/codecs/rt5682-sdw.c                 |   2 +-
 sound/soc/codecs/rt700.c                      |   4 +-
 sound/soc/codecs/rt711-sdca.c                 |   4 +-
 sound/soc/codecs/rt711.c                      |   4 +-
 sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
 sound/soc/codecs/rt712-sdca.c                 |   4 +-
 sound/soc/codecs/rt715-sdca.c                 |   2 +-
 sound/soc/codecs/rt715.c                      |   2 +-
 sound/soc/codecs/rt722-sdca.c                 |   4 +-
 sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
 sound/soc/codecs/wsa881x.c                    |   2 +-
 sound/soc/codecs/wsa884x.c                    |   2 +-
 sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
 sound/soc/intel/avs/core.c                    |   2 +-
 sound/soc/intel/avs/debugfs.c                 |   4 +-
 sound/soc/intel/avs/pcm.c                     |   2 +-
 sound/soc/intel/catpt/pcm.c                   |  12 +-
 sound/soc/intel/catpt/sysfs.c                 |   2 +-
 sound/soc/soc-component.c                     |   2 +-
 sound/soc/sof/control.c                       |   2 +-
 sound/soc/sof/debug.c                         |   2 +-
 sound/soc/sof/ipc3-dtrace.c                   |   2 +-
 sound/soc/sof/ipc4-loader.c                   |   2 +-
 sound/soc/sof/pcm.c                           |   2 +-
 sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
 .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
 sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
 sound/soc/sof/sof-client-probes.c             |   6 +-
 sound/x86/intel_hdmi_audio.c                  |   6 +-
 373 files changed, 1076 insertions(+), 1076 deletions(-)

-- 
2.39.5


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-04  9:41 ` Sakari Ailus
  0 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi
  Cc: laurent.pinchart, rafael, Andy Shevchenko

Hello everyone,

This set will switch the users of pm_runtime_put_autosuspend() to
__pm_runtime_put_autosuspend() while the former will soon be re-purposed
to include a call to pm_runtime_mark_last_busy(). The two are almost
always used together, apart from bugs which are likely common. Going
forward, most new users should be using pm_runtime_put_autosuspend().

Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
and pm_runtime_mark_last_busy().

The diff in these patches have been generated using the following
Coccinelle script (besides a manual change in
drivers/iio/magnetometer/af8133j.c):

----------8<-------------------
@@
expression E1;

@@

- pm_runtime_put_autosuspend(E1)
+ __pm_runtime_put_autosuspend(E1)
----------8<-------------------

These patches are on top of today's linux-next (i.e. next-20241004).

Sakari Ailus (51):
  accel/ivpu: Switch to __pm_runtime_put_autosuspend()
  bluetooth: Switch to __pm_runtime_put_autosuspend()
  bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
  hwrng: Switch to __pm_runtime_put_autosuspend()
  clk: Switch to __pm_runtime_put_autosuspend()
  crypto: Switch to __pm_runtime_put_autosuspend()
  dmaengine: Switch to __pm_runtime_put_autosuspend()
  gpio: Switch to __pm_runtime_put_autosuspend()
  drm/amd: Switch to __pm_runtime_put_autosuspend()
  drm/nouveau: Switch to __pm_runtime_put_autosuspend()
  drm/radeon: Switch to __pm_runtime_put_autosuspend()
  drm/panfrost: Switch to __pm_runtime_put_autosuspend()
  drivers: drm: Switch to __pm_runtime_put_autosuspend()
  HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
  stm class: Switch to __pm_runtime_put_autosuspend()
  i2c: Switch to __pm_runtime_put_autosuspend()
  i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
  i3c: dw: Switch to __pm_runtime_put_autosuspend()
  iio: Switch to __pm_runtime_put_autosuspend()
  Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
  Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
  iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
  irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
  mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
  media: Switch to __pm_runtime_put_autosuspend()
  mfd: Switch to __pm_runtime_put_autosuspend()
  mei: Switch to __pm_runtime_put_autosuspend()
  mmc: Switch to __pm_runtime_put_autosuspend()
  mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
  net: Switch to __pm_runtime_put_autosuspend()
  nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
  PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
  phy: motorola: phy-mapphone-mdm6600: Switch to
    __pm_runtime_put_autosuspend()
  phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
  power: Switch to __pm_runtime_put_autosuspend()
  pwm: img: Switch to __pm_runtime_put_autosuspend()
  regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
  remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
  slimbus: Switch to __pm_runtime_put_autosuspend()
  soundwire: Switch to __pm_runtime_put_autosuspend()
  spi: Switch to __pm_runtime_put_autosuspend()
  staging: Switch to __pm_runtime_put_autosuspend()
  thunderbolt: Switch to __pm_runtime_put_autosuspend()
  serial: Switch to __pm_runtime_put_autosuspend()
  usb: Switch to __pm_runtime_put_autosuspend()
  w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
  staging: greybus: Switch to __pm_runtime_put_autosuspend()
  ALSA: hda: Switch to __pm_runtime_put_autosuspend()
  ASoC: Switch to __pm_runtime_put_autosuspend()
  ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
  soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()

 drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
 drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
 drivers/bluetooth/btmtksdio.c                 |   2 +-
 drivers/bluetooth/hci_bcm.c                   |   6 +-
 drivers/bluetooth/hci_h5.c                    |   4 +-
 drivers/bluetooth/hci_intel.c                 |   6 +-
 drivers/bus/sunxi-rsb.c                       |   4 +-
 drivers/char/hw_random/cctrng.c               |   2 +-
 drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
 drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
 drivers/clk/imx/clk-scu.c                     |   2 +-
 drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
 drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
 drivers/crypto/ccree/cc_pm.c                  |   2 +-
 drivers/crypto/hisilicon/qm.c                 |   2 +-
 drivers/crypto/omap-aes-gcm.c                 |   2 +-
 drivers/crypto/omap-aes.c                     |   2 +-
 drivers/crypto/omap-des.c                     |   2 +-
 drivers/crypto/omap-sham.c                    |   2 +-
 drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
 .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
 drivers/crypto/stm32/stm32-crc32.c            |   4 +-
 drivers/crypto/stm32/stm32-cryp.c             |   2 +-
 drivers/crypto/stm32/stm32-hash.c             |   2 +-
 drivers/dma/at_xdmac.c                        |  24 +--
 drivers/dma/pl330.c                           |  14 +-
 drivers/dma/qcom/bam_dma.c                    |  10 +-
 drivers/dma/qcom/hidma.c                      |  18 +-
 drivers/dma/qcom/hidma_dbg.c                  |   2 +-
 drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
 drivers/dma/ste_dma40.c                       |  16 +-
 drivers/dma/ti/cppi41.c                       |  10 +-
 drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
 drivers/gpio/gpio-arizona.c                   |  10 +-
 drivers/gpio/gpio-mxc.c                       |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
 .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
 drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
 drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
 drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
 drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
 drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
 drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
 drivers/gpu/drm/lima/lima_sched.c             |   2 +-
 drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
 drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
 drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
 drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
 drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
 drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
 drivers/gpu/drm/panel/panel-edp.c             |   8 +-
 .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
 drivers/gpu/drm/panel/panel-simple.c          |   6 +-
 drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
 drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
 drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
 drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
 drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
 drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
 drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
 drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
 drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
 drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
 drivers/gpu/drm/tegra/submit.c                |   2 +-
 drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
 drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
 drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
 drivers/hwtracing/stm/core.c                  |   8 +-
 drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
 drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
 drivers/i2c/busses/i2c-at91-master.c          |   2 +-
 drivers/i2c/busses/i2c-cadence.c              |   2 +-
 drivers/i2c/busses/i2c-davinci.c              |   4 +-
 drivers/i2c/busses/i2c-designware-master.c    |   2 +-
 drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
 drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
 drivers/i2c/busses/i2c-i801.c                 |   4 +-
 drivers/i2c/busses/i2c-img-scb.c              |   6 +-
 drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
 drivers/i2c/busses/i2c-imx.c                  |   4 +-
 drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
 drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
 drivers/i2c/busses/i2c-omap.c                 |   6 +-
 drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
 drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
 drivers/i2c/busses/i2c-qup.c                  |   4 +-
 drivers/i2c/busses/i2c-riic.c                 |   4 +-
 drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
 drivers/i2c/busses/i2c-sprd.c                 |   4 +-
 drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
 drivers/i2c/busses/i2c-xiic.c                 |   2 +-
 drivers/i3c/master/dw-i3c-master.c            |  16 +-
 drivers/i3c/master/svc-i3c-master.c           |  16 +-
 drivers/iio/accel/bmc150-accel-core.c         |   2 +-
 drivers/iio/accel/bmi088-accel-core.c         |   6 +-
 drivers/iio/accel/fxls8962af-core.c           |   2 +-
 drivers/iio/accel/kxcjk-1013.c                |   2 +-
 drivers/iio/accel/kxsd9.c                     |   6 +-
 drivers/iio/accel/mma8452.c                   |   2 +-
 drivers/iio/accel/mma9551_core.c              |   2 +-
 drivers/iio/accel/msa311.c                    |  12 +-
 drivers/iio/adc/ab8500-gpadc.c                |   2 +-
 drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
 drivers/iio/adc/rcar-gyroadc.c                |   2 +-
 drivers/iio/adc/stm32-adc-core.c              |   2 +-
 drivers/iio/adc/stm32-adc.c                   |  12 +-
 drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
 drivers/iio/adc/ti-ads1015.c                  |   2 +-
 drivers/iio/adc/ti-ads1100.c                  |   2 +-
 drivers/iio/adc/ti-ads1119.c                  |   4 +-
 drivers/iio/chemical/atlas-sensor.c           |   4 +-
 .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
 drivers/iio/dac/stm32-dac.c                   |   6 +-
 drivers/iio/gyro/bmg160_core.c                |   2 +-
 drivers/iio/gyro/fxas21002c_core.c            |   2 +-
 drivers/iio/gyro/mpu3050-core.c               |   6 +-
 drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
 .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
 .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
 drivers/iio/imu/kmx61.c                       |   2 +-
 drivers/iio/light/apds9306.c                  |   6 +-
 drivers/iio/light/apds9960.c                  |   4 +-
 drivers/iio/light/bh1780.c                    |   2 +-
 drivers/iio/light/gp2ap002.c                  |   4 +-
 drivers/iio/light/isl29028.c                  |   2 +-
 drivers/iio/light/ltrf216a.c                  |   2 +-
 drivers/iio/light/pa12203001.c                |   2 +-
 drivers/iio/light/rpr0521.c                   |   2 +-
 drivers/iio/light/tsl2583.c                   |   2 +-
 drivers/iio/light/tsl2591.c                   |   4 +-
 drivers/iio/light/us5182d.c                   |   2 +-
 drivers/iio/light/vcnl4000.c                  |   2 +-
 drivers/iio/light/vcnl4035.c                  |   2 +-
 drivers/iio/magnetometer/af8133j.c            |   4 +-
 drivers/iio/magnetometer/ak8974.c             |   4 +-
 drivers/iio/magnetometer/ak8975.c             |   2 +-
 drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
 drivers/iio/magnetometer/tmag5273.c           |   4 +-
 drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
 drivers/iio/pressure/bmp280-core.c            |  10 +-
 drivers/iio/pressure/icp10100.c               |   2 +-
 drivers/iio/pressure/mpl115.c                 |   4 +-
 drivers/iio/pressure/zpa2326.c                |   4 +-
 .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
 drivers/iio/proximity/srf04.c                 |   2 +-
 drivers/iio/temperature/mlx90614.c            |   4 +-
 drivers/iio/temperature/mlx90632.c            |   4 +-
 drivers/iio/temperature/mlx90635.c            |   4 +-
 drivers/input/keyboard/omap4-keypad.c         |   8 +-
 drivers/input/misc/cs40l50-vibra.c            |   8 +-
 drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
 drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
 drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
 drivers/media/i2c/alvium-csi2.c               |   2 +-
 drivers/media/i2c/ccs/ccs-core.c              |  10 +-
 drivers/media/i2c/dw9719.c                    |   2 +-
 drivers/media/i2c/gc0308.c                    |   6 +-
 drivers/media/i2c/gc2145.c                    |   8 +-
 drivers/media/i2c/imx283.c                    |   6 +-
 drivers/media/i2c/imx290.c                    |   6 +-
 drivers/media/i2c/imx296.c                    |   4 +-
 drivers/media/i2c/imx415.c                    |   4 +-
 drivers/media/i2c/mt9m114.c                   |  12 +-
 drivers/media/i2c/ov2680.c                    |   2 +-
 drivers/media/i2c/ov4689.c                    |   6 +-
 drivers/media/i2c/ov5640.c                    |   8 +-
 drivers/media/i2c/ov5645.c                    |   6 +-
 drivers/media/i2c/ov5693.c                    |   2 +-
 drivers/media/i2c/ov64a40.c                   |   8 +-
 drivers/media/i2c/ov7251.c                    |   2 +-
 drivers/media/i2c/ov8858.c                    |   4 +-
 drivers/media/i2c/thp7312.c                   |   8 +-
 drivers/media/i2c/video-i2c.c                 |   8 +-
 .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
 drivers/media/platform/qcom/venus/vdec.c      |   4 +-
 drivers/media/platform/qcom/venus/venc.c      |   4 +-
 .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
 .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
 drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
 .../media/platform/verisilicon/hantro_drv.c   |   2 +-
 drivers/media/rc/gpio-ir-recv.c               |   2 +-
 drivers/mfd/arizona-irq.c                     |   2 +-
 drivers/mfd/cs40l50-core.c                    |   2 +-
 drivers/mfd/cs42l43.c                         |   2 +-
 drivers/misc/mei/client.c                     |  14 +-
 drivers/mmc/core/core.c                       |   4 +-
 drivers/mmc/host/atmel-mci.c                  |   4 +-
 drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
 drivers/mmc/host/dw_mmc.c                     |   2 +-
 drivers/mmc/host/mmci.c                       |   2 +-
 drivers/mmc/host/omap_hsmmc.c                 |   6 +-
 drivers/mmc/host/sdhci-msm.c                  |   2 +-
 drivers/mmc/host/sdhci-of-at91.c              |   2 +-
 drivers/mmc/host/sdhci-omap.c                 |   4 +-
 drivers/mmc/host/sdhci-pci-core.c             |   2 +-
 drivers/mmc/host/sdhci-pxav3.c                |   6 +-
 drivers/mmc/host/sdhci-sprd.c                 |   2 +-
 drivers/mmc/host/sdhci-xenon.c                |   2 +-
 drivers/mmc/host/sdhci_am654.c                |   2 +-
 drivers/mmc/host/tmio_mmc_core.c              |   2 +-
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
 drivers/net/ethernet/cadence/macb_main.c      |  10 +-
 drivers/net/ethernet/freescale/fec_main.c     |  16 +-
 drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
 drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
 drivers/net/ipa/ipa_interrupt.c               |   2 +-
 drivers/net/ipa/ipa_main.c                    |   2 +-
 drivers/net/ipa/ipa_modem.c                   |   8 +-
 drivers/net/ipa/ipa_smp2p.c                   |   4 +-
 drivers/net/ipa/ipa_uc.c                      |   4 +-
 drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
 drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
 drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
 drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
 drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
 drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
 drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
 drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
 drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
 drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
 drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
 drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
 drivers/nfc/trf7970a.c                        |   2 +-
 drivers/pci/pcie/portdrv.c                    |   2 +-
 drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
 drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
 drivers/power/supply/bq24190_charger.c        |  28 +--
 drivers/power/supply/twl4030_charger.c        |   2 +-
 drivers/pwm/pwm-img.c                         |   4 +-
 drivers/regulator/stm32-vrefbuf.c             |  12 +-
 drivers/remoteproc/omap_remoteproc.c          |   6 +-
 drivers/slimbus/core.c                        |   2 +-
 drivers/slimbus/messaging.c                   |   4 +-
 drivers/soc/apple/mailbox.c                   |   2 +-
 drivers/soundwire/bus.c                       |   2 +-
 drivers/soundwire/cadence_master.c            |   2 +-
 drivers/soundwire/qcom.c                      |   6 +-
 drivers/spi/atmel-quadspi.c                   |  10 +-
 drivers/spi/spi-cadence-quadspi.c             |   4 +-
 drivers/spi/spi-cadence.c                     |   2 +-
 drivers/spi/spi-dw-pci.c                      |   2 +-
 drivers/spi/spi-fsl-espi.c                    |   4 +-
 drivers/spi/spi-fsl-lpspi.c                   |   4 +-
 drivers/spi/spi-imx.c                         |   6 +-
 drivers/spi/spi-mtk-nor.c                     |   2 +-
 drivers/spi/spi-omap2-mcspi.c                 |   6 +-
 drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
 drivers/spi/spi-s3c64xx.c                     |   6 +-
 drivers/spi/spi-sprd.c                        |   2 +-
 drivers/spi/spi-stm32-qspi.c                  |  14 +-
 drivers/spi/spi-stm32.c                       |   4 +-
 drivers/spi/spi-ti-qspi.c                     |   4 +-
 drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
 drivers/spi/spi.c                             |   6 +-
 drivers/staging/greybus/gbphy.h               |   2 +-
 drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
 drivers/thunderbolt/debugfs.c                 |  22 +--
 drivers/thunderbolt/domain.c                  |   4 +-
 drivers/thunderbolt/icm.c                     |  14 +-
 drivers/thunderbolt/nhi.c                     |   2 +-
 drivers/thunderbolt/retimer.c                 |   4 +-
 drivers/thunderbolt/switch.c                  |   6 +-
 drivers/thunderbolt/tb.c                      |  18 +-
 drivers/thunderbolt/usb4_port.c               |   4 +-
 drivers/tty/serial/8250/8250_omap.c           |  18 +-
 drivers/tty/serial/8250/8250_port.c           |   4 +-
 drivers/tty/serial/fsl_lpuart.c               |   2 +-
 drivers/tty/serial/serial_core.c              |   2 +-
 drivers/tty/serial/uartlite.c                 |   4 +-
 drivers/tty/serial/xilinx_uartps.c            |   2 +-
 drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
 drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
 drivers/usb/chipidea/core.c                   |   2 +-
 drivers/usb/chipidea/otg_fsm.c                |   2 +-
 drivers/usb/dwc3/core.c                       |   2 +-
 drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
 drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
 drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
 drivers/usb/host/xhci-mtk.c                   |   2 +-
 drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
 drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
 drivers/usb/musb/musb_core.c                  |  10 +-
 drivers/usb/musb/musb_debugfs.c               |  10 +-
 drivers/usb/musb/musb_dsps.c                  |   2 +-
 drivers/usb/musb/musb_gadget.c                |   8 +-
 drivers/usb/musb/omap2430.c                   |   2 +-
 drivers/w1/masters/omap_hdq.c                 |  10 +-
 include/linux/greybus/bundle.h                |   2 +-
 sound/hda/hdac_device.c                       |   2 +-
 sound/pci/hda/cs35l41_hda.c                   |   8 +-
 sound/pci/hda/cs35l56_hda.c                   |   2 +-
 sound/pci/hda/hda_intel.c                     |   2 +-
 sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
 sound/soc/atmel/mchp-spdifrx.c                |  12 +-
 sound/soc/codecs/arizona-jack.c               |  12 +-
 sound/soc/codecs/arizona.c                    |   2 +-
 sound/soc/codecs/cs35l41.c                    |   4 +-
 sound/soc/codecs/cs35l45.c                    |   2 +-
 sound/soc/codecs/cs35l56-sdw.c                |   4 +-
 sound/soc/codecs/cs35l56-shared.c             |   2 +-
 sound/soc/codecs/cs35l56.c                    |   2 +-
 sound/soc/codecs/cs42l42-sdw.c                |   2 +-
 sound/soc/codecs/cs42l42.c                    |   4 +-
 sound/soc/codecs/cs42l43-jack.c               |  10 +-
 sound/soc/codecs/cs42l43.c                    |   4 +-
 sound/soc/codecs/hda.c                        |   6 +-
 sound/soc/codecs/madera.c                     |   6 +-
 sound/soc/codecs/max98363.c                   |   2 +-
 sound/soc/codecs/max98373-sdw.c               |   2 +-
 sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
 sound/soc/codecs/rt1308-sdw.c                 |   2 +-
 sound/soc/codecs/rt1316-sdw.c                 |   2 +-
 sound/soc/codecs/rt1318-sdw.c                 |   2 +-
 sound/soc/codecs/rt1320-sdw.c                 |   2 +-
 sound/soc/codecs/rt5682-sdw.c                 |   2 +-
 sound/soc/codecs/rt700.c                      |   4 +-
 sound/soc/codecs/rt711-sdca.c                 |   4 +-
 sound/soc/codecs/rt711.c                      |   4 +-
 sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
 sound/soc/codecs/rt712-sdca.c                 |   4 +-
 sound/soc/codecs/rt715-sdca.c                 |   2 +-
 sound/soc/codecs/rt715.c                      |   2 +-
 sound/soc/codecs/rt722-sdca.c                 |   4 +-
 sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
 sound/soc/codecs/wsa881x.c                    |   2 +-
 sound/soc/codecs/wsa884x.c                    |   2 +-
 sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
 sound/soc/intel/avs/core.c                    |   2 +-
 sound/soc/intel/avs/debugfs.c                 |   4 +-
 sound/soc/intel/avs/pcm.c                     |   2 +-
 sound/soc/intel/catpt/pcm.c                   |  12 +-
 sound/soc/intel/catpt/sysfs.c                 |   2 +-
 sound/soc/soc-component.c                     |   2 +-
 sound/soc/sof/control.c                       |   2 +-
 sound/soc/sof/debug.c                         |   2 +-
 sound/soc/sof/ipc3-dtrace.c                   |   2 +-
 sound/soc/sof/ipc4-loader.c                   |   2 +-
 sound/soc/sof/pcm.c                           |   2 +-
 sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
 .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
 sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
 sound/soc/sof/sof-client-probes.c             |   6 +-
 sound/x86/intel_hdmi_audio.c                  |   6 +-
 373 files changed, 1076 insertions(+), 1076 deletions(-)

-- 
2.39.5


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* [PATCH 02/51] bluetooth: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (5 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz; +Cc: linux-bluetooth

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/bluetooth/btmtksdio.c | 2 +-
 drivers/bluetooth/hci_bcm.c   | 6 +++---
 drivers/bluetooth/hci_h5.c    | 4 ++--
 drivers/bluetooth/hci_intel.c | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index cc097aedc1e1..a3bab78a5b1b 100644
--- a/drivers/bluetooth/btmtksdio.c
+++ b/drivers/bluetooth/btmtksdio.c
@@ -615,7 +615,7 @@ static void btmtksdio_txrx_work(struct work_struct *work)
 	sdio_release_host(bdev->func);
 
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 }
 
 static void btmtksdio_interrupt(struct sdio_func *func)
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 89d4c2224546..5e3760c475b4 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -327,7 +327,7 @@ static irqreturn_t bcm_host_wake(int irq, void *data)
 
 	pm_runtime_get(bdev->dev);
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 
 	return IRQ_HANDLED;
 }
@@ -711,7 +711,7 @@ static int bcm_recv(struct hci_uart *hu, const void *data, int count)
 		if (bcm->dev && bcm_device_exists(bcm->dev)) {
 			pm_runtime_get(bcm->dev->dev);
 			pm_runtime_mark_last_busy(bcm->dev->dev);
-			pm_runtime_put_autosuspend(bcm->dev->dev);
+			__pm_runtime_put_autosuspend(bcm->dev->dev);
 		}
 		mutex_unlock(&bcm_device_lock);
 	}
@@ -750,7 +750,7 @@ static struct sk_buff *bcm_dequeue(struct hci_uart *hu)
 
 	if (bdev) {
 		pm_runtime_mark_last_busy(bdev->dev);
-		pm_runtime_put_autosuspend(bdev->dev);
+		__pm_runtime_put_autosuspend(bdev->dev);
 	}
 
 	mutex_unlock(&bcm_device_lock);
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index c0436881a533..4b1c978c57e7 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -593,7 +593,7 @@ static int h5_recv(struct hci_uart *hu, const void *data, int count)
 	if (hu->serdev) {
 		pm_runtime_get(&hu->serdev->dev);
 		pm_runtime_mark_last_busy(&hu->serdev->dev);
-		pm_runtime_put_autosuspend(&hu->serdev->dev);
+		__pm_runtime_put_autosuspend(&hu->serdev->dev);
 	}
 
 	return 0;
@@ -635,7 +635,7 @@ static int h5_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 	if (hu->serdev) {
 		pm_runtime_get_sync(&hu->serdev->dev);
 		pm_runtime_mark_last_busy(&hu->serdev->dev);
-		pm_runtime_put_autosuspend(&hu->serdev->dev);
+		__pm_runtime_put_autosuspend(&hu->serdev->dev);
 	}
 
 	return 0;
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c
index 999ccd5bb4f2..373813717130 100644
--- a/drivers/bluetooth/hci_intel.c
+++ b/drivers/bluetooth/hci_intel.c
@@ -281,7 +281,7 @@ static irqreturn_t intel_irq(int irq, void *dev_id)
 	/* Host/Controller are now LPM resumed, trigger a new delayed suspend */
 	pm_runtime_get(&idev->pdev->dev);
 	pm_runtime_mark_last_busy(&idev->pdev->dev);
-	pm_runtime_put_autosuspend(&idev->pdev->dev);
+	__pm_runtime_put_autosuspend(&idev->pdev->dev);
 
 	return IRQ_HANDLED;
 }
@@ -372,7 +372,7 @@ static void intel_busy_work(struct work_struct *work)
 		if (intel->hu->tty->dev->parent == idev->pdev->dev.parent) {
 			pm_runtime_get(&idev->pdev->dev);
 			pm_runtime_mark_last_busy(&idev->pdev->dev);
-			pm_runtime_put_autosuspend(&idev->pdev->dev);
+			__pm_runtime_put_autosuspend(&idev->pdev->dev);
 			break;
 		}
 	}
@@ -1004,7 +1004,7 @@ static int intel_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 		if (hu->tty->dev->parent == idev->pdev->dev.parent) {
 			pm_runtime_get_sync(&idev->pdev->dev);
 			pm_runtime_mark_last_busy(&idev->pdev->dev);
-			pm_runtime_put_autosuspend(&idev->pdev->dev);
+			__pm_runtime_put_autosuspend(&idev->pdev->dev);
 			break;
 		}
 	}
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 05/51] clk: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (4 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd; +Cc: linux-clk

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/clk/imx/clk-imx8qxp-lpcg.c     | 2 +-
 drivers/clk/imx/clk-scu.c              | 2 +-
 drivers/clk/qcom/lpassaudiocc-sc7280.c | 4 ++--
 drivers/clk/qcom/lpasscorecc-sc7180.c  | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/imx/clk-imx8qxp-lpcg.c b/drivers/clk/imx/clk-imx8qxp-lpcg.c
index d0ccaa040225..3916381ba158 100644
--- a/drivers/clk/imx/clk-imx8qxp-lpcg.c
+++ b/drivers/clk/imx/clk-imx8qxp-lpcg.c
@@ -268,7 +268,7 @@ static int imx_lpcg_parse_clks_from_dt(struct platform_device *pdev,
 		goto unreg;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
index b1dd0c08e091..a8f08ab2539b 100644
--- a/drivers/clk/imx/clk-scu.c
+++ b/drivers/clk/imx/clk-scu.c
@@ -568,7 +568,7 @@ static int imx_clk_scu_probe(struct platform_device *pdev)
 	if (!((clk->rsrc == IMX_SC_R_A35) || (clk->rsrc == IMX_SC_R_A53) ||
 	    (clk->rsrc == IMX_SC_R_A72))) {
 		pm_runtime_mark_last_busy(&pdev->dev);
-		pm_runtime_put_autosuspend(&pdev->dev);
+		__pm_runtime_put_autosuspend(&pdev->dev);
 	}
 
 	dev_dbg(dev, "register SCU clock rsrc:%d type:%d\n", clk->rsrc,
diff --git a/drivers/clk/qcom/lpassaudiocc-sc7280.c b/drivers/clk/qcom/lpassaudiocc-sc7280.c
index 45e726477086..d2093b15a02c 100644
--- a/drivers/clk/qcom/lpassaudiocc-sc7280.c
+++ b/drivers/clk/qcom/lpassaudiocc-sc7280.c
@@ -786,7 +786,7 @@ static int lpass_audio_cc_sc7280_probe(struct platform_device *pdev)
 
 	pm_runtime_mark_last_busy(&pdev->dev);
 exit:
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return ret;
 }
@@ -855,7 +855,7 @@ static int lpass_aon_cc_sc7280_probe(struct platform_device *pdev)
 
 	pm_runtime_mark_last_busy(&pdev->dev);
 exit:
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return ret;
 }
diff --git a/drivers/clk/qcom/lpasscorecc-sc7180.c b/drivers/clk/qcom/lpasscorecc-sc7180.c
index 726c6378752f..402b012a6ea5 100644
--- a/drivers/clk/qcom/lpasscorecc-sc7180.c
+++ b/drivers/clk/qcom/lpasscorecc-sc7180.c
@@ -415,7 +415,7 @@ static int lpass_core_cc_sc7180_probe(struct platform_device *pdev)
 
 	pm_runtime_mark_last_busy(&pdev->dev);
 exit:
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return ret;
 }
@@ -435,7 +435,7 @@ static int lpass_hm_core_probe(struct platform_device *pdev)
 	ret = qcom_cc_probe_by_index(pdev, 0, desc);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return ret;
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 01/51] accel/ivpu: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (6 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04  9:51   ` Jacek Lawrynowicz
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Jacek Lawrynowicz, Stanislaw Gruszka, Oded Gabbay; +Cc: dri-devel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/accel/ivpu/ivpu_drv.c | 2 +-
 drivers/accel/ivpu/ivpu_pm.c  | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
index c91400ecf926..4140ff55a4e6 100644
--- a/drivers/accel/ivpu/ivpu_drv.c
+++ b/drivers/accel/ivpu/ivpu_drv.c
@@ -104,7 +104,7 @@ static void file_priv_release(struct kref *ref)
 	mutex_lock(&vdev->context_list_lock);
 	file_priv_unbind(vdev, file_priv);
 	mutex_unlock(&vdev->context_list_lock);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 
 	mutex_destroy(&file_priv->ms_lock);
 	mutex_destroy(&file_priv->lock);
diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c
index 59d3170f5e35..643854e51fa0 100644
--- a/drivers/accel/ivpu/ivpu_pm.c
+++ b/drivers/accel/ivpu/ivpu_pm.c
@@ -143,7 +143,7 @@ static void ivpu_pm_recovery_work(struct work_struct *work)
 
 	kobject_uevent_env(&vdev->drm.dev->kobj, KOBJ_CHANGE, evt);
 	pm_runtime_mark_last_busy(vdev->drm.dev);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 }
 
 void ivpu_pm_trigger_recovery(struct ivpu_device *vdev, const char *reason)
@@ -303,7 +303,7 @@ int ivpu_rpm_get(struct ivpu_device *vdev)
 void ivpu_rpm_put(struct ivpu_device *vdev)
 {
 	pm_runtime_mark_last_busy(vdev->drm.dev);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 }
 
 void ivpu_pm_reset_prepare_cb(struct pci_dev *pdev)
@@ -339,7 +339,7 @@ void ivpu_pm_reset_done_cb(struct pci_dev *pdev)
 	ivpu_dbg(vdev, PM, "Post-reset done.\n");
 
 	pm_runtime_mark_last_busy(vdev->drm.dev);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 }
 
 void ivpu_pm_init(struct ivpu_device *vdev)
@@ -381,7 +381,7 @@ void ivpu_pm_enable(struct ivpu_device *vdev)
 	pm_runtime_set_active(dev);
 	pm_runtime_allow(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 void ivpu_pm_disable(struct ivpu_device *vdev)
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 04/51] hwrng: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (3 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman; +Cc: linux-kernel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/char/hw_random/cctrng.c        | 2 +-
 drivers/char/hw_random/omap3-rom-rng.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index 4c50efc46483..87288e14bf5f 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -99,7 +99,7 @@ static void cc_trng_pm_put_suspend(struct device *dev)
 	int rc = 0;
 
 	pm_runtime_mark_last_busy(dev);
-	rc = pm_runtime_put_autosuspend(dev);
+	rc = __pm_runtime_put_autosuspend(dev);
 	if (rc)
 		dev_err(dev, "pm_runtime_put_autosuspend returned %x\n", rc);
 }
diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c
index 8064c792caf0..e2b95f0d34c6 100644
--- a/drivers/char/hw_random/omap3-rom-rng.c
+++ b/drivers/char/hw_random/omap3-rom-rng.c
@@ -57,7 +57,7 @@ static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
 		r = 4;
 
 	pm_runtime_mark_last_busy(ddata->dev);
-	pm_runtime_put_autosuspend(ddata->dev);
+	__pm_runtime_put_autosuspend(ddata->dev);
 
 	return r;
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 03/51] bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (2 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Uwe Kleine-König, Jeffrey Hugo,
	Tony Lindgren, Qiang Yu
  Cc: linux-kernel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/bus/sunxi-rsb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c
index a89d78925637..f33d18f1cf48 100644
--- a/drivers/bus/sunxi-rsb.c
+++ b/drivers/bus/sunxi-rsb.c
@@ -374,7 +374,7 @@ static int sunxi_rsb_read(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
 	mutex_unlock(&rsb->lock);
 
 	pm_runtime_mark_last_busy(rsb->dev);
-	pm_runtime_put_autosuspend(rsb->dev);
+	__pm_runtime_put_autosuspend(rsb->dev);
 
 	return ret;
 }
@@ -418,7 +418,7 @@ static int sunxi_rsb_write(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
 	mutex_unlock(&rsb->lock);
 
 	pm_runtime_mark_last_busy(rsb->dev);
-	pm_runtime_put_autosuspend(rsb->dev);
+	__pm_runtime_put_autosuspend(rsb->dev);
 
 	return ret;
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 11/51] drm/radeon: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (9 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Xinhui Pan, David Airlie,
	Simona Vetter
  Cc: amd-gfx, dri-devel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/gpu/drm/radeon/radeon_acpi.c       |  2 +-
 drivers/gpu/drm/radeon/radeon_connectors.c | 20 ++++++++++----------
 drivers/gpu/drm/radeon/radeon_display.c    |  6 +++---
 drivers/gpu/drm/radeon/radeon_drv.c        |  4 ++--
 drivers/gpu/drm/radeon/radeon_fbdev.c      |  4 ++--
 drivers/gpu/drm/radeon/radeon_kms.c        | 10 +++++-----
 6 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c
index 22ce61bdfc06..92721df2e43c 100644
--- a/drivers/gpu/drm/radeon/radeon_acpi.c
+++ b/drivers/gpu/drm/radeon/radeon_acpi.c
@@ -409,7 +409,7 @@ static int radeon_atif_handler(struct radeon_device *rdev,
 			/* Just fire off a uevent and let userspace tell us what to do */
 			drm_helper_hpd_irq_event(rdev_to_drm(rdev));
 			pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
-			pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
+			__pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
 		}
 	}
 	/* TODO: check other events */
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 528a8f3677c2..d6c58af369e5 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -848,7 +848,7 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -877,7 +877,7 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -996,7 +996,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1068,7 +1068,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -1138,7 +1138,7 @@ radeon_tv_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1156,7 +1156,7 @@ radeon_tv_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -1224,7 +1224,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1414,7 +1414,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
 exit:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -1643,7 +1643,7 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1726,7 +1726,7 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 8f5f8abcb1b4..3fe641bad5bc 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -634,7 +634,7 @@ radeon_crtc_set_config(struct drm_mode_set *set,
 
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -656,12 +656,12 @@ radeon_crtc_set_config(struct drm_mode_set *set,
 	/* if we have no active crtcs, then drop the power ref
 	   we got before */
 	if (!active && rdev->have_disp_power_ref) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		rdev->have_disp_power_ref = false;
 	}
 
 	/* drop the power reference we got coming in here */
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 900b05d8aa5c..ad4431a60508 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -494,14 +494,14 @@ long radeon_drm_ioctl(struct file *filp,
 	dev = file_priv->minor->dev;
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
 	ret = drm_ioctl(filp, cmd, arg);
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
diff --git a/drivers/gpu/drm/radeon/radeon_fbdev.c b/drivers/gpu/drm/radeon/radeon_fbdev.c
index 0aa20c8df546..a302cd3dc8a3 100644
--- a/drivers/gpu/drm/radeon/radeon_fbdev.c
+++ b/drivers/gpu/drm/radeon/radeon_fbdev.c
@@ -156,7 +156,7 @@ static int radeon_fbdev_fb_open(struct fb_info *info, int user)
 
 err_pm_runtime_mark_last_busy:
 	pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
-	pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
+	__pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
 	return ret;
 }
 
@@ -166,7 +166,7 @@ static int radeon_fbdev_fb_release(struct fb_info *info, int user)
 	struct radeon_device *rdev = fb_helper->dev->dev_private;
 
 	pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
-	pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
+	__pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 645e33bf7947..265912c96232 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -171,7 +171,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
 		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_put_autosuspend(dev->dev);
 	}
 
 out:
@@ -635,7 +635,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 
 	r = pm_runtime_get_sync(dev->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return r;
 	}
 
@@ -678,7 +678,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 	}
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return 0;
 
 err_vm_fini:
@@ -688,7 +688,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 
 err_suspend:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return r;
 }
 
@@ -738,7 +738,7 @@ void radeon_driver_postclose_kms(struct drm_device *dev,
 		file_priv->driver_priv = NULL;
 	}
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 }
 
 /*
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 09/51] drm/amd: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (13 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Xinhui Pan, David Airlie,
	Simona Vetter
  Cc: amd-gfx, dri-devel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
 14 files changed, 177 insertions(+), 177 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index f85ace0384d2..1027873da5ea 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -495,7 +495,7 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev,
 				/* Just fire off a uevent and let userspace tell us what to do */
 				drm_helper_hpd_irq_event(adev_to_drm(adev));
 				pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-				pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+				__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 			}
 		}
 		/* TODO: check other events */
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
index 344e0a9ee08a..c31969f5c6ef 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
@@ -714,7 +714,7 @@ amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -739,7 +739,7 @@ amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -865,7 +865,7 @@ amdgpu_connector_vga_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -924,7 +924,7 @@ amdgpu_connector_vga_detect(struct drm_connector *connector, bool force)
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -1025,7 +1025,7 @@ amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1151,7 +1151,7 @@ amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force)
 exit:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -1375,7 +1375,7 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1451,7 +1451,7 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force)
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 37d8657f0776..045c7e9a47eb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -116,13 +116,13 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_virt_enable_access_debugfs(adev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -130,7 +130,7 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
 		if ((sh_bank != 0xFFFFFFFF && sh_bank >= adev->gfx.config.max_sh_per_se) ||
 		    (se_bank != 0xFFFFFFFF && se_bank >= adev->gfx.config.max_shader_engines)) {
 			pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-			pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+			__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 			amdgpu_virt_disable_access_debugfs(adev);
 			return -EINVAL;
 		}
@@ -180,7 +180,7 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
 		mutex_unlock(&adev->pm.mutex);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	amdgpu_virt_disable_access_debugfs(adev);
 	return result;
@@ -240,13 +240,13 @@ static ssize_t amdgpu_debugfs_regs2_op(struct file *f, char __user *buf, u32 off
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_virt_enable_access_debugfs(adev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -256,7 +256,7 @@ static ssize_t amdgpu_debugfs_regs2_op(struct file *f, char __user *buf, u32 off
 		if ((rd->id.grbm.sh != 0xFFFFFFFF && rd->id.grbm.sh >= adev->gfx.config.max_sh_per_se) ||
 		    (rd->id.grbm.se != 0xFFFFFFFF && rd->id.grbm.se >= adev->gfx.config.max_shader_engines)) {
 			pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-			pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+			__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 			amdgpu_virt_disable_access_debugfs(adev);
 			mutex_unlock(&rd->lock);
 			return -EINVAL;
@@ -311,7 +311,7 @@ static ssize_t amdgpu_debugfs_regs2_op(struct file *f, char __user *buf, u32 off
 	mutex_unlock(&rd->lock);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	amdgpu_virt_disable_access_debugfs(adev);
 	return result;
@@ -407,19 +407,19 @@ static ssize_t amdgpu_debugfs_gprwave_read(struct file *f, char __user *buf, siz
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_virt_enable_access_debugfs(adev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	data = kcalloc(1024, sizeof(*data), GFP_KERNEL);
 	if (!data) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		amdgpu_virt_disable_access_debugfs(adev);
 		return -ENOMEM;
 	}
@@ -447,7 +447,7 @@ static ssize_t amdgpu_debugfs_gprwave_read(struct file *f, char __user *buf, siz
 	mutex_unlock(&adev->grbm_idx_mutex);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (!x) {
 		result = -EINVAL;
@@ -527,13 +527,13 @@ static ssize_t amdgpu_debugfs_regs_pcie_read(struct file *f, char __user *buf,
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_virt_enable_access_debugfs(adev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -558,7 +558,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_read(struct file *f, char __user *buf,
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
 }
@@ -587,13 +587,13 @@ static ssize_t amdgpu_debugfs_regs_pcie_write(struct file *f, const char __user
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_virt_enable_access_debugfs(adev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -618,7 +618,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_write(struct file *f, const char __user
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
 }
@@ -650,13 +650,13 @@ static ssize_t amdgpu_debugfs_regs_didt_read(struct file *f, char __user *buf,
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_virt_enable_access_debugfs(adev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -677,7 +677,7 @@ static ssize_t amdgpu_debugfs_regs_didt_read(struct file *f, char __user *buf,
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
 }
@@ -709,13 +709,13 @@ static ssize_t amdgpu_debugfs_regs_didt_write(struct file *f, const char __user
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_virt_enable_access_debugfs(adev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -737,7 +737,7 @@ static ssize_t amdgpu_debugfs_regs_didt_write(struct file *f, const char __user
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
 }
@@ -769,13 +769,13 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf,
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_virt_enable_access_debugfs(adev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -796,7 +796,7 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf,
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
 }
@@ -828,13 +828,13 @@ static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user *
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_virt_enable_access_debugfs(adev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -856,7 +856,7 @@ static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user *
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
 }
@@ -991,20 +991,20 @@ static ssize_t amdgpu_debugfs_sensor_read(struct file *f, char __user *buf,
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_virt_enable_access_debugfs(adev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_dpm_read_sensor(adev, idx, &values[0], &valuesize);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (r) {
 		amdgpu_virt_disable_access_debugfs(adev);
@@ -1073,13 +1073,13 @@ static ssize_t amdgpu_debugfs_wave_read(struct file *f, char __user *buf,
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
 	r = amdgpu_virt_enable_access_debugfs(adev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -1095,7 +1095,7 @@ static ssize_t amdgpu_debugfs_wave_read(struct file *f, char __user *buf,
 	mutex_unlock(&adev->grbm_idx_mutex);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (!x) {
 		amdgpu_virt_disable_access_debugfs(adev);
@@ -1193,7 +1193,7 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,
 	mutex_unlock(&adev->grbm_idx_mutex);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	while (size) {
 		uint32_t value;
@@ -1215,7 +1215,7 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,
 	return result;
 
 err:
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	kfree(data);
 	return r;
 }
@@ -1243,7 +1243,7 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_read(struct file *f, char __user
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -1267,7 +1267,7 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_read(struct file *f, char __user
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
 }
@@ -1294,7 +1294,7 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_write(struct file *f, const char
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -1316,7 +1316,7 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_write(struct file *f, const char
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
 }
@@ -1342,7 +1342,7 @@ static ssize_t amdgpu_debugfs_gfxoff_count_read(struct file *f, char __user *buf
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -1366,7 +1366,7 @@ static ssize_t amdgpu_debugfs_gfxoff_count_read(struct file *f, char __user *buf
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
 }
@@ -1393,7 +1393,7 @@ static ssize_t amdgpu_debugfs_gfxoff_write(struct file *f, const char __user *bu
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -1415,7 +1415,7 @@ static ssize_t amdgpu_debugfs_gfxoff_write(struct file *f, const char __user *bu
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
 }
@@ -1441,7 +1441,7 @@ static ssize_t amdgpu_debugfs_gfxoff_read(struct file *f, char __user *buf,
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -1461,7 +1461,7 @@ static ssize_t amdgpu_debugfs_gfxoff_read(struct file *f, char __user *buf,
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
 }
@@ -1478,7 +1478,7 @@ static ssize_t amdgpu_debugfs_gfxoff_status_read(struct file *f, char __user *bu
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -1502,7 +1502,7 @@ static ssize_t amdgpu_debugfs_gfxoff_status_read(struct file *f, char __user *bu
 	r = result;
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
 }
@@ -1665,7 +1665,7 @@ static int amdgpu_debugfs_test_ib_show(struct seq_file *m, void *unused)
 
 	r = pm_runtime_get_sync(dev->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return r;
 	}
 
@@ -1702,7 +1702,7 @@ static int amdgpu_debugfs_test_ib_show(struct seq_file *m, void *unused)
 	up_write(&adev->reset_domain->sem);
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
 }
@@ -1715,14 +1715,14 @@ static int amdgpu_debugfs_evict_vram(void *data, u64 *val)
 
 	r = pm_runtime_get_sync(dev->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return r;
 	}
 
 	*val = amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM);
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
 }
@@ -1736,14 +1736,14 @@ static int amdgpu_debugfs_evict_gtt(void *data, u64 *val)
 
 	r = pm_runtime_get_sync(dev->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return r;
 	}
 
 	*val = amdgpu_ttm_evict_resources(adev, TTM_PL_TT);
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
 }
@@ -1756,14 +1756,14 @@ static int amdgpu_debugfs_benchmark(void *data, u64 val)
 
 	r = pm_runtime_get_sync(dev->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return r;
 	}
 
 	r = amdgpu_benchmark(adev, val);
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return r;
 }
@@ -1995,7 +1995,7 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 val)
 
 	ret = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return ret;
 	}
 
@@ -2015,7 +2015,7 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 val)
 
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return ret;
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index b119d27271c1..b2bd0cfaacbb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -348,7 +348,7 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
 		adev->have_disp_power_ref = false;
 out:
 	/* drop the power reference we got coming in here */
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index bb06cb20041c..57dce06b246a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -2182,7 +2182,7 @@ static void amdgpu_get_secondary_funcs(struct amdgpu_device *adev)
 		if (p) {
 			pm_runtime_get_sync(&p->dev);
 			pm_runtime_mark_last_busy(&p->dev);
-			pm_runtime_put_autosuspend(&p->dev);
+			__pm_runtime_put_autosuspend(&p->dev);
 			pci_dev_put(p);
 		}
 	}
@@ -2391,7 +2391,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
 		pm_runtime_allow(ddev->dev);
 
 		pm_runtime_mark_last_busy(ddev->dev);
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 
 		pci_wake_from_d3(pdev, TRUE);
 
@@ -2810,7 +2810,7 @@ long amdgpu_drm_ioctl(struct file *filp,
 
 	pm_runtime_mark_last_busy(dev->dev);
 out:
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index 2f24a6aa13bf..cf555ec0f816 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -307,7 +307,7 @@ bool amdgpu_fence_process(struct amdgpu_ring *ring)
 		dma_fence_signal(fence);
 		dma_fence_put(fence);
 		pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	} while (last_seq != seq);
 
 	return true;
@@ -948,7 +948,7 @@ static int gpu_recover_get(void *data, u64 *val)
 
 	r = pm_runtime_get_sync(dev->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return 0;
 	}
 
@@ -958,7 +958,7 @@ static int gpu_recover_get(void *data, u64 *val)
 	*val = atomic_read(&adev->reset_domain->reset_res);
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index 2fe75c920a73..278527cdddef 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -1495,14 +1495,14 @@ static ssize_t amdgpu_gfx_set_run_cleaner_shader(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	ret = amdgpu_gfx_run_cleaner_shader(adev, value);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	if (ret)
 		return ret;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 016a6f6c4267..2d0e9bebaafd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -1383,7 +1383,7 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 out_suspend:
 	pm_runtime_mark_last_busy(dev->dev);
 pm_put:
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return r;
 }
@@ -1450,7 +1450,7 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
 	file_priv->driver_priv = NULL;
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 }
 
 
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c
index 123bcf5c2bb1..5f85cb9102a3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c
@@ -60,7 +60,7 @@ static ssize_t amdgpu_rap_debugfs_write(struct file *f, const char __user *buf,
 
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -102,7 +102,7 @@ static ssize_t amdgpu_rap_debugfs_write(struct file *f, const char __user *buf,
 
 	amdgpu_gfx_off_ctrl(adev, true);
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return size;
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 1d9eda883bb8..00f270a604b6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -3511,7 +3511,7 @@ static void amdgpu_ras_counte_dw(struct work_struct *work)
 
 	pm_runtime_mark_last_busy(dev->dev);
 Out:
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 }
 
 static int amdgpu_get_ras_schema(struct amdgpu_device *adev)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c
index 41ebe690eeff..d461181e10f2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c
@@ -110,7 +110,7 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __u
 
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -160,7 +160,7 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __u
 	}
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return size;
 }
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index d07acf1b2f93..3011fe9927f4 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -1081,7 +1081,7 @@ static void kfd_process_destroy_pdds(struct kfd_process *p)
 		 */
 		if (pdd->runtime_inuse) {
 			pm_runtime_mark_last_busy(adev_to_drm(pdd->dev->adev)->dev);
-			pm_runtime_put_autosuspend(adev_to_drm(pdd->dev->adev)->dev);
+			__pm_runtime_put_autosuspend(adev_to_drm(pdd->dev->adev)->dev);
 			pdd->runtime_inuse = false;
 		}
 
@@ -1766,7 +1766,7 @@ struct kfd_process_device *kfd_bind_process_to_device(struct kfd_node *dev,
 	if (!pdd->runtime_inuse) {
 		err = pm_runtime_get_sync(adev_to_drm(dev->adev)->dev);
 		if (err < 0) {
-			pm_runtime_put_autosuspend(adev_to_drm(dev->adev)->dev);
+			__pm_runtime_put_autosuspend(adev_to_drm(dev->adev)->dev);
 			return ERR_PTR(err);
 		}
 	}
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index d1ca9e709946..a7be15e8c06e 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -10102,7 +10102,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
 	 * displays anymore
 	 */
 	for (i = 0; i < crtc_disable_count; i++)
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 	pm_runtime_mark_last_busy(dev->dev);
 }
 
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index d5d6ab484e5a..dce775edc1cd 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -147,14 +147,14 @@ static ssize_t amdgpu_get_power_dpm_state(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	amdgpu_dpm_get_current_power_state(adev, &pm);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return sysfs_emit(buf, "%s\n",
 			  (pm == POWER_STATE_TYPE_BATTERY) ? "battery" :
@@ -187,14 +187,14 @@ static ssize_t amdgpu_set_power_dpm_state(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	amdgpu_dpm_set_power_state(adev, state);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return count;
 }
@@ -275,14 +275,14 @@ static ssize_t amdgpu_get_power_dpm_force_performance_level(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	level = amdgpu_dpm_get_performance_level(adev);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return sysfs_emit(buf, "%s\n",
 			  (level == AMD_DPM_FORCED_LEVEL_AUTO) ? "auto" :
@@ -338,14 +338,14 @@ static ssize_t amdgpu_set_power_dpm_force_performance_level(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	mutex_lock(&adev->pm.stable_pstate_ctx_lock);
 	if (amdgpu_dpm_force_performance_level(adev, level)) {
 		pm_runtime_mark_last_busy(ddev->dev);
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		mutex_unlock(&adev->pm.stable_pstate_ctx_lock);
 		return -EINVAL;
 	}
@@ -354,7 +354,7 @@ static ssize_t amdgpu_set_power_dpm_force_performance_level(struct device *dev,
 	mutex_unlock(&adev->pm.stable_pstate_ctx_lock);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return count;
 }
@@ -376,7 +376,7 @@ static ssize_t amdgpu_get_pp_num_states(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
@@ -384,7 +384,7 @@ static ssize_t amdgpu_get_pp_num_states(struct device *dev,
 		memset(&data, 0, sizeof(data));
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	buf_len = sysfs_emit(buf, "states: %d\n", data.nums);
 	for (i = 0; i < data.nums; i++)
@@ -414,7 +414,7 @@ static ssize_t amdgpu_get_pp_cur_state(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
@@ -423,7 +423,7 @@ static ssize_t amdgpu_get_pp_cur_state(struct device *dev,
 	ret = amdgpu_dpm_get_pp_num_states(adev, &data);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	if (ret)
 		return ret;
@@ -487,7 +487,7 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
@@ -509,13 +509,13 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev,
 	}
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return count;
 
 err_out:
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 	return ret;
 }
 
@@ -546,14 +546,14 @@ static ssize_t amdgpu_get_pp_table(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	size = amdgpu_dpm_get_pp_table(adev, &table);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	if (size <= 0)
 		return size;
@@ -582,14 +582,14 @@ static ssize_t amdgpu_set_pp_table(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	ret = amdgpu_dpm_set_pp_table(adev, buf, count);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	if (ret)
 		return ret;
@@ -810,7 +810,7 @@ static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
@@ -832,13 +832,13 @@ static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev,
 	}
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return count;
 
 err_out:
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 	return -EINVAL;
 }
 
@@ -867,7 +867,7 @@ static ssize_t amdgpu_get_pp_od_clk_voltage(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
@@ -889,7 +889,7 @@ static ssize_t amdgpu_get_pp_od_clk_voltage(struct device *dev,
 		size = sysfs_emit(buf, "\n");
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return size;
 }
@@ -931,14 +931,14 @@ static ssize_t amdgpu_set_pp_features(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	ret = amdgpu_dpm_set_ppfeature_status(adev, featuremask);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	if (ret)
 		return -EINVAL;
@@ -962,7 +962,7 @@ static ssize_t amdgpu_get_pp_features(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
@@ -971,7 +971,7 @@ static ssize_t amdgpu_get_pp_features(struct device *dev,
 		size = sysfs_emit(buf, "\n");
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return size;
 }
@@ -1031,7 +1031,7 @@ static ssize_t amdgpu_get_pp_dpm_clock(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
@@ -1043,7 +1043,7 @@ static ssize_t amdgpu_get_pp_dpm_clock(struct device *dev,
 		size = sysfs_emit(buf, "\n");
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return size;
 }
@@ -1104,14 +1104,14 @@ static ssize_t amdgpu_set_pp_dpm_clock(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	ret = amdgpu_dpm_force_clock_level(adev, type, mask);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	if (ret)
 		return -EINVAL;
@@ -1285,14 +1285,14 @@ static ssize_t amdgpu_get_pp_sclk_od(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	value = amdgpu_dpm_get_sclk_od(adev);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return sysfs_emit(buf, "%d\n", value);
 }
@@ -1319,14 +1319,14 @@ static ssize_t amdgpu_set_pp_sclk_od(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	amdgpu_dpm_set_sclk_od(adev, (uint32_t)value);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return count;
 }
@@ -1347,14 +1347,14 @@ static ssize_t amdgpu_get_pp_mclk_od(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	value = amdgpu_dpm_get_mclk_od(adev);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return sysfs_emit(buf, "%d\n", value);
 }
@@ -1381,14 +1381,14 @@ static ssize_t amdgpu_set_pp_mclk_od(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	amdgpu_dpm_set_mclk_od(adev, (uint32_t)value);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return count;
 }
@@ -1429,7 +1429,7 @@ static ssize_t amdgpu_get_pp_power_profile_mode(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
@@ -1438,7 +1438,7 @@ static ssize_t amdgpu_get_pp_power_profile_mode(struct device *dev,
 		size = sysfs_emit(buf, "\n");
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return size;
 }
@@ -1494,14 +1494,14 @@ static ssize_t amdgpu_set_pp_power_profile_mode(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	ret = amdgpu_dpm_set_power_profile_mode(adev, parameter, parameter_size);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	if (!ret)
 		return count;
@@ -1522,7 +1522,7 @@ static int amdgpu_hwmon_get_sensor_generic(struct amdgpu_device *adev,
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -1530,7 +1530,7 @@ static int amdgpu_hwmon_get_sensor_generic(struct amdgpu_device *adev,
 	r = amdgpu_dpm_read_sensor(adev, sensor, query, &size);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
 }
@@ -1641,14 +1641,14 @@ static ssize_t amdgpu_get_pcie_bw(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	amdgpu_asic_get_pcie_usage(adev, &count0, &count1);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return sysfs_emit(buf, "%llu %llu %i\n",
 			  count0, count1, pcie_get_mps(adev->pdev));
@@ -1772,7 +1772,7 @@ static ssize_t amdgpu_get_apu_thermal_cap(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
@@ -1783,7 +1783,7 @@ static ssize_t amdgpu_get_apu_thermal_cap(struct device *dev,
 		size = sysfs_emit(buf, "failed to get thermal limit\n");
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return size;
 }
@@ -1809,7 +1809,7 @@ static ssize_t amdgpu_set_apu_thermal_cap(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
@@ -1820,7 +1820,7 @@ static ssize_t amdgpu_set_apu_thermal_cap(struct device *dev,
 	}
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return count;
 }
@@ -1851,14 +1851,14 @@ static ssize_t amdgpu_get_pm_metrics(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	size = amdgpu_dpm_get_pm_metrics(adev, buf, PAGE_SIZE);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return size;
 }
@@ -1892,7 +1892,7 @@ static ssize_t amdgpu_get_gpu_metrics(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
@@ -1907,7 +1907,7 @@ static ssize_t amdgpu_get_gpu_metrics(struct device *dev,
 
 out:
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	return size;
 }
@@ -2010,7 +2010,7 @@ static ssize_t amdgpu_set_smartshift_bias(struct device *dev,
 
 	r = pm_runtime_get_sync(ddev->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return r;
 	}
 
@@ -2030,7 +2030,7 @@ static ssize_t amdgpu_set_smartshift_bias(struct device *dev,
 
 out:
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 	return r;
 }
 
@@ -2337,14 +2337,14 @@ static ssize_t amdgpu_set_pm_policy_attr(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	ret = amdgpu_dpm_set_pm_policy(adev, policy_attr->id, val);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	if (ret)
 		return ret;
@@ -2774,14 +2774,14 @@ static ssize_t amdgpu_hwmon_get_pwm1_enable(struct device *dev,
 
 	ret = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return ret;
 	}
 
 	ret = amdgpu_dpm_get_fan_control_mode(adev, &pwm_mode);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (ret)
 		return -EINVAL;
@@ -2819,14 +2819,14 @@ static ssize_t amdgpu_hwmon_set_pwm1_enable(struct device *dev,
 
 	ret = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return ret;
 	}
 
 	ret = amdgpu_dpm_set_fan_control_mode(adev, pwm_mode);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (ret)
 		return -EINVAL;
@@ -2868,7 +2868,7 @@ static ssize_t amdgpu_hwmon_set_pwm1(struct device *dev,
 
 	err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (err < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return err;
 	}
 
@@ -2886,7 +2886,7 @@ static ssize_t amdgpu_hwmon_set_pwm1(struct device *dev,
 
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (err)
 		return err;
@@ -2909,14 +2909,14 @@ static ssize_t amdgpu_hwmon_get_pwm1(struct device *dev,
 
 	err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (err < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return err;
 	}
 
 	err = amdgpu_dpm_get_fan_speed_pwm(adev, &speed);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (err)
 		return err;
@@ -2939,14 +2939,14 @@ static ssize_t amdgpu_hwmon_get_fan1_input(struct device *dev,
 
 	err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (err < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return err;
 	}
 
 	err = amdgpu_dpm_get_fan_speed_rpm(adev, &speed);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (err)
 		return err;
@@ -3003,14 +3003,14 @@ static ssize_t amdgpu_hwmon_get_fan1_target(struct device *dev,
 
 	err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (err < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return err;
 	}
 
 	err = amdgpu_dpm_get_fan_speed_rpm(adev, &rpm);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (err)
 		return err;
@@ -3038,7 +3038,7 @@ static ssize_t amdgpu_hwmon_set_fan1_target(struct device *dev,
 
 	err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (err < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return err;
 	}
 
@@ -3055,7 +3055,7 @@ static ssize_t amdgpu_hwmon_set_fan1_target(struct device *dev,
 
 out:
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (err)
 		return err;
@@ -3078,14 +3078,14 @@ static ssize_t amdgpu_hwmon_get_fan1_enable(struct device *dev,
 
 	ret = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return ret;
 	}
 
 	ret = amdgpu_dpm_get_fan_control_mode(adev, &pwm_mode);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (ret)
 		return -EINVAL;
@@ -3121,14 +3121,14 @@ static ssize_t amdgpu_hwmon_set_fan1_enable(struct device *dev,
 
 	err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (err < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return err;
 	}
 
 	err = amdgpu_dpm_set_fan_control_mode(adev, pwm_mode);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (err)
 		return -EINVAL;
@@ -3250,7 +3250,7 @@ static ssize_t amdgpu_hwmon_show_power_cap_generic(struct device *dev,
 
 	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return r;
 	}
 
@@ -3263,7 +3263,7 @@ static ssize_t amdgpu_hwmon_show_power_cap_generic(struct device *dev,
 		size = sysfs_emit(buf, "\n");
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return size;
 }
@@ -3341,14 +3341,14 @@ static ssize_t amdgpu_hwmon_set_power_cap(struct device *dev,
 
 	err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
 	if (err < 0) {
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 		return err;
 	}
 
 	err = amdgpu_dpm_set_power_limit(adev, value);
 
 	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+	__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (err)
 		return err;
@@ -3789,7 +3789,7 @@ static int amdgpu_retrieve_od_settings(struct amdgpu_device *adev,
 
 	ret = pm_runtime_get_sync(adev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(adev->dev);
+		__pm_runtime_put_autosuspend(adev->dev);
 		return ret;
 	}
 
@@ -3798,7 +3798,7 @@ static int amdgpu_retrieve_od_settings(struct amdgpu_device *adev,
 		size = sysfs_emit(buf, "\n");
 
 	pm_runtime_mark_last_busy(adev->dev);
-	pm_runtime_put_autosuspend(adev->dev);
+	__pm_runtime_put_autosuspend(adev->dev);
 
 	return size;
 }
@@ -3899,14 +3899,14 @@ amdgpu_distribute_custom_od_settings(struct amdgpu_device *adev,
 	}
 
 	pm_runtime_mark_last_busy(adev->dev);
-	pm_runtime_put_autosuspend(adev->dev);
+	__pm_runtime_put_autosuspend(adev->dev);
 
 	return count;
 
 err_out1:
 	pm_runtime_mark_last_busy(adev->dev);
 err_out0:
-	pm_runtime_put_autosuspend(adev->dev);
+	__pm_runtime_put_autosuspend(adev->dev);
 
 	return ret;
 }
@@ -4760,7 +4760,7 @@ static int amdgpu_debugfs_pm_info_show(struct seq_file *m, void *unused)
 
 	r = pm_runtime_get_sync(dev->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return r;
 	}
 
@@ -4778,7 +4778,7 @@ static int amdgpu_debugfs_pm_info_show(struct seq_file *m, void *unused)
 
 out:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return r;
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 07/51] dmaengine: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (11 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Vinod Koul; +Cc: dmaengine

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/dma/at_xdmac.c          | 24 ++++++++++++------------
 drivers/dma/pl330.c             | 14 +++++++-------
 drivers/dma/qcom/bam_dma.c      | 10 +++++-----
 drivers/dma/qcom/hidma.c        | 18 +++++++++---------
 drivers/dma/qcom/hidma_dbg.c    |  2 +-
 drivers/dma/qcom/hidma_mgmt.c   |  4 ++--
 drivers/dma/ste_dma40.c         | 16 ++++++++--------
 drivers/dma/ti/cppi41.c         | 10 +++++-----
 drivers/dma/xilinx/zynqmp_dma.c |  2 +-
 9 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 299396121e6d..88637bcfb760 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -380,7 +380,7 @@ static void at_xdmac_runtime_suspend_descriptors(struct at_xdmac_chan *atchan)
 			continue;
 
 		pm_runtime_mark_last_busy(atxdmac->dev);
-		pm_runtime_put_autosuspend(atxdmac->dev);
+		__pm_runtime_put_autosuspend(atxdmac->dev);
 	}
 }
 
@@ -414,7 +414,7 @@ static bool at_xdmac_chan_is_enabled(struct at_xdmac_chan *atchan)
 	ret = !!(at_xdmac_chan_read(atchan, AT_XDMAC_GS) & atchan->mask);
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return ret;
 }
@@ -447,7 +447,7 @@ static void at_xdmac_off(struct at_xdmac *atxdmac, bool suspend_descriptors)
 	}
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 }
 
 /* Call with lock hold. */
@@ -1675,7 +1675,7 @@ at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
 spin_unlock:
 	spin_unlock_irqrestore(&atchan->lock, flags);
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 	return ret;
 }
 
@@ -1757,7 +1757,7 @@ static void at_xdmac_handle_error(struct at_xdmac_chan *atchan)
 		bad_desc->lld.mbr_ubc);
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	/* Then continue with usual descriptor management */
 }
@@ -1821,7 +1821,7 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
 	 * at_xdmac_start_xfer().
 	 */
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 }
 
 static irqreturn_t at_xdmac_interrupt(int irq, void *dev_id)
@@ -1953,7 +1953,7 @@ static int at_xdmac_device_pause(struct dma_chan *chan)
 	spin_unlock_irqrestore(&atchan->lock, flags);
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return 0;
 }
@@ -1997,7 +1997,7 @@ static int at_xdmac_device_resume(struct dma_chan *chan)
 unlock:
 	spin_unlock_irqrestore(&atchan->lock, flags);
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return ret;
 }
@@ -2032,7 +2032,7 @@ static int at_xdmac_device_terminate_all(struct dma_chan *chan)
 		 * to release it.
 		 */
 		if (desc->active_xfer) {
-			pm_runtime_put_autosuspend(atxdmac->dev);
+			__pm_runtime_put_autosuspend(atxdmac->dev);
 			pm_runtime_mark_last_busy(atxdmac->dev);
 		}
 	}
@@ -2042,7 +2042,7 @@ static int at_xdmac_device_terminate_all(struct dma_chan *chan)
 	spin_unlock_irqrestore(&atchan->lock, flags);
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return 0;
 }
@@ -2236,7 +2236,7 @@ static int __maybe_unused atmel_xdmac_resume(struct device *dev)
 	}
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return 0;
 }
@@ -2413,7 +2413,7 @@ static int at_xdmac_probe(struct platform_device *pdev)
 	at_xdmac_axi_config(pdev);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 82a9fe88ad54..614cc0bcacd1 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2135,7 +2135,7 @@ static void pl330_tasklet(struct tasklet_struct *t)
 	/* If work list empty, power down */
 	if (power_down) {
 		pm_runtime_mark_last_busy(pch->dmac->ddma.dev);
-		pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
+		__pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
 	}
 }
 
@@ -2315,8 +2315,8 @@ static int pl330_terminate_all(struct dma_chan *chan)
 	spin_unlock_irqrestore(&pch->lock, flags);
 	pm_runtime_mark_last_busy(pl330->ddma.dev);
 	if (power_down)
-		pm_runtime_put_autosuspend(pl330->ddma.dev);
-	pm_runtime_put_autosuspend(pl330->ddma.dev);
+		__pm_runtime_put_autosuspend(pl330->ddma.dev);
+	__pm_runtime_put_autosuspend(pl330->ddma.dev);
 
 	return 0;
 }
@@ -2348,7 +2348,7 @@ static int pl330_pause(struct dma_chan *chan)
 	}
 	spin_unlock_irqrestore(&pch->lock, flags);
 	pm_runtime_mark_last_busy(pl330->ddma.dev);
-	pm_runtime_put_autosuspend(pl330->ddma.dev);
+	__pm_runtime_put_autosuspend(pl330->ddma.dev);
 
 	return 0;
 }
@@ -2372,7 +2372,7 @@ static void pl330_free_chan_resources(struct dma_chan *chan)
 
 	spin_unlock_irqrestore(&pl330->lock, flags);
 	pm_runtime_mark_last_busy(pch->dmac->ddma.dev);
-	pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
+	__pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
 	pl330_unprep_slave_fifo(pch);
 }
 
@@ -2394,7 +2394,7 @@ static int pl330_get_current_xferred_count(struct dma_pl330_chan *pch,
 		addr = desc->px.dst_addr;
 	}
 	pm_runtime_mark_last_busy(pch->dmac->ddma.dev);
-	pm_runtime_put_autosuspend(pl330->ddma.dev);
+	__pm_runtime_put_autosuspend(pl330->ddma.dev);
 
 	/* If DMAMOV hasn't finished yet, SAR/DAR can be zero */
 	if (!val)
@@ -3177,7 +3177,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
 	pm_runtime_use_autosuspend(&adev->dev);
 	pm_runtime_set_autosuspend_delay(&adev->dev, PL330_AUTOSUSPEND_DELAY);
 	pm_runtime_mark_last_busy(&adev->dev);
-	pm_runtime_put_autosuspend(&adev->dev);
+	__pm_runtime_put_autosuspend(&adev->dev);
 
 	return 0;
 probe_err3:
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index d43a881e43b9..39e174ffc47e 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -609,7 +609,7 @@ static void bam_free_chan(struct dma_chan *chan)
 
 err:
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 }
 
 /**
@@ -785,7 +785,7 @@ static int bam_pause(struct dma_chan *chan)
 	bchan->paused = 1;
 	spin_unlock_irqrestore(&bchan->vc.lock, flag);
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 
 	return 0;
 }
@@ -811,7 +811,7 @@ static int bam_resume(struct dma_chan *chan)
 	bchan->paused = 0;
 	spin_unlock_irqrestore(&bchan->vc.lock, flag);
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 
 	return 0;
 }
@@ -928,7 +928,7 @@ static irqreturn_t bam_dma_irq(int irq, void *data)
 	}
 
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 
 	return IRQ_HANDLED;
 }
@@ -1103,7 +1103,7 @@ static void bam_start_dma(struct bam_chan *bchan)
 			bam_addr(bdev, bchan->id, BAM_P_EVNT_REG));
 
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 }
 
 /**
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index 4d2cd8d9ec74..2f0da730003e 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -186,7 +186,7 @@ static void hidma_callback(void *data)
 
 	if (queued) {
 		pm_runtime_mark_last_busy(dmadev->ddev.dev);
-		pm_runtime_put_autosuspend(dmadev->ddev.dev);
+		__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	}
 }
 
@@ -317,11 +317,11 @@ static dma_cookie_t hidma_tx_submit(struct dma_async_tx_descriptor *txd)
 	pm_runtime_get_sync(dmadev->ddev.dev);
 	if (!hidma_ll_isenabled(dmadev->lldev)) {
 		pm_runtime_mark_last_busy(dmadev->ddev.dev);
-		pm_runtime_put_autosuspend(dmadev->ddev.dev);
+		__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 		return -ENODEV;
 	}
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 
 	mdesc = container_of(txd, struct hidma_desc, desc);
 	spin_lock_irqsave(&mchan->lock, irqflags);
@@ -508,7 +508,7 @@ static int hidma_terminate_channel(struct dma_chan *chan)
 	rc = hidma_ll_enable(dmadev->lldev);
 out:
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return rc;
 }
 
@@ -526,7 +526,7 @@ static int hidma_terminate_all(struct dma_chan *chan)
 	pm_runtime_get_sync(dmadev->ddev.dev);
 	rc = hidma_ll_setup(dmadev->lldev);
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return rc;
 }
 
@@ -570,7 +570,7 @@ static int hidma_pause(struct dma_chan *chan)
 			dev_warn(dmadev->ddev.dev, "channel did not stop\n");
 		mchan->paused = true;
 		pm_runtime_mark_last_busy(dmadev->ddev.dev);
-		pm_runtime_put_autosuspend(dmadev->ddev.dev);
+		__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	}
 	return 0;
 }
@@ -592,7 +592,7 @@ static int hidma_resume(struct dma_chan *chan)
 			dev_err(dmadev->ddev.dev,
 				"failed to resume the channel");
 		pm_runtime_mark_last_busy(dmadev->ddev.dev);
-		pm_runtime_put_autosuspend(dmadev->ddev.dev);
+		__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	}
 	return rc;
 }
@@ -883,7 +883,7 @@ static int hidma_probe(struct platform_device *pdev)
 	hidma_sysfs_init(dmadev);
 	dev_info(&pdev->dev, "HI-DMA engine driver registration complete\n");
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return 0;
 
 uninit:
@@ -910,7 +910,7 @@ static void hidma_shutdown(struct platform_device *pdev)
 	if (hidma_ll_disable(dmadev->lldev))
 		dev_warn(dmadev->ddev.dev, "channel did not stop\n");
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 
 }
 
diff --git a/drivers/dma/qcom/hidma_dbg.c b/drivers/dma/qcom/hidma_dbg.c
index ce87c7937a0e..90e758193feb 100644
--- a/drivers/dma/qcom/hidma_dbg.c
+++ b/drivers/dma/qcom/hidma_dbg.c
@@ -104,7 +104,7 @@ static int hidma_chan_show(struct seq_file *s, void *unused)
 
 	hidma_ll_devstats(s, mchan->dmadev->lldev);
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return 0;
 }
 
diff --git a/drivers/dma/qcom/hidma_mgmt.c b/drivers/dma/qcom/hidma_mgmt.c
index 4805ce390ffa..f99a9f45c18f 100644
--- a/drivers/dma/qcom/hidma_mgmt.c
+++ b/drivers/dma/qcom/hidma_mgmt.c
@@ -151,7 +151,7 @@ int hidma_mgmt_setup(struct hidma_mgmt_dev *mgmtdev)
 	writel(val, mgmtdev->virtaddr + HIDMA_CHRESET_TIMEOUT_OFFSET);
 
 	pm_runtime_mark_last_busy(&mgmtdev->pdev->dev);
-	pm_runtime_put_autosuspend(&mgmtdev->pdev->dev);
+	__pm_runtime_put_autosuspend(&mgmtdev->pdev->dev);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(hidma_mgmt_setup);
@@ -306,7 +306,7 @@ static int hidma_mgmt_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, mgmtdev);
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 	return 0;
 out:
 	pm_runtime_put_sync_suspend(&pdev->dev);
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index d52e1685aed5..58793d81448b 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -1453,7 +1453,7 @@ static int d40_pause(struct dma_chan *chan)
 	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_put_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return res;
 }
@@ -1480,7 +1480,7 @@ static int d40_resume(struct dma_chan *chan)
 		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_put_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return res;
 }
@@ -1582,7 +1582,7 @@ static void dma_tc_handle(struct d40_chan *d40c)
 			d40c->busy = false;
 
 			pm_runtime_mark_last_busy(d40c->base->dev);
-			pm_runtime_put_autosuspend(d40c->base->dev);
+			__pm_runtime_put_autosuspend(d40c->base->dev);
 		}
 
 		d40_desc_remove(d40d);
@@ -2056,7 +2056,7 @@ static int d40_free_dma(struct d40_chan *d40c)
 
 	if (d40c->busy) {
 		pm_runtime_mark_last_busy(d40c->base->dev);
-		pm_runtime_put_autosuspend(d40c->base->dev);
+		__pm_runtime_put_autosuspend(d40c->base->dev);
 	}
 
 	d40c->busy = false;
@@ -2064,7 +2064,7 @@ static int d40_free_dma(struct d40_chan *d40c)
 	d40c->configured = false;
  mark_last_busy:
 	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
+	__pm_runtime_put_autosuspend(d40c->base->dev);
 	return res;
 }
 
@@ -2467,7 +2467,7 @@ static int d40_alloc_chan_resources(struct dma_chan *chan)
 		d40_config_write(d40c);
  mark_last_busy:
 	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
+	__pm_runtime_put_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return err;
 }
@@ -2619,10 +2619,10 @@ static int d40_terminate_all(struct dma_chan *chan)
 
 	d40_term_all(d40c);
 	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(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_put_autosuspend(d40c->base->dev);
 	}
 	d40c->busy = false;
 
diff --git a/drivers/dma/ti/cppi41.c b/drivers/dma/ti/cppi41.c
index a8bb70c2d109..ebdc7fd9df84 100644
--- a/drivers/dma/ti/cppi41.c
+++ b/drivers/dma/ti/cppi41.c
@@ -391,7 +391,7 @@ static int cppi41_dma_alloc_chan_resources(struct dma_chan *chan)
 		cppi_writel(c->q_num, c->gcr_reg + RXHPCRA0);
 
 	pm_runtime_mark_last_busy(cdd->ddev.dev);
-	pm_runtime_put_autosuspend(cdd->ddev.dev);
+	__pm_runtime_put_autosuspend(cdd->ddev.dev);
 
 	return 0;
 }
@@ -412,7 +412,7 @@ static void cppi41_dma_free_chan_resources(struct dma_chan *chan)
 	WARN_ON(!list_empty(&cdd->pending));
 
 	pm_runtime_mark_last_busy(cdd->ddev.dev);
-	pm_runtime_put_autosuspend(cdd->ddev.dev);
+	__pm_runtime_put_autosuspend(cdd->ddev.dev);
 }
 
 static enum dma_status cppi41_dma_tx_status(struct dma_chan *chan,
@@ -510,7 +510,7 @@ static void cppi41_dma_issue_pending(struct dma_chan *chan)
 	spin_unlock_irqrestore(&cdd->lock, flags);
 
 	pm_runtime_mark_last_busy(cdd->ddev.dev);
-	pm_runtime_put_autosuspend(cdd->ddev.dev);
+	__pm_runtime_put_autosuspend(cdd->ddev.dev);
 }
 
 static u32 get_host_pd0(u32 length)
@@ -628,7 +628,7 @@ static struct dma_async_tx_descriptor *cppi41_dma_prep_slave_sg(
 
 err_out_not_ready:
 	pm_runtime_mark_last_busy(cdd->ddev.dev);
-	pm_runtime_put_autosuspend(cdd->ddev.dev);
+	__pm_runtime_put_autosuspend(cdd->ddev.dev);
 
 	return txd;
 }
@@ -1140,7 +1140,7 @@ static int cppi41_dma_probe(struct platform_device *pdev)
 		goto err_of;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 err_of:
diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index 9ae46f1198fe..4664858f5a1c 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -696,7 +696,7 @@ static void zynqmp_dma_free_chan_resources(struct dma_chan *dchan)
 		chan->desc_pool_v, chan->desc_pool_p);
 	kfree(chan->sw_desc_pool);
 	pm_runtime_mark_last_busy(chan->dev);
-	pm_runtime_put_autosuspend(chan->dev);
+	__pm_runtime_put_autosuspend(chan->dev);
 }
 
 /**
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 06/51] crypto: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (12 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller; +Cc: linux-crypto

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/crypto/ccree/cc_pm.c                     | 2 +-
 drivers/crypto/hisilicon/qm.c                    | 2 +-
 drivers/crypto/omap-aes-gcm.c                    | 2 +-
 drivers/crypto/omap-aes.c                        | 2 +-
 drivers/crypto/omap-des.c                        | 2 +-
 drivers/crypto/omap-sham.c                       | 2 +-
 drivers/crypto/rockchip/rk3288_crypto_ahash.c    | 2 +-
 drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 2 +-
 drivers/crypto/stm32/stm32-crc32.c               | 4 ++--
 drivers/crypto/stm32/stm32-cryp.c                | 2 +-
 drivers/crypto/stm32/stm32-hash.c                | 2 +-
 11 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c
index 6124fbbbed94..e4b7eab2e143 100644
--- a/drivers/crypto/ccree/cc_pm.c
+++ b/drivers/crypto/ccree/cc_pm.c
@@ -78,5 +78,5 @@ int cc_pm_get(struct device *dev)
 void cc_pm_put_suspend(struct device *dev)
 {
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 07983af9e3e2..13408c43fa20 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -840,7 +840,7 @@ static void qm_pm_put_sync(struct hisi_qm *qm)
 		return;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static void qm_cq_head_update(struct hisi_qp *qp)
diff --git a/drivers/crypto/omap-aes-gcm.c b/drivers/crypto/omap-aes-gcm.c
index c498950402e8..a5566268d928 100644
--- a/drivers/crypto/omap-aes-gcm.c
+++ b/drivers/crypto/omap-aes-gcm.c
@@ -39,7 +39,7 @@ static void omap_aes_gcm_finish_req(struct omap_aes_dev *dd, int ret)
 	crypto_finalize_aead_request(dd->engine, req, ret);
 
 	pm_runtime_mark_last_busy(dd->dev);
-	pm_runtime_put_autosuspend(dd->dev);
+	__pm_runtime_put_autosuspend(dd->dev);
 }
 
 static void omap_aes_gcm_done_task(struct omap_aes_dev *dd)
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index bad1adacbc84..bf0d953b8697 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -402,7 +402,7 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err)
 	crypto_finalize_skcipher_request(dd->engine, req, err);
 
 	pm_runtime_mark_last_busy(dd->dev);
-	pm_runtime_put_autosuspend(dd->dev);
+	__pm_runtime_put_autosuspend(dd->dev);
 }
 
 int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd)
diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c
index 209d3dc03a9b..156ef345e7fe 100644
--- a/drivers/crypto/omap-des.c
+++ b/drivers/crypto/omap-des.c
@@ -493,7 +493,7 @@ static void omap_des_finish_req(struct omap_des_dev *dd, int err)
 	crypto_finalize_skcipher_request(dd->engine, req, err);
 
 	pm_runtime_mark_last_busy(dd->dev);
-	pm_runtime_put_autosuspend(dd->dev);
+	__pm_runtime_put_autosuspend(dd->dev);
 }
 
 static int omap_des_crypt_dma_stop(struct omap_des_dev *dd)
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 5bcd9ab0f72a..6b36a1abd371 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -1168,7 +1168,7 @@ static void omap_sham_finish_req(struct ahash_request *req, int err)
 			BIT(FLAGS_DMA_READY) | BIT(FLAGS_OUTPUT_READY));
 
 	pm_runtime_mark_last_busy(dd->dev);
-	pm_runtime_put_autosuspend(dd->dev);
+	__pm_runtime_put_autosuspend(dd->dev);
 
 	ctx->offset = 0;
 
diff --git a/drivers/crypto/rockchip/rk3288_crypto_ahash.c b/drivers/crypto/rockchip/rk3288_crypto_ahash.c
index 69d6019d8abc..0c9e1a7ee429 100644
--- a/drivers/crypto/rockchip/rk3288_crypto_ahash.c
+++ b/drivers/crypto/rockchip/rk3288_crypto_ahash.c
@@ -330,7 +330,7 @@ static int rk_hash_run(struct crypto_engine *engine, void *breq)
 	}
 
 theend:
-	pm_runtime_put_autosuspend(rkc->dev);
+	__pm_runtime_put_autosuspend(rkc->dev);
 
 	rk_hash_unprepare(engine, breq);
 
diff --git a/drivers/crypto/rockchip/rk3288_crypto_skcipher.c b/drivers/crypto/rockchip/rk3288_crypto_skcipher.c
index 9393e10671c2..8ed80ab982ed 100644
--- a/drivers/crypto/rockchip/rk3288_crypto_skcipher.c
+++ b/drivers/crypto/rockchip/rk3288_crypto_skcipher.c
@@ -413,7 +413,7 @@ static int rk_cipher_run(struct crypto_engine *engine, void *async_req)
 	}
 
 theend:
-	pm_runtime_put_autosuspend(rkc->dev);
+	__pm_runtime_put_autosuspend(rkc->dev);
 
 	local_bh_disable();
 	crypto_finalize_skcipher_request(engine, areq, err);
diff --git a/drivers/crypto/stm32/stm32-crc32.c b/drivers/crypto/stm32/stm32-crc32.c
index e0faddbf8990..366f8ed11b7f 100644
--- a/drivers/crypto/stm32/stm32-crc32.c
+++ b/drivers/crypto/stm32/stm32-crc32.c
@@ -139,7 +139,7 @@ static int stm32_crc_init(struct shash_desc *desc)
 	spin_unlock_irqrestore(&crc->lock, flags);
 
 	pm_runtime_mark_last_busy(crc->dev);
-	pm_runtime_put_autosuspend(crc->dev);
+	__pm_runtime_put_autosuspend(crc->dev);
 
 	return 0;
 }
@@ -209,7 +209,7 @@ static int burst_update(struct shash_desc *desc, const u8 *d8,
 
 pm_out:
 	pm_runtime_mark_last_busy(crc->dev);
-	pm_runtime_put_autosuspend(crc->dev);
+	__pm_runtime_put_autosuspend(crc->dev);
 
 	return 0;
 }
diff --git a/drivers/crypto/stm32/stm32-cryp.c b/drivers/crypto/stm32/stm32-cryp.c
index 937f6dab8955..c4f926925f03 100644
--- a/drivers/crypto/stm32/stm32-cryp.c
+++ b/drivers/crypto/stm32/stm32-cryp.c
@@ -852,7 +852,7 @@ static void stm32_cryp_finish_req(struct stm32_cryp *cryp, int err)
 		stm32_cryp_get_iv(cryp);
 
 	pm_runtime_mark_last_busy(cryp->dev);
-	pm_runtime_put_autosuspend(cryp->dev);
+	__pm_runtime_put_autosuspend(cryp->dev);
 
 	if (is_gcm(cryp) || is_ccm(cryp))
 		crypto_finalize_aead_request(cryp->engine, cryp->areq, err);
diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c
index 351827372ea6..0d4b8a491620 100644
--- a/drivers/crypto/stm32/stm32-hash.c
+++ b/drivers/crypto/stm32/stm32-hash.c
@@ -1374,7 +1374,7 @@ static void stm32_hash_unprepare_request(struct ahash_request *req)
 
 pm_runtime:
 	pm_runtime_mark_last_busy(hdev->dev);
-	pm_runtime_put_autosuspend(hdev->dev);
+	__pm_runtime_put_autosuspend(hdev->dev);
 }
 
 static int stm32_hash_enqueue(struct ahash_request *req, unsigned int op)
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 08/51] gpio: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (10 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04  9:55   ` Bartosz Golaszewski
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski; +Cc: linux-gpio

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/gpio/gpio-arizona.c | 10 +++++-----
 drivers/gpio/gpio-mxc.c     |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c
index c15fda99120a..692983da7949 100644
--- a/drivers/gpio/gpio-arizona.c
+++ b/drivers/gpio/gpio-arizona.c
@@ -40,7 +40,7 @@ static int arizona_gpio_direction_in(struct gpio_chip *chip, unsigned offset)
 
 	if (change && persistent) {
 		pm_runtime_mark_last_busy(chip->parent);
-		pm_runtime_put_autosuspend(chip->parent);
+		__pm_runtime_put_autosuspend(chip->parent);
 	}
 
 	return 0;
@@ -63,7 +63,7 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
 		ret = pm_runtime_get_sync(chip->parent);
 		if (ret < 0) {
 			dev_err(chip->parent, "Failed to resume: %d\n", ret);
-			pm_runtime_put_autosuspend(chip->parent);
+			__pm_runtime_put_autosuspend(chip->parent);
 			return ret;
 		}
 
@@ -72,18 +72,18 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
 		if (ret < 0) {
 			dev_err(chip->parent, "Failed to drop cache: %d\n",
 				ret);
-			pm_runtime_put_autosuspend(chip->parent);
+			__pm_runtime_put_autosuspend(chip->parent);
 			return ret;
 		}
 
 		ret = regmap_read(arizona->regmap, reg, &val);
 		if (ret < 0) {
-			pm_runtime_put_autosuspend(chip->parent);
+			__pm_runtime_put_autosuspend(chip->parent);
 			return ret;
 		}
 
 		pm_runtime_mark_last_busy(chip->parent);
-		pm_runtime_put_autosuspend(chip->parent);
+		__pm_runtime_put_autosuspend(chip->parent);
 	}
 
 	if (val & ARIZONA_GPN_LVL)
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 4cb455b2bdee..ea7e7d28aa19 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -520,7 +520,7 @@ static int mxc_gpio_probe(struct platform_device *pdev)
 	list_add_tail(&port->node, &mxc_gpio_ports);
 
 	platform_set_drvdata(pdev, port);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 10/51] drm/nouveau: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (7 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Karol Herbst, Lyude Paul, Danilo Krummrich, David Airlie,
	Simona Vetter
  Cc: dri-devel, nouveau

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c     | 10 +++++-----
 drivers/gpu/drm/nouveau/nouveau_connector.c |  4 ++--
 drivers/gpu/drm/nouveau/nouveau_debugfs.c   |  8 ++++----
 drivers/gpu/drm/nouveau/nouveau_display.c   |  4 ++--
 drivers/gpu/drm/nouveau/nouveau_drm.c       | 10 +++++-----
 drivers/gpu/drm/nouveau/nouveau_gem.c       | 10 +++++-----
 6 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index eed579a6c858..63710ce16ec2 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1205,7 +1205,7 @@ nv50_mstc_detect(struct drm_connector *connector,
 
 	ret = pm_runtime_get_sync(connector->dev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 		return connector_status_disconnected;
 	}
 
@@ -1216,7 +1216,7 @@ nv50_mstc_detect(struct drm_connector *connector,
 
 out:
 	pm_runtime_mark_last_busy(connector->dev->dev);
-	pm_runtime_put_autosuspend(connector->dev->dev);
+	__pm_runtime_put_autosuspend(connector->dev->dev);
 	return ret;
 }
 
@@ -2405,7 +2405,7 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state)
 
 	/* Drop the RPM ref we got from nv50_disp_atomic_commit() */
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 }
 
 static void
@@ -2426,7 +2426,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,
 
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -2475,7 +2475,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,
 	if (ret)
 		drm_atomic_helper_unprepare_planes(dev, state);
 done:
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 8d5c9c74cbb9..cd42a198b658 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -582,7 +582,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
 	} else {
 		ret = pm_runtime_get_sync(dev->dev);
 		if (ret < 0 && ret != -EACCES) {
-			pm_runtime_put_autosuspend(dev->dev);
+			__pm_runtime_put_autosuspend(dev->dev);
 			nouveau_connector_set_edid(nv_connector, NULL);
 			return conn_status;
 		}
@@ -674,7 +674,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
 		drm_dp_cec_unset_edid(&nv_connector->aux);
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return conn_status;
 }
diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
index e83db051e851..2967772b8623 100644
--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
@@ -55,7 +55,7 @@ nouveau_debugfs_strap_peek(struct seq_file *m, void *data)
 
 	ret = pm_runtime_get_sync(drm->dev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(drm->dev->dev);
+		__pm_runtime_put_autosuspend(drm->dev->dev);
 		return ret;
 	}
 
@@ -63,7 +63,7 @@ nouveau_debugfs_strap_peek(struct seq_file *m, void *data)
 		   nvif_rd32(&drm->client.device.object, 0x101000));
 
 	pm_runtime_mark_last_busy(drm->dev->dev);
-	pm_runtime_put_autosuspend(drm->dev->dev);
+	__pm_runtime_put_autosuspend(drm->dev->dev);
 
 	return 0;
 }
@@ -184,13 +184,13 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf,
 
 	ret = pm_runtime_get_sync(drm->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(drm->dev);
+		__pm_runtime_put_autosuspend(drm->dev);
 		return ret;
 	}
 
 	ret = nvif_mthd(&debugfs->ctrl, NVIF_CONTROL_PSTATE_USER,
 			&args, sizeof(args));
-	pm_runtime_put_autosuspend(drm->dev);
+	__pm_runtime_put_autosuspend(drm->dev);
 	if (ret < 0)
 		return ret;
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index e2fd561cd23f..8cb906684a78 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -536,7 +536,7 @@ nouveau_display_hpd_work(struct work_struct *work)
 
 	pm_runtime_mark_last_busy(drm->dev->dev);
 noop:
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 }
 
 #ifdef CONFIG_ACPI
@@ -557,7 +557,7 @@ nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val,
 				 * where we can't wake it up, it can handle
 				 * it's own hotplug events.
 				 */
-				pm_runtime_put_autosuspend(drm->dev->dev);
+				__pm_runtime_put_autosuspend(drm->dev->dev);
 			} else if (ret == 0 || ret == -EINPROGRESS) {
 				/* We've started resuming the GPU already, so
 				 * it will handle scheduling a full reprobe
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 84d692d68817..ecb1fc98f758 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -1165,7 +1165,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
 	/* need to bring up power immediately if opening device */
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -1197,7 +1197,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
 	}
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
@@ -1231,7 +1231,7 @@ nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
 	nouveau_cli_fini(cli);
 	kfree(cli);
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	drm_dev_exit(dev_index);
 }
 
@@ -1265,7 +1265,7 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -1279,7 +1279,7 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	}
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 9ae2cee1c7c5..37814e22d91f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -83,7 +83,7 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
 
 	ret = pm_runtime_get_sync(dev);
 	if (WARN_ON(ret < 0 && ret != -EACCES)) {
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		return;
 	}
 
@@ -93,7 +93,7 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
 	ttm_bo_put(&nvbo->bo);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 int
@@ -121,7 +121,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
 
 	ret = pm_runtime_get_sync(dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		goto out;
 	}
 
@@ -131,7 +131,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
 	else
 		ret = 0;
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 out:
 	ttm_bo_unreserve(&nvbo->bo);
 	return ret;
@@ -211,7 +211,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
 				nouveau_gem_object_unmap(nvbo, vma);
 				pm_runtime_mark_last_busy(dev);
 			}
-			pm_runtime_put_autosuspend(dev);
+			__pm_runtime_put_autosuspend(dev);
 		}
 	}
 	ttm_bo_unreserve(&nvbo->bo);
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 12/51] drm/panfrost: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (8 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/gpu/drm/panfrost/panfrost_job.c     | 4 ++--
 drivers/gpu/drm/panfrost/panfrost_mmu.c     | 4 ++--
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
index 9b8e82fb8bc4..c15ded70a4a3 100644
--- a/drivers/gpu/drm/panfrost/panfrost_job.c
+++ b/drivers/gpu/drm/panfrost/panfrost_job.c
@@ -474,7 +474,7 @@ static void panfrost_job_handle_err(struct panfrost_device *pfdev,
 	if (signal_fence)
 		dma_fence_signal_locked(job->done_fence);
 
-	pm_runtime_put_autosuspend(pfdev->dev);
+	__pm_runtime_put_autosuspend(pfdev->dev);
 
 	if (panfrost_exception_needs_reset(pfdev, js_status)) {
 		atomic_set(&pfdev->reset.pending, 1);
@@ -493,7 +493,7 @@ static void panfrost_job_handle_done(struct panfrost_device *pfdev,
 	panfrost_devfreq_record_idle(&pfdev->pfdevfreq);
 
 	dma_fence_signal_locked(job->done_fence);
-	pm_runtime_put_autosuspend(pfdev->dev);
+	__pm_runtime_put_autosuspend(pfdev->dev);
 }
 
 static void panfrost_job_handle_irq(struct panfrost_device *pfdev, u32 status)
diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
index b91019cd5acb..4c73abb65a1d 100644
--- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
+++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
@@ -284,7 +284,7 @@ static void panfrost_mmu_flush_range(struct panfrost_device *pfdev,
 	if (pm_runtime_active(pfdev->dev))
 		mmu_hw_do_operation(pfdev, mmu, iova, size, AS_COMMAND_FLUSH_PT);
 
-	pm_runtime_put_autosuspend(pfdev->dev);
+	__pm_runtime_put_autosuspend(pfdev->dev);
 }
 
 static int mmu_map_sg(struct panfrost_device *pfdev, struct panfrost_mmu *mmu,
@@ -562,7 +562,7 @@ static void panfrost_mmu_release_ctx(struct kref *kref)
 		pm_runtime_get_noresume(pfdev->dev);
 		if (pm_runtime_active(pfdev->dev))
 			panfrost_mmu_disable(pfdev, mmu->as);
-		pm_runtime_put_autosuspend(pfdev->dev);
+		__pm_runtime_put_autosuspend(pfdev->dev);
 
 		clear_bit(mmu->as, &pfdev->as_alloc_mask);
 		clear_bit(mmu->as, &pfdev->as_in_use_mask);
diff --git a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
index ba9b6e2b2636..9d91cf537b2b 100644
--- a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
+++ b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
@@ -202,7 +202,7 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
 	panfrost_gem_mapping_put(perfcnt->mapping);
 	perfcnt->mapping = NULL;
 	pm_runtime_mark_last_busy(pfdev->dev);
-	pm_runtime_put_autosuspend(pfdev->dev);
+	__pm_runtime_put_autosuspend(pfdev->dev);
 
 	return 0;
 }
@@ -278,7 +278,7 @@ void panfrost_perfcnt_close(struct drm_file *file_priv)
 		panfrost_perfcnt_disable_locked(pfdev, file_priv);
 	mutex_unlock(&perfcnt->lock);
 	pm_runtime_mark_last_busy(pfdev->dev);
-	pm_runtime_put_autosuspend(pfdev->dev);
+	__pm_runtime_put_autosuspend(pfdev->dev);
 }
 
 int panfrost_perfcnt_init(struct panfrost_device *pfdev)
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 17/51] i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (14 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Miquel Raynal, Conor Culhane, Alexandre Belloni; +Cc: linux-i3c

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/i3c/master/svc-i3c-master.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index a7bfc678153e..684f20fbc265 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -576,7 +576,7 @@ static int svc_i3c_master_set_speed(struct i3c_master_controller *m,
 
 rpm_out:
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
 }
@@ -691,7 +691,7 @@ static int svc_i3c_master_bus_init(struct i3c_master_controller *m)
 
 rpm_out:
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
 }
@@ -713,7 +713,7 @@ static void svc_i3c_master_bus_cleanup(struct i3c_master_controller *m)
 	writel(0, master->regs + SVC_I3C_MCONFIG);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 }
 
 static int svc_i3c_master_reserve_slot(struct svc_i3c_master *master)
@@ -1070,7 +1070,7 @@ static int svc_i3c_master_do_daa(struct i3c_master_controller *m)
 
 rpm_out:
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
 }
@@ -1353,7 +1353,7 @@ static void svc_i3c_master_enqueue_xfer(struct svc_i3c_master *master,
 	spin_unlock_irqrestore(&master->xferqueue.lock, flags);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 }
 
 static bool
@@ -1643,7 +1643,7 @@ static int svc_i3c_master_disable_ibi(struct i3c_dev_desc *dev)
 	ret = i3c_master_disec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
 }
@@ -1676,7 +1676,7 @@ static int svc_i3c_master_disable_hotjoin(struct i3c_master_controller *m)
 		svc_i3c_master_disable_interrupts(master);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 
 	return 0;
 }
@@ -1820,7 +1820,7 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
 		goto rpm_disable;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
-- 
2.39.5


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 18/51] i3c: dw: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (16 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Alexandre Belloni, Aniket, Billy Tsai, Sakari Ailus, Dylan Hung; +Cc: linux-i3c

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/i3c/master/dw-i3c-master.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index 8d694672c110..d2731ed66705 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -700,7 +700,7 @@ static int dw_i3c_master_bus_init(struct i3c_master_controller *m)
 
 rpm_out:
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
 
@@ -817,7 +817,7 @@ static int dw_i3c_master_send_ccc_cmd(struct i3c_master_controller *m,
 		ret = dw_i3c_ccc_set(master, ccc);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
 
@@ -900,7 +900,7 @@ static int dw_i3c_master_daa(struct i3c_master_controller *m)
 
 rpm_out:
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
 
@@ -986,7 +986,7 @@ static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev,
 	dw_i3c_master_free_xfer(xfer);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
 
@@ -1136,7 +1136,7 @@ static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev,
 	dw_i3c_master_free_xfer(xfer);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
 
@@ -1304,7 +1304,7 @@ static int dw_i3c_master_disable_hotjoin(struct i3c_master_controller *m)
 	       master->regs + DEVICE_CTRL);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return 0;
 }
 
@@ -1330,7 +1330,7 @@ static int dw_i3c_master_enable_ibi(struct i3c_dev_desc *dev)
 	if (rc) {
 		dw_i3c_master_set_sir_enabled(master, dev, data->index, false);
 		pm_runtime_mark_last_busy(master->dev);
-		pm_runtime_put_autosuspend(master->dev);
+		__pm_runtime_put_autosuspend(master->dev);
 	}
 
 	return rc;
@@ -1350,7 +1350,7 @@ static int dw_i3c_master_disable_ibi(struct i3c_dev_desc *dev)
 	dw_i3c_master_set_sir_enabled(master, dev, data->index, false);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return 0;
 }
 
-- 
2.39.5


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 16/51] i2c: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (17 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Andi Shyti; +Cc: linux-i2c

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/i2c/busses/i2c-amd-mp2-pci.c       |  2 +-
 drivers/i2c/busses/i2c-amd-mp2.h           |  2 +-
 drivers/i2c/busses/i2c-at91-master.c       |  2 +-
 drivers/i2c/busses/i2c-cadence.c           |  2 +-
 drivers/i2c/busses/i2c-davinci.c           |  4 ++--
 drivers/i2c/busses/i2c-designware-master.c |  2 +-
 drivers/i2c/busses/i2c-designware-pcidrv.c |  2 +-
 drivers/i2c/busses/i2c-hix5hd2.c           |  2 +-
 drivers/i2c/busses/i2c-i801.c              |  4 ++--
 drivers/i2c/busses/i2c-img-scb.c           |  6 +++---
 drivers/i2c/busses/i2c-imx-lpi2c.c         |  6 +++---
 drivers/i2c/busses/i2c-imx.c               |  4 ++--
 drivers/i2c/busses/i2c-mv64xxx.c           |  2 +-
 drivers/i2c/busses/i2c-nvidia-gpu.c        |  4 ++--
 drivers/i2c/busses/i2c-omap.c              |  6 +++---
 drivers/i2c/busses/i2c-qcom-cci.c          |  2 +-
 drivers/i2c/busses/i2c-qcom-geni.c         |  2 +-
 drivers/i2c/busses/i2c-qup.c               |  4 ++--
 drivers/i2c/busses/i2c-riic.c              |  4 ++--
 drivers/i2c/busses/i2c-rzv2m.c             |  2 +-
 drivers/i2c/busses/i2c-sprd.c              |  4 ++--
 drivers/i2c/busses/i2c-stm32f7.c           | 10 +++++-----
 drivers/i2c/busses/i2c-xiic.c              |  2 +-
 23 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/drivers/i2c/busses/i2c-amd-mp2-pci.c b/drivers/i2c/busses/i2c-amd-mp2-pci.c
index 143165300949..43efef70607b 100644
--- a/drivers/i2c/busses/i2c-amd-mp2-pci.c
+++ b/drivers/i2c/busses/i2c-amd-mp2-pci.c
@@ -360,7 +360,7 @@ static int amd_mp2_pci_probe(struct pci_dev *pci_dev,
 
 	pm_runtime_set_autosuspend_delay(&pci_dev->dev, 1000);
 	pm_runtime_use_autosuspend(&pci_dev->dev);
-	pm_runtime_put_autosuspend(&pci_dev->dev);
+	__pm_runtime_put_autosuspend(&pci_dev->dev);
 	pm_runtime_allow(&pci_dev->dev);
 
 	privdata->probed = true;
diff --git a/drivers/i2c/busses/i2c-amd-mp2.h b/drivers/i2c/busses/i2c-amd-mp2.h
index 018a42de8b1e..66736440a1af 100644
--- a/drivers/i2c/busses/i2c-amd-mp2.h
+++ b/drivers/i2c/busses/i2c-amd-mp2.h
@@ -208,7 +208,7 @@ static inline void amd_mp2_pm_runtime_get(struct amd_mp2_dev *mp2_dev)
 static inline void amd_mp2_pm_runtime_put(struct amd_mp2_dev *mp2_dev)
 {
 	pm_runtime_mark_last_busy(&mp2_dev->pci_dev->dev);
-	pm_runtime_put_autosuspend(&mp2_dev->pci_dev->dev);
+	__pm_runtime_put_autosuspend(&mp2_dev->pci_dev->dev);
 }
 
 #endif
diff --git a/drivers/i2c/busses/i2c-at91-master.c b/drivers/i2c/busses/i2c-at91-master.c
index ee3b469ddfb9..ef415e01116f 100644
--- a/drivers/i2c/busses/i2c-at91-master.c
+++ b/drivers/i2c/busses/i2c-at91-master.c
@@ -717,7 +717,7 @@ static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num)
 	ret = (ret < 0) ? ret : num;
 out:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return ret;
 }
diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c
index b64026fbca66..47a1224ede6e 100644
--- a/drivers/i2c/busses/i2c-cadence.c
+++ b/drivers/i2c/busses/i2c-cadence.c
@@ -1129,7 +1129,7 @@ static int cdns_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 #endif
 
 	pm_runtime_mark_last_busy(id->dev);
-	pm_runtime_put_autosuspend(id->dev);
+	__pm_runtime_put_autosuspend(id->dev);
 	return ret;
 }
 
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index 71dc0a6688b7..454c422c665f 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -561,7 +561,7 @@ i2c_davinci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
 out:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return ret;
 }
@@ -867,7 +867,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
 		goto err_unuse_clocks;
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
 
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index 528b969253a7..e01afd49d478 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -881,7 +881,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
 done_nolock:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return ret;
 }
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 38265c3dc454..a1579bf2424c 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -285,7 +285,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
 
 	pm_runtime_set_autosuspend_delay(device, 1000);
 	pm_runtime_use_autosuspend(device);
-	pm_runtime_put_autosuspend(device);
+	__pm_runtime_put_autosuspend(device);
 	pm_runtime_allow(device);
 
 	return 0;
diff --git a/drivers/i2c/busses/i2c-hix5hd2.c b/drivers/i2c/busses/i2c-hix5hd2.c
index 370f32974763..1845191a607c 100644
--- a/drivers/i2c/busses/i2c-hix5hd2.c
+++ b/drivers/i2c/busses/i2c-hix5hd2.c
@@ -374,7 +374,7 @@ static int hix5hd2_i2c_xfer(struct i2c_adapter *adap,
 
 out:
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 	return ret;
 }
 
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 75dab01d43a7..089d430afe43 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -934,7 +934,7 @@ static s32 i801_access(struct i2c_adapter *adap, u16 addr,
 	outb_p(SMBHSTSTS_INUSE_STS | STATUS_FLAGS, SMBHSTSTS(priv));
 
 	pm_runtime_mark_last_busy(&priv->pci_dev->dev);
-	pm_runtime_put_autosuspend(&priv->pci_dev->dev);
+	__pm_runtime_put_autosuspend(&priv->pci_dev->dev);
 	return ret;
 }
 
@@ -1797,7 +1797,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	dev_pm_set_driver_flags(&dev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
 	pm_runtime_set_autosuspend_delay(&dev->dev, 1000);
 	pm_runtime_use_autosuspend(&dev->dev);
-	pm_runtime_put_autosuspend(&dev->dev);
+	__pm_runtime_put_autosuspend(&dev->dev);
 	pm_runtime_allow(&dev->dev);
 
 	return 0;
diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c
index 02f75cf310aa..3891d06ee018 100644
--- a/drivers/i2c/busses/i2c-img-scb.c
+++ b/drivers/i2c/busses/i2c-img-scb.c
@@ -1132,7 +1132,7 @@ static int img_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 	}
 
 	pm_runtime_mark_last_busy(adap->dev.parent);
-	pm_runtime_put_autosuspend(adap->dev.parent);
+	__pm_runtime_put_autosuspend(adap->dev.parent);
 
 	return i2c->msg_status ? i2c->msg_status : num;
 }
@@ -1166,7 +1166,7 @@ static int img_i2c_init(struct img_i2c *i2c)
 			 (rev >> 24) & 0xff, (rev >> 16) & 0xff,
 			 (rev >> 8) & 0xff, rev & 0xff);
 		pm_runtime_mark_last_busy(i2c->adap.dev.parent);
-		pm_runtime_put_autosuspend(i2c->adap.dev.parent);
+		__pm_runtime_put_autosuspend(i2c->adap.dev.parent);
 		return -EINVAL;
 	}
 
@@ -1318,7 +1318,7 @@ static int img_i2c_init(struct img_i2c *i2c)
 	ret = img_i2c_reset_bus(i2c);
 
 	pm_runtime_mark_last_busy(i2c->adap.dev.parent);
-	pm_runtime_put_autosuspend(i2c->adap.dev.parent);
+	__pm_runtime_put_autosuspend(i2c->adap.dev.parent);
 
 	return ret;
 }
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index 8adf2963d764..5ad13c2e34ce 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -286,7 +286,7 @@ static int lpi2c_imx_master_enable(struct lpi2c_imx_struct *lpi2c_imx)
 
 rpm_put:
 	pm_runtime_mark_last_busy(lpi2c_imx->adapter.dev.parent);
-	pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
+	__pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
 
 	return ret;
 }
@@ -300,7 +300,7 @@ static int lpi2c_imx_master_disable(struct lpi2c_imx_struct *lpi2c_imx)
 	writel(temp, lpi2c_imx->base + LPI2C_MCR);
 
 	pm_runtime_mark_last_busy(lpi2c_imx->adapter.dev.parent);
-	pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
+	__pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
 
 	return 0;
 }
@@ -645,7 +645,7 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
 		goto rpm_disable;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_info(&lpi2c_imx->adapter.dev, "LPI2C adapter registered\n");
 
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index c2358356a8ff..7f529bc7f46d 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1336,7 +1336,7 @@ static int i2c_imx_xfer(struct i2c_adapter *adapter,
 	result = i2c_imx_xfer_common(adapter, msgs, num, false);
 
 	pm_runtime_mark_last_busy(i2c_imx->adapter.dev.parent);
-	pm_runtime_put_autosuspend(i2c_imx->adapter.dev.parent);
+	__pm_runtime_put_autosuspend(i2c_imx->adapter.dev.parent);
 
 	return result;
 }
@@ -1492,7 +1492,7 @@ static int i2c_imx_probe(struct platform_device *pdev)
 		goto clk_notifier_unregister;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_dbg(&i2c_imx->adapter.dev, "claimed irq %d\n", irq);
 	dev_dbg(&i2c_imx->adapter.dev, "device resources: %pR\n", res);
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 874309580c33..32933db94550 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -773,7 +773,7 @@ mv64xxx_i2c_xfer_core(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 	drv_data->msgs = NULL;
 
 	pm_runtime_mark_last_busy(&adap->dev);
-	pm_runtime_put_autosuspend(&adap->dev);
+	__pm_runtime_put_autosuspend(&adap->dev);
 
 	return ret;
 }
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index 541d808d62d0..07f77552662f 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -217,7 +217,7 @@ static int gpu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 			dev_err(i2cd->dev, "i2c stop failed %d\n", status2);
 	}
 	pm_runtime_mark_last_busy(i2cd->dev);
-	pm_runtime_put_autosuspend(i2cd->dev);
+	__pm_runtime_put_autosuspend(i2cd->dev);
 	return status;
 }
 
@@ -318,7 +318,7 @@ static int gpu_i2c_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	pm_runtime_set_autosuspend_delay(dev, 3000);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	pm_runtime_allow(dev);
 
 	return 0;
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 92faf03d64cf..339f4c01a1f8 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -827,7 +827,7 @@ omap_i2c_xfer_common(struct i2c_adapter *adap, struct i2c_msg msgs[], int num,
 
 out:
 	pm_runtime_mark_last_busy(omap->dev);
-	pm_runtime_put_autosuspend(omap->dev);
+	__pm_runtime_put_autosuspend(omap->dev);
 	return r;
 }
 
@@ -1502,7 +1502,7 @@ omap_i2c_probe(struct platform_device *pdev)
 		 major, minor, omap->speed);
 
 	pm_runtime_mark_last_busy(omap->dev);
-	pm_runtime_put_autosuspend(omap->dev);
+	__pm_runtime_put_autosuspend(omap->dev);
 
 	return 0;
 
@@ -1590,7 +1590,7 @@ static int omap_i2c_suspend(struct device *dev)
 static int omap_i2c_resume(struct device *dev)
 {
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
index 5cc791b3b57d..a8d6888ceb21 100644
--- a/drivers/i2c/busses/i2c-qcom-cci.c
+++ b/drivers/i2c/busses/i2c-qcom-cci.c
@@ -452,7 +452,7 @@ static int cci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
 err:
 	pm_runtime_mark_last_busy(cci->dev);
-	pm_runtime_put_autosuspend(cci->dev);
+	__pm_runtime_put_autosuspend(cci->dev);
 
 	return ret;
 }
diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index 7a22e1f46e60..04f6e4c6b84f 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -716,7 +716,7 @@ static int geni_i2c_xfer(struct i2c_adapter *adap,
 		ret = geni_i2c_fifo_xfer(gi2c, msgs, num);
 
 	pm_runtime_mark_last_busy(gi2c->se.dev);
-	pm_runtime_put_autosuspend(gi2c->se.dev);
+	__pm_runtime_put_autosuspend(gi2c->se.dev);
 	gi2c->cur = NULL;
 	gi2c->err = 0;
 	return ret;
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 86ec391616b0..0f8061cae1d4 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1109,7 +1109,7 @@ static int qup_i2c_xfer(struct i2c_adapter *adap,
 out:
 
 	pm_runtime_mark_last_busy(qup->dev);
-	pm_runtime_put_autosuspend(qup->dev);
+	__pm_runtime_put_autosuspend(qup->dev);
 
 	return ret;
 }
@@ -1594,7 +1594,7 @@ static int qup_i2c_xfer_v2(struct i2c_adapter *adap,
 		ret = num;
 out:
 	pm_runtime_mark_last_busy(qup->dev);
-	pm_runtime_put_autosuspend(qup->dev);
+	__pm_runtime_put_autosuspend(qup->dev);
 
 	return ret;
 }
diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
index c218f73c3650..b4a213aa4c7b 100644
--- a/drivers/i2c/busses/i2c-riic.c
+++ b/drivers/i2c/busses/i2c-riic.c
@@ -178,7 +178,7 @@ static int riic_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
  out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return riic->err ?: num;
 }
@@ -412,7 +412,7 @@ static int riic_init_hw(struct riic_dev *riic)
 	riic_clear_set_bit(riic, ICCR1_IICRST, 0, RIIC_ICCR1);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return 0;
 }
 
diff --git a/drivers/i2c/busses/i2c-rzv2m.c b/drivers/i2c/busses/i2c-rzv2m.c
index 02b76e24a476..d7289fd8b35a 100644
--- a/drivers/i2c/busses/i2c-rzv2m.c
+++ b/drivers/i2c/busses/i2c-rzv2m.c
@@ -378,7 +378,7 @@ static int rzv2m_i2c_xfer(struct i2c_adapter *adap,
 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c
index 56b2e5c5fb49..551aba23cd1a 100644
--- a/drivers/i2c/busses/i2c-sprd.c
+++ b/drivers/i2c/busses/i2c-sprd.c
@@ -303,7 +303,7 @@ static int sprd_i2c_xfer(struct i2c_adapter *i2c_adap,
 
 err_msg:
 	pm_runtime_mark_last_busy(i2c_dev->dev);
-	pm_runtime_put_autosuspend(i2c_dev->dev);
+	__pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return ret < 0 ? ret : im;
 }
@@ -560,7 +560,7 @@ static int sprd_i2c_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(i2c_dev->dev);
-	pm_runtime_put_autosuspend(i2c_dev->dev);
+	__pm_runtime_put_autosuspend(i2c_dev->dev);
 	return 0;
 
 err_rpm_put:
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index 973a3a8c6d4a..c86874bf1070 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -1757,7 +1757,7 @@ static int stm32f7_i2c_xfer_core(struct i2c_adapter *i2c_adap,
 
 pm_free:
 	pm_runtime_mark_last_busy(i2c_dev->dev);
-	pm_runtime_put_autosuspend(i2c_dev->dev);
+	__pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return (ret < 0) ? ret : num;
 }
@@ -1866,7 +1866,7 @@ static int stm32f7_i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
 
 pm_free:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
@@ -1973,7 +1973,7 @@ static int stm32f7_i2c_reg_slave(struct i2c_client *slave)
 		stm32f7_i2c_enable_wakeup(i2c_dev, false);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -2011,7 +2011,7 @@ static int stm32f7_i2c_unreg_slave(struct i2c_client *slave)
 	}
 
 	pm_runtime_mark_last_busy(i2c_dev->dev);
-	pm_runtime_put_autosuspend(i2c_dev->dev);
+	__pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return 0;
 }
@@ -2324,7 +2324,7 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
 	dev_info(i2c_dev->dev, "STM32F7 I2C-%d bus adapter\n", adap->nr);
 
 	pm_runtime_mark_last_busy(i2c_dev->dev);
-	pm_runtime_put_autosuspend(i2c_dev->dev);
+	__pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return 0;
 
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index c4d3eb02da09..7292e649dea0 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -1194,7 +1194,7 @@ static int xiic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 
 out:
 	pm_runtime_mark_last_busy(i2c->dev);
-	pm_runtime_put_autosuspend(i2c->dev);
+	__pm_runtime_put_autosuspend(i2c->dev);
 	return err;
 }
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 15/51] stm class: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (19 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-24 10:59   ` Alexander Shishkin
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Alexander Shishkin, Maxime Coquelin, Alexandre Torgue
  Cc: linux-stm32, linux-arm-kernel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/hwtracing/stm/core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c
index cdba4e875b28..229546270bf4 100644
--- a/drivers/hwtracing/stm/core.c
+++ b/drivers/hwtracing/stm/core.c
@@ -660,7 +660,7 @@ static ssize_t stm_char_write(struct file *file, const char __user *buf,
 	count = stm_write(stm, &stmf->output, 0, kbuf, count, NULL);
 
 	pm_runtime_mark_last_busy(&stm->dev);
-	pm_runtime_put_autosuspend(&stm->dev);
+	__pm_runtime_put_autosuspend(&stm->dev);
 	kfree(kbuf);
 
 	return count;
@@ -680,7 +680,7 @@ static void stm_mmap_close(struct vm_area_struct *vma)
 	struct stm_device *stm = stmf->stm;
 
 	pm_runtime_mark_last_busy(&stm->dev);
-	pm_runtime_put_autosuspend(&stm->dev);
+	__pm_runtime_put_autosuspend(&stm->dev);
 }
 
 static const struct vm_operations_struct stm_mmap_vmops = {
@@ -1083,7 +1083,7 @@ static int __stm_source_link_drop(struct stm_source_device *src,
 	stm_output_free(link, &src->output);
 	list_del_init(&src->link_entry);
 	pm_runtime_mark_last_busy(&link->dev);
-	pm_runtime_put_autosuspend(&link->dev);
+	__pm_runtime_put_autosuspend(&link->dev);
 	/* matches stm_find_device() from stm_source_link_store() */
 	stm_put_device(link);
 	rcu_assign_pointer(src->link, NULL);
@@ -1181,7 +1181,7 @@ static ssize_t stm_source_link_store(struct device *dev,
 
 	err = stm_source_link_add(src, link);
 	if (err) {
-		pm_runtime_put_autosuspend(&link->dev);
+		__pm_runtime_put_autosuspend(&link->dev);
 		/* matches the stm_find_device() above */
 		stm_put_device(link);
 	}
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 13/51] drivers: drm: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (18 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: David Airlie, Simona Vetter; +Cc: dri-devel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c |  2 +-
 drivers/gpu/drm/bridge/analogix/anx7625.c          |  4 ++--
 drivers/gpu/drm/bridge/parade-ps8640.c             |  4 ++--
 drivers/gpu/drm/bridge/ti-sn65dsi86.c              | 14 +++++++-------
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c              | 12 ++++++------
 drivers/gpu/drm/exynos/exynos_drm_fimc.c           |  4 ++--
 drivers/gpu/drm/exynos/exynos_drm_g2d.c            |  4 ++--
 drivers/gpu/drm/exynos/exynos_drm_gsc.c            |  6 +++---
 drivers/gpu/drm/exynos/exynos_drm_rotator.c        |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_scaler.c         |  2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c            |  4 ++--
 drivers/gpu/drm/imx/dcss/dcss-crtc.c               |  2 +-
 drivers/gpu/drm/lima/lima_sched.c                  |  2 +-
 drivers/gpu/drm/msm/adreno/adreno_device.c         |  2 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c            |  2 +-
 drivers/gpu/drm/msm/msm_gpu.c                      |  2 +-
 drivers/gpu/drm/msm/msm_iommu.c                    |  4 ++--
 drivers/gpu/drm/msm/msm_submitqueue.c              |  2 +-
 drivers/gpu/drm/panel/panel-edp.c                  |  8 ++++----
 drivers/gpu/drm/panel/panel-samsung-atna33xc20.c   |  6 +++---
 drivers/gpu/drm/panel/panel-simple.c               |  6 +++---
 drivers/gpu/drm/panthor/panthor_device.c           |  2 +-
 drivers/gpu/drm/panthor/panthor_sched.c            |  6 +++---
 drivers/gpu/drm/tegra/submit.c                     |  2 +-
 drivers/gpu/drm/tidss/tidss_drv.c                  |  2 +-
 drivers/gpu/drm/vc4/vc4_v3d.c                      |  2 +-
 26 files changed, 54 insertions(+), 54 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index bfa88409a7ff..42681a76ee67 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1543,7 +1543,7 @@ static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux,
 	ret = analogix_dp_transfer(dp, msg);
 out:
 	pm_runtime_mark_last_busy(dp->dev);
-	pm_runtime_put_autosuspend(dp->dev);
+	__pm_runtime_put_autosuspend(dp->dev);
 
 	return ret;
 }
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index a2675b121fe4..f7dd55407ea9 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -1521,7 +1521,7 @@ static int anx7625_wait_hpd_asserted(struct drm_dp_aux *aux,
 	pm_runtime_get_sync(dev);
 	ret = _anx7625_hpd_polling(ctx, wait_us);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1771,7 +1771,7 @@ static ssize_t anx7625_aux_transfer(struct drm_dp_aux *aux,
 		ret = anx7625_aux_trans(ctx, msg->request, msg->address,
 					msg->size, msg->buffer);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	mutex_unlock(&ctx->aux_lock);
 
 	return ret;
diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
index 14d4dcf239da..a0faf4bd8866 100644
--- a/drivers/gpu/drm/bridge/parade-ps8640.c
+++ b/drivers/gpu/drm/bridge/parade-ps8640.c
@@ -200,7 +200,7 @@ static int ps8640_wait_hpd_asserted(struct drm_dp_aux *aux, unsigned long wait_u
 	pm_runtime_get_sync(dev);
 	ret = _ps8640_wait_hpd_asserted(ps_bridge, wait_us);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -355,7 +355,7 @@ static ssize_t ps8640_aux_transfer(struct drm_dp_aux *aux,
 	}
 	ret = ps8640_aux_transfer_msg(aux, msg);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 exit:
 	mutex_unlock(&ps_bridge->aux_lock);
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 9e31f750fd88..06e9e538f351 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -420,7 +420,7 @@ static int status_show(struct seq_file *s, void *data)
 		seq_printf(s, "[0x%02x] = 0x%08x\n", reg, val);
 	}
 
-	pm_runtime_put_autosuspend(pdata->dev);
+	__pm_runtime_put_autosuspend(pdata->dev);
 
 	return 0;
 }
@@ -626,7 +626,7 @@ static ssize_t ti_sn_aux_transfer(struct drm_dp_aux *aux,
 exit:
 	mutex_unlock(&pdata->comms_mutex);
 	pm_runtime_mark_last_busy(pdata->dev);
-	pm_runtime_put_autosuspend(pdata->dev);
+	__pm_runtime_put_autosuspend(pdata->dev);
 
 	if (ret)
 		return ret;
@@ -721,7 +721,7 @@ static int ti_sn_attach_host(struct auxiliary_device *adev, struct ti_sn65dsi86
 	/* check if continuous dsi clock is required or not */
 	pm_runtime_get_sync(dev);
 	regmap_read(pdata->regmap, SN_DPPLL_SRC_REG, &val);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	if (!(val & DPPLL_CLK_SRC_DSICLK))
 		dsi->mode_flags |= MIPI_DSI_CLOCK_NON_CONTINUOUS;
 
@@ -1201,7 +1201,7 @@ static enum drm_connector_status ti_sn_bridge_detect(struct drm_bridge *bridge)
 
 	pm_runtime_get_sync(pdata->dev);
 	regmap_read(pdata->regmap, SN_HPD_DISABLE_REG, &val);
-	pm_runtime_put_autosuspend(pdata->dev);
+	__pm_runtime_put_autosuspend(pdata->dev);
 
 	return val & HPD_DEBOUNCED_STATE ? connector_status_connected
 					 : connector_status_disconnected;
@@ -1694,7 +1694,7 @@ static int ti_sn_bridge_gpio_get(struct gpio_chip *chip, unsigned int offset)
 	 */
 	pm_runtime_get_sync(pdata->dev);
 	ret = regmap_read(pdata->regmap, SN_GPIO_IO_REG, &val);
-	pm_runtime_put_autosuspend(pdata->dev);
+	__pm_runtime_put_autosuspend(pdata->dev);
 
 	if (ret)
 		return ret;
@@ -1745,7 +1745,7 @@ static int ti_sn_bridge_gpio_direction_input(struct gpio_chip *chip,
 	 * it off and when it comes back it will have lost all state, but
 	 * that's OK because the default is input and we're now an input.
 	 */
-	pm_runtime_put_autosuspend(pdata->dev);
+	__pm_runtime_put_autosuspend(pdata->dev);
 
 	return 0;
 }
@@ -1771,7 +1771,7 @@ static int ti_sn_bridge_gpio_direction_output(struct gpio_chip *chip,
 				 SN_GPIO_MUX_OUTPUT << shift);
 	if (ret) {
 		clear_bit(offset, pdata->gchip_output);
-		pm_runtime_put_autosuspend(pdata->dev);
+		__pm_runtime_put_autosuspend(pdata->dev);
 	}
 
 	return ret;
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 7c7f97793ddd..ffcf76af9585 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -896,14 +896,14 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 	mutex_unlock(&gpu->lock);
 
 	pm_runtime_mark_last_busy(gpu->dev);
-	pm_runtime_put_autosuspend(gpu->dev);
+	__pm_runtime_put_autosuspend(gpu->dev);
 
 	return 0;
 
 fail:
 	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
-	pm_runtime_put_autosuspend(gpu->dev);
+	__pm_runtime_put_autosuspend(gpu->dev);
 
 	return ret;
 }
@@ -1090,7 +1090,7 @@ int etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m)
 
 	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
-	pm_runtime_put_autosuspend(gpu->dev);
+	__pm_runtime_put_autosuspend(gpu->dev);
 
 	return ret;
 }
@@ -1217,7 +1217,7 @@ static int event_alloc(struct etnaviv_gpu *gpu, unsigned nr_events,
 
 out_rpm:
 	for (i = 0; i < rpm_count; i++)
-		pm_runtime_put_autosuspend(gpu->dev);
+		__pm_runtime_put_autosuspend(gpu->dev);
 out:
 	for (i = 0; i < acquired; i++)
 		complete(&gpu->event_free);
@@ -1235,7 +1235,7 @@ static void event_free(struct etnaviv_gpu *gpu, unsigned int event)
 		complete(&gpu->event_free);
 	}
 
-	pm_runtime_put_autosuspend(gpu->dev);
+	__pm_runtime_put_autosuspend(gpu->dev);
 }
 
 /*
@@ -1492,7 +1492,7 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gem_submit *submit)
 	mutex_unlock(&gpu->lock);
 	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
-	pm_runtime_put_autosuspend(gpu->dev);
+	__pm_runtime_put_autosuspend(gpu->dev);
 }
 
 static void dump_mmu_fault(struct etnaviv_gpu *gpu)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index 4d7ea65b7dd8..4ad9c39b52aa 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -968,7 +968,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
 
 		ctx->task = NULL;
 		pm_runtime_mark_last_busy(ctx->dev);
-		pm_runtime_put_autosuspend(ctx->dev);
+		__pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, 0);
 	}
 
@@ -1120,7 +1120,7 @@ static void fimc_abort(struct exynos_drm_ipp *ipp,
 
 		ctx->task = NULL;
 		pm_runtime_mark_last_busy(ctx->dev);
-		pm_runtime_put_autosuspend(ctx->dev);
+		__pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, -EIO);
 	}
 }
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index 3a3b2c00e400..cb315077d5f3 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -882,7 +882,7 @@ static void g2d_runqueue_worker(struct work_struct *work)
 
 	if (runqueue_node) {
 		pm_runtime_mark_last_busy(g2d->dev);
-		pm_runtime_put_autosuspend(g2d->dev);
+		__pm_runtime_put_autosuspend(g2d->dev);
 
 		complete(&runqueue_node->complete);
 		if (runqueue_node->async)
@@ -1010,7 +1010,7 @@ static void g2d_wait_finish(struct g2d_data *g2d, struct drm_file *file)
 	 * So do this manually here.
 	 */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	complete(&runqueue_node->complete);
 	if (runqueue_node->async)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index 59fa22050717..0a85e746e3f8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -1054,7 +1054,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id)
 
 		ctx->task = NULL;
 		pm_runtime_mark_last_busy(ctx->dev);
-		pm_runtime_put_autosuspend(ctx->dev);
+		__pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, err);
 	}
 
@@ -1127,7 +1127,7 @@ static int gsc_commit(struct exynos_drm_ipp *ipp,
 
 	ret = gsc_reset(ctx);
 	if (ret) {
-		pm_runtime_put_autosuspend(ctx->dev);
+		__pm_runtime_put_autosuspend(ctx->dev);
 		ctx->task = NULL;
 		return ret;
 	}
@@ -1157,7 +1157,7 @@ static void gsc_abort(struct exynos_drm_ipp *ipp,
 
 		ctx->task = NULL;
 		pm_runtime_mark_last_busy(ctx->dev);
-		pm_runtime_put_autosuspend(ctx->dev);
+		__pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, -EIO);
 	}
 }
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index 2eb0b701672f..252555003a74 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -108,7 +108,7 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg)
 
 		rot->task = NULL;
 		pm_runtime_mark_last_busy(rot->dev);
-		pm_runtime_put_autosuspend(rot->dev);
+		__pm_runtime_put_autosuspend(rot->dev);
 		exynos_drm_ipp_task_done(task,
 			irq_status == ROT_IRQ_STATUS_COMPLETE ? 0 : -EINVAL);
 	}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_scaler.c b/drivers/gpu/drm/exynos/exynos_drm_scaler.c
index 2788105ac780..0be5eaf1335e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_scaler.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_scaler.c
@@ -439,7 +439,7 @@ static irqreturn_t scaler_irq_handler(int irq, void *arg)
 
 		scaler->task = NULL;
 		pm_runtime_mark_last_busy(scaler->dev);
-		pm_runtime_put_autosuspend(scaler->dev);
+		__pm_runtime_put_autosuspend(scaler->dev);
 		exynos_drm_ipp_task_done(task, scaler_task_done(val));
 	}
 
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index a21f5a1c89bc..bceb94f8d2f8 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -304,7 +304,7 @@ static void __intel_runtime_pm_put(struct intel_runtime_pm *rpm,
 	intel_runtime_pm_release(rpm, wakelock);
 
 	pm_runtime_mark_last_busy(kdev);
-	pm_runtime_put_autosuspend(kdev);
+	__pm_runtime_put_autosuspend(kdev);
 }
 
 /**
@@ -415,7 +415,7 @@ void intel_runtime_pm_enable(struct intel_runtime_pm *rpm)
 	 * We drop that here and will reacquire it during unloading in
 	 * intel_power_domains_fini().
 	 */
-	pm_runtime_put_autosuspend(kdev);
+	__pm_runtime_put_autosuspend(kdev);
 }
 
 void intel_runtime_pm_disable(struct intel_runtime_pm *rpm)
diff --git a/drivers/gpu/drm/imx/dcss/dcss-crtc.c b/drivers/gpu/drm/imx/dcss/dcss-crtc.c
index af91e45b5d13..48a4becb92e9 100644
--- a/drivers/gpu/drm/imx/dcss/dcss-crtc.c
+++ b/drivers/gpu/drm/imx/dcss/dcss-crtc.c
@@ -155,7 +155,7 @@ static void dcss_crtc_atomic_disable(struct drm_crtc *crtc,
 	drm_crtc_vblank_off(crtc);
 
 	pm_runtime_mark_last_busy(dcss->dev);
-	pm_runtime_put_autosuspend(dcss->dev);
+	__pm_runtime_put_autosuspend(dcss->dev);
 }
 
 static const struct drm_crtc_helper_funcs dcss_helper_funcs = {
diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c
index b40c90e97d7e..c7e6e995c01b 100644
--- a/drivers/gpu/drm/lima/lima_sched.c
+++ b/drivers/gpu/drm/lima/lima_sched.c
@@ -196,7 +196,7 @@ static void lima_pm_idle(struct lima_device *ldev)
 
 	/* GPU can do auto runtime suspend */
 	pm_runtime_mark_last_busy(ldev->dev);
-	pm_runtime_put_autosuspend(ldev->dev);
+	__pm_runtime_put_autosuspend(ldev->dev);
 }
 
 static struct dma_fence *lima_sched_run_job(struct drm_sched_job *job)
diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
index cfc74a9e2646..8fc0c9ca14bd 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_device.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
@@ -110,7 +110,7 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
 		goto err_put_rpm;
 	}
 
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 #ifdef CONFIG_DEBUG_FS
 	if (gpu->funcs->debugfs_init) {
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 465a4cd14a43..fbe38f5c1ec8 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -343,7 +343,7 @@ int adreno_get_param(struct msm_gpu *gpu, struct msm_file_private *ctx,
 
 			pm_runtime_get_sync(&gpu->pdev->dev);
 			ret = adreno_gpu->funcs->get_timestamp(gpu, value);
-			pm_runtime_put_autosuspend(&gpu->pdev->dev);
+			__pm_runtime_put_autosuspend(&gpu->pdev->dev);
 
 			return ret;
 		}
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index a274b8466423..8fcfa7e65848 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -687,7 +687,7 @@ static void retire_submit(struct msm_gpu *gpu, struct msm_ringbuffer *ring,
 	WARN_ON(gpu->active_submits < 0);
 	if (!gpu->active_submits) {
 		msm_devfreq_idle(gpu);
-		pm_runtime_put_autosuspend(&gpu->pdev->dev);
+		__pm_runtime_put_autosuspend(&gpu->pdev->dev);
 	}
 
 	mutex_unlock(&gpu->active_lock);
diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c
index 2a94e82316f9..ea478ab9fdbd 100644
--- a/drivers/gpu/drm/msm/msm_iommu.c
+++ b/drivers/gpu/drm/msm/msm_iommu.c
@@ -213,7 +213,7 @@ static void msm_iommu_tlb_flush_all(void *cookie)
 
 	pagetable->tlb->tlb_flush_all((void *)adreno_smmu->cookie);
 
-	pm_runtime_put_autosuspend(pagetable->iommu_dev);
+	__pm_runtime_put_autosuspend(pagetable->iommu_dev);
 }
 
 static void msm_iommu_tlb_flush_walk(unsigned long iova, size_t size,
@@ -229,7 +229,7 @@ static void msm_iommu_tlb_flush_walk(unsigned long iova, size_t size,
 
 	pagetable->tlb->tlb_flush_walk(iova, size, granule, (void *)adreno_smmu->cookie);
 
-	pm_runtime_put_autosuspend(pagetable->iommu_dev);
+	__pm_runtime_put_autosuspend(pagetable->iommu_dev);
 }
 
 static void msm_iommu_tlb_add_page(struct iommu_iotlb_gather *gather,
diff --git a/drivers/gpu/drm/msm/msm_submitqueue.c b/drivers/gpu/drm/msm/msm_submitqueue.c
index 0e803125a325..4c003c884184 100644
--- a/drivers/gpu/drm/msm/msm_submitqueue.c
+++ b/drivers/gpu/drm/msm/msm_submitqueue.c
@@ -32,7 +32,7 @@ int msm_file_private_set_sysprof(struct msm_file_private *ctx,
 	/* unwind old value: */
 	switch (ctx->sysprof) {
 	case 2:
-		pm_runtime_put_autosuspend(&gpu->pdev->dev);
+		__pm_runtime_put_autosuspend(&gpu->pdev->dev);
 		fallthrough;
 	case 1:
 		refcount_dec(&gpu->sysprof_active);
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index 767e47a2b0c1..0d3b9b9e410d 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -532,7 +532,7 @@ static int panel_edp_prepare(struct drm_panel *panel)
 
 	ret = pm_runtime_get_sync(panel->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(panel->dev);
+		__pm_runtime_put_autosuspend(panel->dev);
 		return ret;
 	}
 
@@ -614,7 +614,7 @@ static int panel_edp_get_modes(struct drm_panel *panel,
 		}
 
 		pm_runtime_mark_last_busy(panel->dev);
-		pm_runtime_put_autosuspend(panel->dev);
+		__pm_runtime_put_autosuspend(panel->dev);
 	}
 
 	if (has_hard_coded_modes)
@@ -826,7 +826,7 @@ static int generic_edp_panel_probe(struct device *dev, struct panel_edp *panel)
 
 exit:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -919,7 +919,7 @@ static int panel_edp_probe(struct device *dev, const struct panel_desc *desc,
 		pm_runtime_get_sync(dev);
 		err = drm_panel_dp_aux_backlight(&panel->base, panel->aux);
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 
 		/*
 		 * Warn if we get an error, but don't consider it fatal. Having
diff --git a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
index 9a482a744b8c..65e7400adec1 100644
--- a/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
+++ b/drivers/gpu/drm/panel/panel-samsung-atna33xc20.c
@@ -213,7 +213,7 @@ static int atana33xc20_prepare(struct drm_panel *panel)
 
 	ret = pm_runtime_get_sync(panel->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(panel->dev);
+		__pm_runtime_put_autosuspend(panel->dev);
 		return ret;
 	}
 
@@ -237,7 +237,7 @@ static int atana33xc20_get_modes(struct drm_panel *panel,
 	num = drm_edid_connector_add_modes(connector);
 
 	pm_runtime_mark_last_busy(panel->dev);
-	pm_runtime_put_autosuspend(panel->dev);
+	__pm_runtime_put_autosuspend(panel->dev);
 
 	return num;
 }
@@ -306,7 +306,7 @@ static int atana33xc20_probe(struct dp_aux_ep_device *aux_ep)
 	pm_runtime_get_sync(dev);
 	ret = drm_panel_dp_aux_backlight(&panel->base, aux_ep->aux);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	/*
 	 * Warn if we get an error, but don't consider it fatal. Having
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 86735430462f..b79bab689dae 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -312,7 +312,7 @@ static int panel_simple_unprepare(struct drm_panel *panel)
 	int ret;
 
 	pm_runtime_mark_last_busy(panel->dev);
-	ret = pm_runtime_put_autosuspend(panel->dev);
+	ret = __pm_runtime_put_autosuspend(panel->dev);
 	if (ret < 0)
 		return ret;
 
@@ -346,7 +346,7 @@ static int panel_simple_prepare(struct drm_panel *panel)
 
 	ret = pm_runtime_get_sync(panel->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(panel->dev);
+		__pm_runtime_put_autosuspend(panel->dev);
 		return ret;
 	}
 
@@ -381,7 +381,7 @@ static int panel_simple_get_modes(struct drm_panel *panel,
 		num += drm_edid_connector_add_modes(connector);
 
 		pm_runtime_mark_last_busy(panel->dev);
-		pm_runtime_put_autosuspend(panel->dev);
+		__pm_runtime_put_autosuspend(panel->dev);
 	}
 
 	/* add hard-coded panel modes */
diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
index 4082c8f2951d..7cf237f21ae1 100644
--- a/drivers/gpu/drm/panthor/panthor_device.c
+++ b/drivers/gpu/drm/panthor/panthor_device.c
@@ -250,7 +250,7 @@ int panthor_device_init(struct panthor_device *ptdev)
 	if (ret)
 		goto err_disable_autosuspend;
 
-	pm_runtime_put_autosuspend(ptdev->base.dev);
+	__pm_runtime_put_autosuspend(ptdev->base.dev);
 	return 0;
 
 err_disable_autosuspend:
diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
index eb9f6635cc12..9d342d660b71 100644
--- a/drivers/gpu/drm/panthor/panthor_sched.c
+++ b/drivers/gpu/drm/panthor/panthor_sched.c
@@ -2412,7 +2412,7 @@ static void tick_work(struct work_struct *work)
 	if (ctx.idle_group_count == ctx.group_count) {
 		panthor_devfreq_record_idle(sched->ptdev);
 		if (sched->pm.has_ref) {
-			pm_runtime_put_autosuspend(ptdev->base.dev);
+			__pm_runtime_put_autosuspend(ptdev->base.dev);
 			sched->pm.has_ref = false;
 		}
 	} else {
@@ -2437,7 +2437,7 @@ static void tick_work(struct work_struct *work)
 out_unlock:
 	mutex_unlock(&sched->lock);
 	pm_runtime_mark_last_busy(ptdev->base.dev);
-	pm_runtime_put_autosuspend(ptdev->base.dev);
+	__pm_runtime_put_autosuspend(ptdev->base.dev);
 
 out_dev_exit:
 	drm_dev_exit(cookie);
@@ -3181,7 +3181,7 @@ queue_run_job(struct drm_sched_job *sched_job)
 out_unlock:
 	mutex_unlock(&sched->lock);
 	pm_runtime_mark_last_busy(ptdev->base.dev);
-	pm_runtime_put_autosuspend(ptdev->base.dev);
+	__pm_runtime_put_autosuspend(ptdev->base.dev);
 
 	return done_fence;
 }
diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c
index 2430fcc97448..d9e8ec2f7a6c 100644
--- a/drivers/gpu/drm/tegra/submit.c
+++ b/drivers/gpu/drm/tegra/submit.c
@@ -503,7 +503,7 @@ static void release_job(struct host1x_job *job)
 	kfree(job_data);
 
 	pm_runtime_mark_last_busy(client->base.dev);
-	pm_runtime_put_autosuspend(client->base.dev);
+	__pm_runtime_put_autosuspend(client->base.dev);
 }
 
 int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data,
diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c
index 2428b9aaa003..95060073cc5c 100644
--- a/drivers/gpu/drm/tidss/tidss_drv.c
+++ b/drivers/gpu/drm/tidss/tidss_drv.c
@@ -46,7 +46,7 @@ void tidss_runtime_put(struct tidss_device *tidss)
 
 	pm_runtime_mark_last_busy(tidss->dev);
 
-	r = pm_runtime_put_autosuspend(tidss->dev);
+	r = __pm_runtime_put_autosuspend(tidss->dev);
 	WARN_ON(r < 0);
 }
 
diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c
index 2423826c89eb..8a21a3a834e3 100644
--- a/drivers/gpu/drm/vc4/vc4_v3d.c
+++ b/drivers/gpu/drm/vc4/vc4_v3d.c
@@ -154,7 +154,7 @@ vc4_v3d_pm_put(struct vc4_dev *vc4)
 	mutex_lock(&vc4->power_lock);
 	if (--vc4->power_refcount == 0) {
 		pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev);
-		pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
+		__pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
 	}
 	mutex_unlock(&vc4->power_lock);
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 14/51] HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (15 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Sebastian Reichel, Sakari Ailus, Uwe Kleine-König; +Cc: linux-kernel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/hsi/controllers/omap_ssi_port.c | 42 ++++++++++++-------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c
index f0b3eca7376e..893702eeaa86 100644
--- a/drivers/hsi/controllers/omap_ssi_port.c
+++ b/drivers/hsi/controllers/omap_ssi_port.c
@@ -114,7 +114,7 @@ static int ssi_port_regs_show(struct seq_file *m, void *p __maybe_unused)
 		seq_printf(m, "BUFFER_CH%d\t: 0x%08x\n", ch,
 				readl(base + SSI_SSR_BUFFER_CH_REG(ch)));
 	}
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return 0;
 }
@@ -128,7 +128,7 @@ static int ssi_div_get(void *data, u64 *val)
 
 	pm_runtime_get_sync(omap_port->pdev);
 	*val = readl(omap_port->sst_base + SSI_SST_DIVISOR_REG);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return 0;
 }
@@ -144,7 +144,7 @@ static int ssi_div_set(void *data, u64 val)
 	pm_runtime_get_sync(omap_port->pdev);
 	writel(val, omap_port->sst_base + SSI_SST_DIVISOR_REG);
 	omap_port->sst.divisor = val;
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return 0;
 }
@@ -217,7 +217,7 @@ static int ssi_start_dma(struct hsi_msg *msg, int lch)
 
 	if (!pm_runtime_active(omap_port->pdev)) {
 		dev_warn(&port->device, "ssi_start_dma called without runtime PM!\n");
-		pm_runtime_put_autosuspend(omap_port->pdev);
+		__pm_runtime_put_autosuspend(omap_port->pdev);
 		return -EREMOTEIO;
 	}
 
@@ -226,7 +226,7 @@ static int ssi_start_dma(struct hsi_msg *msg, int lch)
 							DMA_FROM_DEVICE);
 		if (!err) {
 			dev_dbg(&ssi->device, "DMA map SG failed !\n");
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 			return -EIO;
 		}
 		csdp = SSI_DST_BURST_4x32_BIT | SSI_DST_MEMORY_PORT |
@@ -243,7 +243,7 @@ static int ssi_start_dma(struct hsi_msg *msg, int lch)
 							DMA_TO_DEVICE);
 		if (!err) {
 			dev_dbg(&ssi->device, "DMA map SG failed !\n");
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 			return -EIO;
 		}
 		csdp = SSI_SRC_BURST_4x32_BIT | SSI_SRC_MEMORY_PORT |
@@ -289,7 +289,7 @@ static int ssi_start_pio(struct hsi_msg *msg)
 
 	if (!pm_runtime_active(omap_port->pdev)) {
 		dev_warn(&port->device, "ssi_start_pio called without runtime PM!\n");
-		pm_runtime_put_autosuspend(omap_port->pdev);
+		__pm_runtime_put_autosuspend(omap_port->pdev);
 		return -EREMOTEIO;
 	}
 
@@ -304,7 +304,7 @@ static int ssi_start_pio(struct hsi_msg *msg)
 						msg->ttype ? "write" : "read");
 	val |= readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0));
 	writel(val, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0));
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 	msg->actual_len = 0;
 	msg->status = HSI_STATUS_PROCEEDING;
 
@@ -363,7 +363,7 @@ static int ssi_async_break(struct hsi_msg *msg)
 	}
 out:
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return err;
 }
@@ -402,7 +402,7 @@ static int ssi_async(struct hsi_msg *msg)
 	}
 	spin_unlock_bh(&omap_port->lock);
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 	dev_dbg(&port->device, "msg status %d ttype %d ch %d\n",
 				msg->status, msg->ttype, msg->channel);
 
@@ -505,7 +505,7 @@ static int ssi_setup(struct hsi_client *cl)
 out:
 	spin_unlock_bh(&omap_port->lock);
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return err;
 }
@@ -536,7 +536,7 @@ static int ssi_flush(struct hsi_client *cl)
 			continue;
 		writew_relaxed(0, omap_ssi->gdd + SSI_GDD_CCR_REG(i));
 		if (msg->ttype == HSI_MSG_READ)
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 		omap_ssi->gdd_trn[i].msg = NULL;
 	}
 	/* Flush all SST buffers */
@@ -560,7 +560,7 @@ static int ssi_flush(struct hsi_client *cl)
 	for (i = 0; i < omap_port->channels; i++) {
 		/* Release write clocks */
 		if (!list_empty(&omap_port->txqueue[i]))
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 		ssi_flush_queue(&omap_port->txqueue[i], NULL);
 		ssi_flush_queue(&omap_port->rxqueue[i], NULL);
 	}
@@ -571,7 +571,7 @@ static int ssi_flush(struct hsi_client *cl)
 
 	spin_unlock_bh(&omap_port->lock);
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return 0;
 }
@@ -626,7 +626,7 @@ static int ssi_stop_tx(struct hsi_client *cl)
 	spin_unlock_bh(&omap_port->wk_lock);
 
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev); /* Release clocks */
+	__pm_runtime_put_autosuspend(omap_port->pdev); /* Release clocks */
 
 
 	return 0;
@@ -654,7 +654,7 @@ static void ssi_transfer(struct omap_ssi_port *omap_port,
 	}
 	spin_unlock_bh(&omap_port->lock);
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 }
 
 static void ssi_cleanup_queues(struct hsi_client *cl)
@@ -684,7 +684,7 @@ static void ssi_cleanup_queues(struct hsi_client *cl)
 			status |= SSI_DATAACCEPT(i);
 			/* Release the clocks writes, also GDD ones */
 			pm_runtime_mark_last_busy(omap_port->pdev);
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 		ssi_flush_queue(&omap_port->txqueue[i], cl);
 	}
@@ -740,7 +740,7 @@ static void ssi_cleanup_gdd(struct hsi_controller *ssi, struct hsi_client *cl)
 		 */
 		if (msg->ttype == HSI_MSG_READ) {
 			pm_runtime_mark_last_busy(omap_port->pdev);
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 		omap_ssi->gdd_trn[i].msg = NULL;
 	}
@@ -937,7 +937,7 @@ static void ssi_pio_complete(struct hsi_port *port, struct list_head *queue)
 	if (msg->ttype == HSI_MSG_WRITE) {
 		/* Release clocks for write transfer */
 		pm_runtime_mark_last_busy(omap_port->pdev);
-		pm_runtime_put_autosuspend(omap_port->pdev);
+		__pm_runtime_put_autosuspend(omap_port->pdev);
 	}
 	reg &= ~val;
 	writel_relaxed(reg, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0));
@@ -982,7 +982,7 @@ static irqreturn_t ssi_pio_thread(int irq, void *ssi_port)
 	} while (status_reg);
 
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return IRQ_HANDLED;
 }
@@ -1019,7 +1019,7 @@ static irqreturn_t ssi_wake_thread(int irq __maybe_unused, void *ssi_port)
 		hsi_event(port, HSI_EVENT_STOP_RX);
 		if (test_and_clear_bit(SSI_WAKE_EN, &omap_port->flags)) {
 			pm_runtime_mark_last_busy(omap_port->pdev);
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 	}
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 23/51] irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (26 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-06 19:52   ` Thomas Gleixner
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Thomas Gleixner, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam
  Cc: imx, linux-arm-kernel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/irqchip/irq-imx-irqsteer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c
index 75a0e980ff35..f8b9462ae968 100644
--- a/drivers/irqchip/irq-imx-irqsteer.c
+++ b/drivers/irqchip/irq-imx-irqsteer.c
@@ -84,7 +84,7 @@ static void imx_irqsteer_irq_bus_sync_unlock(struct irq_data *d)
 {
 	struct irqsteer_data *data = d->chip_data;
 
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 }
 
 static const struct irq_chip imx_irqsteer_irq_chip = {
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 20/51] Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (20 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04  9:55   ` Andreas Kemnade
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Dmitry Torokhov, Tony Lindgren, Andreas Kemnade, Sakari Ailus; +Cc: linux-input

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/input/keyboard/omap4-keypad.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 040b340995d8..cc8d77601fc7 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -196,7 +196,7 @@ static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
 			 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return IRQ_HANDLED;
 }
@@ -234,7 +234,7 @@ static int omap4_keypad_open(struct input_dev *input)
 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return error;
 }
@@ -268,7 +268,7 @@ static void omap4_keypad_close(struct input_dev *input)
 	clk_disable_unprepare(keypad_data->fck);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static int omap4_keypad_parse_dt(struct device *dev,
@@ -407,7 +407,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	if (error)
 		return error;
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 21/51] Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (24 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04 11:09   ` Dmitry Torokhov
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: James Ogletree, Fred Treven, Ben Bright, Dmitry Torokhov
  Cc: patches, linux-input

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/input/misc/cs40l50-vibra.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/input/misc/cs40l50-vibra.c b/drivers/input/misc/cs40l50-vibra.c
index 03bdb7c26ec0..8555f0d93d3f 100644
--- a/drivers/input/misc/cs40l50-vibra.c
+++ b/drivers/input/misc/cs40l50-vibra.c
@@ -307,7 +307,7 @@ static void cs40l50_add_worker(struct work_struct *work)
 	}
 err_pm:
 	pm_runtime_mark_last_busy(vib->dev);
-	pm_runtime_put_autosuspend(vib->dev);
+	__pm_runtime_put_autosuspend(vib->dev);
 err_exit:
 	work_data->error = error;
 }
@@ -366,7 +366,7 @@ static void cs40l50_start_worker(struct work_struct *work)
 	}
 
 	pm_runtime_mark_last_busy(vib->dev);
-	pm_runtime_put_autosuspend(vib->dev);
+	__pm_runtime_put_autosuspend(vib->dev);
 err_free:
 	kfree(work_data);
 }
@@ -382,7 +382,7 @@ static void cs40l50_stop_worker(struct work_struct *work)
 	vib->dsp.write(vib->dev, vib->regmap, vib->dsp.stop_cmd);
 
 	pm_runtime_mark_last_busy(vib->dev);
-	pm_runtime_put_autosuspend(vib->dev);
+	__pm_runtime_put_autosuspend(vib->dev);
 
 	kfree(work_data);
 }
@@ -454,7 +454,7 @@ static void cs40l50_erase_worker(struct work_struct *work)
 	kfree(erase_effect);
 err_pm:
 	pm_runtime_mark_last_busy(vib->dev);
-	pm_runtime_put_autosuspend(vib->dev);
+	__pm_runtime_put_autosuspend(vib->dev);
 err_exit:
 	work_data->error = error;
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 19/51] iio: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (22 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04 13:45   ` Jonathan Cameron
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen; +Cc: linux-iio

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/iio/accel/bmc150-accel-core.c         |  2 +-
 drivers/iio/accel/bmi088-accel-core.c         |  6 +++---
 drivers/iio/accel/fxls8962af-core.c           |  2 +-
 drivers/iio/accel/kxcjk-1013.c                |  2 +-
 drivers/iio/accel/kxsd9.c                     |  6 +++---
 drivers/iio/accel/mma8452.c                   |  2 +-
 drivers/iio/accel/mma9551_core.c              |  2 +-
 drivers/iio/accel/msa311.c                    | 12 +++++------
 drivers/iio/adc/ab8500-gpadc.c                |  2 +-
 drivers/iio/adc/at91-sama5d2_adc.c            | 20 +++++++++----------
 drivers/iio/adc/rcar-gyroadc.c                |  2 +-
 drivers/iio/adc/stm32-adc-core.c              |  2 +-
 drivers/iio/adc/stm32-adc.c                   | 12 +++++------
 drivers/iio/adc/sun4i-gpadc-iio.c             |  4 ++--
 drivers/iio/adc/ti-ads1015.c                  |  2 +-
 drivers/iio/adc/ti-ads1100.c                  |  2 +-
 drivers/iio/adc/ti-ads1119.c                  |  4 ++--
 drivers/iio/chemical/atlas-sensor.c           |  4 ++--
 .../common/hid-sensors/hid-sensor-trigger.c   |  2 +-
 drivers/iio/dac/stm32-dac.c                   |  6 +++---
 drivers/iio/gyro/bmg160_core.c                |  2 +-
 drivers/iio/gyro/fxas21002c_core.c            |  2 +-
 drivers/iio/gyro/mpu3050-core.c               |  6 +++---
 drivers/iio/gyro/mpu3050-i2c.c                |  2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_accel.c | 10 +++++-----
 .../imu/inv_icm42600/inv_icm42600_buffer.c    |  2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  | 10 +++++-----
 .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |  2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    | 14 ++++++-------
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |  4 ++--
 drivers/iio/imu/kmx61.c                       |  2 +-
 drivers/iio/light/apds9306.c                  |  6 +++---
 drivers/iio/light/apds9960.c                  |  4 ++--
 drivers/iio/light/bh1780.c                    |  2 +-
 drivers/iio/light/gp2ap002.c                  |  4 ++--
 drivers/iio/light/isl29028.c                  |  2 +-
 drivers/iio/light/ltrf216a.c                  |  2 +-
 drivers/iio/light/pa12203001.c                |  2 +-
 drivers/iio/light/rpr0521.c                   |  2 +-
 drivers/iio/light/tsl2583.c                   |  2 +-
 drivers/iio/light/tsl2591.c                   |  4 ++--
 drivers/iio/light/us5182d.c                   |  2 +-
 drivers/iio/light/vcnl4000.c                  |  2 +-
 drivers/iio/light/vcnl4035.c                  |  2 +-
 drivers/iio/magnetometer/af8133j.c            |  4 ++--
 drivers/iio/magnetometer/ak8974.c             |  4 ++--
 drivers/iio/magnetometer/ak8975.c             |  2 +-
 drivers/iio/magnetometer/bmc150_magn.c        |  2 +-
 drivers/iio/magnetometer/tmag5273.c           |  4 ++--
 drivers/iio/magnetometer/yamaha-yas530.c      |  4 ++--
 drivers/iio/pressure/bmp280-core.c            | 10 +++++-----
 drivers/iio/pressure/icp10100.c               |  2 +-
 drivers/iio/pressure/mpl115.c                 |  4 ++--
 drivers/iio/pressure/zpa2326.c                |  4 ++--
 .../iio/proximity/pulsedlight-lidar-lite-v2.c |  2 +-
 drivers/iio/proximity/srf04.c                 |  2 +-
 drivers/iio/temperature/mlx90614.c            |  4 ++--
 drivers/iio/temperature/mlx90632.c            |  4 ++--
 drivers/iio/temperature/mlx90635.c            |  4 ++--
 59 files changed, 122 insertions(+), 122 deletions(-)

diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
index 0f32c1e92b4d..da02727c8626 100644
--- a/drivers/iio/accel/bmc150-accel-core.c
+++ b/drivers/iio/accel/bmc150-accel-core.c
@@ -339,7 +339,7 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	if (ret < 0) {
diff --git a/drivers/iio/accel/bmi088-accel-core.c b/drivers/iio/accel/bmi088-accel-core.c
index fc1c1613d673..f57960509c7f 100644
--- a/drivers/iio/accel/bmi088-accel-core.c
+++ b/drivers/iio/accel/bmi088-accel-core.c
@@ -375,7 +375,7 @@ static int bmi088_accel_read_raw(struct iio_dev *indio_dev,
 
 out_read_raw_pm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -419,7 +419,7 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
 
 		ret = bmi088_accel_set_scale(data, val, val2);
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		return ret;
 	case IIO_CHAN_INFO_SAMP_FREQ:
 		ret = pm_runtime_resume_and_get(dev);
@@ -428,7 +428,7 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
 
 		ret = bmi088_accel_set_sample_freq(data, val);
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		return ret;
 	default:
 		return -EINVAL;
diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c
index 37f33c29fb4b..50e1b2575af0 100644
--- a/drivers/iio/accel/fxls8962af-core.c
+++ b/drivers/iio/accel/fxls8962af-core.c
@@ -219,7 +219,7 @@ static int fxls8962af_power_off(struct fxls8962af_data *data)
 	int ret;
 
 	pm_runtime_mark_last_busy(dev);
-	ret = pm_runtime_put_autosuspend(dev);
+	ret = __pm_runtime_put_autosuspend(dev);
 	if (ret)
 		dev_err(dev, "failed to power off\n");
 
diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
index b76df8816323..01c6bc9b0f99 100644
--- a/drivers/iio/accel/kxcjk-1013.c
+++ b/drivers/iio/accel/kxcjk-1013.c
@@ -625,7 +625,7 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
 		dev_err(&data->client->dev,
diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c
index 70dfd6e354db..41dcf80784f1 100644
--- a/drivers/iio/accel/kxsd9.c
+++ b/drivers/iio/accel/kxsd9.c
@@ -151,7 +151,7 @@ static int kxsd9_write_raw(struct iio_dev *indio_dev,
 	}
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return ret;
 }
@@ -199,7 +199,7 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,
 
 error_ret:
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return ret;
 };
@@ -251,7 +251,7 @@ static int kxsd9_buffer_postdisable(struct iio_dev *indio_dev)
 	struct kxsd9_state *st = iio_priv(indio_dev);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 }
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index 62e6369e2269..17786868855b 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -227,7 +227,7 @@ static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on)
 		ret = pm_runtime_resume_and_get(&client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&client->dev);
-		ret = pm_runtime_put_autosuspend(&client->dev);
+		ret = __pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	if (ret < 0) {
diff --git a/drivers/iio/accel/mma9551_core.c b/drivers/iio/accel/mma9551_core.c
index b898f865fb87..d97cac6cc4da 100644
--- a/drivers/iio/accel/mma9551_core.c
+++ b/drivers/iio/accel/mma9551_core.c
@@ -673,7 +673,7 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
 		ret = pm_runtime_resume_and_get(&client->dev);
 	else {
 		pm_runtime_mark_last_busy(&client->dev);
-		ret = pm_runtime_put_autosuspend(&client->dev);
+		ret = __pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	if (ret < 0) {
diff --git a/drivers/iio/accel/msa311.c b/drivers/iio/accel/msa311.c
index 57025354c7cd..21ec55dc1c5a 100644
--- a/drivers/iio/accel/msa311.c
+++ b/drivers/iio/accel/msa311.c
@@ -608,7 +608,7 @@ static int msa311_read_raw_data(struct iio_dev *indio_dev,
 	iio_device_release_direct_mode(indio_dev);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err) {
 		dev_err(dev, "can't get axis %s (%pe)\n",
@@ -740,7 +740,7 @@ static int msa311_write_scale(struct iio_dev *indio_dev, int val, int val2)
 		}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err)
 		dev_err(dev, "can't update scale (%pe)\n", ERR_PTR(err));
@@ -781,7 +781,7 @@ static int msa311_write_samp_freq(struct iio_dev *indio_dev, int val, int val2)
 	iio_device_release_direct_mode(indio_dev);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err)
 		dev_err(dev, "can't update frequency (%pe)\n", ERR_PTR(err));
@@ -830,7 +830,7 @@ static int msa311_debugfs_reg_access(struct iio_dev *indio_dev,
 	mutex_unlock(&msa311->lock);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err)
 		dev_err(dev, "can't %s register %u from debugfs (%pe)\n",
@@ -853,7 +853,7 @@ static int msa311_buffer_postdisable(struct iio_dev *indio_dev)
 	struct device *dev = msa311->dev;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -1231,7 +1231,7 @@ static int msa311_probe(struct i2c_client *i2c)
 		return err;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	err = devm_iio_device_register(dev, indio_dev);
 	if (err)
diff --git a/drivers/iio/adc/ab8500-gpadc.c b/drivers/iio/adc/ab8500-gpadc.c
index 59f66e9cb0e8..f2d1b06bac44 100644
--- a/drivers/iio/adc/ab8500-gpadc.c
+++ b/drivers/iio/adc/ab8500-gpadc.c
@@ -608,7 +608,7 @@ static int ab8500_gpadc_read(struct ab8500_gpadc *gpadc,
 
 	/* This eventually drops the regulator */
 	pm_runtime_mark_last_busy(gpadc->dev);
-	pm_runtime_put_autosuspend(gpadc->dev);
+	__pm_runtime_put_autosuspend(gpadc->dev);
 
 	return (high_data << 8) | low_data;
 
diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
index d7fd21e7c6e2..628e6e3c667c 100644
--- a/drivers/iio/adc/at91-sama5d2_adc.c
+++ b/drivers/iio/adc/at91-sama5d2_adc.c
@@ -893,7 +893,7 @@ static int at91_adc_config_emr(struct at91_adc_state *st,
 	at91_adc_writel(st, EMR, emr);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	st->oversampling_ratio = oversampling_ratio;
 
@@ -968,7 +968,7 @@ static int at91_adc_configure_touch(struct at91_adc_state *st, bool state)
 		at91_adc_writel(st, TSMR, 0);
 
 		pm_runtime_mark_last_busy(st->dev);
-		pm_runtime_put_autosuspend(st->dev);
+		__pm_runtime_put_autosuspend(st->dev);
 		return 0;
 	}
 	/*
@@ -1140,7 +1140,7 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state)
 
 	if (!state) {
 		pm_runtime_mark_last_busy(st->dev);
-		pm_runtime_put_autosuspend(st->dev);
+		__pm_runtime_put_autosuspend(st->dev);
 	}
 
 	return 0;
@@ -1333,7 +1333,7 @@ static int at91_adc_buffer_prepare(struct iio_dev *indio_dev)
 
 pm_runtime_put:
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 	return ret;
 }
 
@@ -1391,7 +1391,7 @@ static int at91_adc_buffer_postdisable(struct iio_dev *indio_dev)
 		dmaengine_terminate_sync(st->dma_st.dma_chan);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 }
@@ -1600,7 +1600,7 @@ static void at91_adc_setup_samp_freq(struct iio_dev *indio_dev, unsigned freq,
 	at91_adc_writel(st, MR, mr);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	dev_dbg(&indio_dev->dev, "freq: %u, startup: %u, prescal: %u, tracktim=%u\n",
 		freq, startup, prescal, tracktim);
@@ -1806,7 +1806,7 @@ static int at91_adc_read_info_raw(struct iio_dev *indio_dev,
 
 pm_runtime_put:
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 	return ret;
 }
 
@@ -1899,7 +1899,7 @@ static int at91_adc_read_temp(struct iio_dev *indio_dev,
 	/* Revert previous settings. */
 	at91_adc_temp_sensor_configure(st, false);
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 unlock:
 	mutex_unlock(&st->lock);
 	iio_device_release_direct_mode(indio_dev);
@@ -2467,7 +2467,7 @@ static int at91_adc_probe(struct platform_device *pdev)
 		 readl_relaxed(st->base + st->soc_info.platform->layout->VERSION));
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 
@@ -2569,7 +2569,7 @@ static int at91_adc_resume(struct device *dev)
 	}
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 
diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c
index 15a21d2860e7..d2a4557a5c07 100644
--- a/drivers/iio/adc/rcar-gyroadc.c
+++ b/drivers/iio/adc/rcar-gyroadc.c
@@ -167,7 +167,7 @@ static int rcar_gyroadc_set_power(struct rcar_gyroadc *priv, bool on)
 		return pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		return pm_runtime_put_autosuspend(dev);
+		return __pm_runtime_put_autosuspend(dev);
 	}
 }
 
diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
index 616dd729666a..a67e972bcc5d 100644
--- a/drivers/iio/adc/stm32-adc-core.c
+++ b/drivers/iio/adc/stm32-adc-core.c
@@ -798,7 +798,7 @@ static int stm32_adc_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
index 32ca26ed59f7..50c3651413d2 100644
--- a/drivers/iio/adc/stm32-adc.c
+++ b/drivers/iio/adc/stm32-adc.c
@@ -1456,7 +1456,7 @@ static int stm32_adc_single_conv(struct iio_dev *indio_dev,
 	stm32_adc_conv_irq_disable(adc);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1623,7 +1623,7 @@ static int stm32_adc_update_scan_mode(struct iio_dev *indio_dev,
 
 	ret = stm32_adc_conf_scan_seq(indio_dev, scan_mask);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1672,7 +1672,7 @@ static int stm32_adc_debugfs_reg_access(struct iio_dev *indio_dev,
 		*readval = stm32_adc_readl(adc, reg);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -1816,7 +1816,7 @@ static int stm32_adc_buffer_postenable(struct iio_dev *indio_dev)
 	stm32_adc_set_trig(indio_dev, NULL);
 err_pm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1839,7 +1839,7 @@ static int stm32_adc_buffer_predisable(struct iio_dev *indio_dev)
 		dev_err(&indio_dev->dev, "Can't clear trigger\n");
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -2473,7 +2473,7 @@ static int stm32_adc_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (IS_ENABLED(CONFIG_DEBUG_FS))
 		stm32_adc_debugfs_init(indio_dev);
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index 00a3a4db0fe0..43746e026042 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -248,7 +248,7 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
 	pm_runtime_mark_last_busy(indio_dev->dev.parent);
 
 err:
-	pm_runtime_put_autosuspend(indio_dev->dev.parent);
+	__pm_runtime_put_autosuspend(indio_dev->dev.parent);
 	disable_irq(irq);
 	mutex_unlock(&info->mutex);
 
@@ -273,7 +273,7 @@ static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val)
 		regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, val);
 
 		pm_runtime_mark_last_busy(indio_dev->dev.parent);
-		pm_runtime_put_autosuspend(indio_dev->dev.parent);
+		__pm_runtime_put_autosuspend(indio_dev->dev.parent);
 
 		return 0;
 	}
diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c
index 052d2124b215..380aeabc8a72 100644
--- a/drivers/iio/adc/ti-ads1015.c
+++ b/drivers/iio/adc/ti-ads1015.c
@@ -377,7 +377,7 @@ static int ads1015_set_power_state(struct ads1015_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret < 0 ? ret : 0;
diff --git a/drivers/iio/adc/ti-ads1100.c b/drivers/iio/adc/ti-ads1100.c
index 1e46f07a9ca6..038901c93b7d 100644
--- a/drivers/iio/adc/ti-ads1100.c
+++ b/drivers/iio/adc/ti-ads1100.c
@@ -105,7 +105,7 @@ static int ads1100_get_adc_result(struct ads1100_data *data, int chan, int *val)
 	ret = i2c_master_recv(data->client, (char *)&buffer, sizeof(buffer));
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 
 	if (ret < 0) {
 		dev_err(&data->client->dev, "I2C read fail: %d\n", ret);
diff --git a/drivers/iio/adc/ti-ads1119.c b/drivers/iio/adc/ti-ads1119.c
index 1c7606375149..52e20c4ed8bb 100644
--- a/drivers/iio/adc/ti-ads1119.c
+++ b/drivers/iio/adc/ti-ads1119.c
@@ -292,7 +292,7 @@ static int ads1119_single_conversion(struct ads1119_state *st,
 	ret = IIO_VAL_INT;
 pdown:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
@@ -466,7 +466,7 @@ static int ads1119_triggered_buffer_postdisable(struct iio_dev *indio_dev)
 		return ret;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
diff --git a/drivers/iio/chemical/atlas-sensor.c b/drivers/iio/chemical/atlas-sensor.c
index baf93e5e3ca7..d0ab2656919e 100644
--- a/drivers/iio/chemical/atlas-sensor.c
+++ b/drivers/iio/chemical/atlas-sensor.c
@@ -427,7 +427,7 @@ static int atlas_buffer_predisable(struct iio_dev *indio_dev)
 		return ret;
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	ret = pm_runtime_put_autosuspend(&data->client->dev);
+	ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	if (ret)
 		return ret;
 
@@ -492,7 +492,7 @@ static int atlas_read_measurement(struct atlas_data *data, int reg, __be32 *val)
 	ret = regmap_bulk_read(data->regmap, reg, val, sizeof(*val));
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
index ad8910e6ad59..e6bf7eb4e23c 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
@@ -165,7 +165,7 @@ int hid_sensor_power_state(struct hid_sensor_common *st, bool state)
 		atomic_dec(&st->user_requested_state);
 		pm_runtime_mark_last_busy(&st->pdev->dev);
 		pm_runtime_use_autosuspend(&st->pdev->dev);
-		ret = pm_runtime_put_autosuspend(&st->pdev->dev);
+		ret = __pm_runtime_put_autosuspend(&st->pdev->dev);
 	}
 	if (ret < 0)
 		return ret;
diff --git a/drivers/iio/dac/stm32-dac.c b/drivers/iio/dac/stm32-dac.c
index 5a722f307e7e..8dadf90546b4 100644
--- a/drivers/iio/dac/stm32-dac.c
+++ b/drivers/iio/dac/stm32-dac.c
@@ -97,7 +97,7 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
 
 	if (!enable) {
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 	return 0;
@@ -105,7 +105,7 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
 err_put_pm:
 	if (enable) {
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
@@ -350,7 +350,7 @@ static int stm32_dac_probe(struct platform_device *pdev)
 		goto err_pm_put;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c
index 10728d5ccae3..97f3045dc2a9 100644
--- a/drivers/iio/gyro/bmg160_core.c
+++ b/drivers/iio/gyro/bmg160_core.c
@@ -314,7 +314,7 @@ static int bmg160_set_power_state(struct bmg160_data *data, bool on)
 		ret = pm_runtime_get_sync(dev);
 	else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	if (ret < 0) {
diff --git a/drivers/iio/gyro/fxas21002c_core.c b/drivers/iio/gyro/fxas21002c_core.c
index 688966129f70..f6263187f6c7 100644
--- a/drivers/iio/gyro/fxas21002c_core.c
+++ b/drivers/iio/gyro/fxas21002c_core.c
@@ -375,7 +375,7 @@ static int  fxas21002c_pm_put(struct fxas21002c_data *data)
 
 	pm_runtime_mark_last_busy(dev);
 
-	return pm_runtime_put_autosuspend(dev);
+	return __pm_runtime_put_autosuspend(dev);
 }
 
 static int fxas21002c_temp_get(struct fxas21002c_data *data, int *val)
diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c
index b6883e8b2a8b..93d9d0e4626b 100644
--- a/drivers/iio/gyro/mpu3050-core.c
+++ b/drivers/iio/gyro/mpu3050-core.c
@@ -371,7 +371,7 @@ static int mpu3050_read_raw(struct iio_dev *indio_dev,
 out_read_raw_unlock:
 	mutex_unlock(&mpu3050->lock);
 	pm_runtime_mark_last_busy(mpu3050->dev);
-	pm_runtime_put_autosuspend(mpu3050->dev);
+	__pm_runtime_put_autosuspend(mpu3050->dev);
 
 	return ret;
 }
@@ -663,7 +663,7 @@ static int mpu3050_buffer_postdisable(struct iio_dev *indio_dev)
 	struct mpu3050 *mpu3050 = iio_priv(indio_dev);
 
 	pm_runtime_mark_last_busy(mpu3050->dev);
-	pm_runtime_put_autosuspend(mpu3050->dev);
+	__pm_runtime_put_autosuspend(mpu3050->dev);
 
 	return 0;
 }
@@ -977,7 +977,7 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,
 			dev_err(mpu3050->dev, "error resetting FIFO\n");
 
 		pm_runtime_mark_last_busy(mpu3050->dev);
-		pm_runtime_put_autosuspend(mpu3050->dev);
+		__pm_runtime_put_autosuspend(mpu3050->dev);
 		mpu3050->hw_irq_trigger = false;
 
 		return 0;
diff --git a/drivers/iio/gyro/mpu3050-i2c.c b/drivers/iio/gyro/mpu3050-i2c.c
index 29ecfa6fd633..49256fc6c6ad 100644
--- a/drivers/iio/gyro/mpu3050-i2c.c
+++ b/drivers/iio/gyro/mpu3050-i2c.c
@@ -28,7 +28,7 @@ static int mpu3050_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id)
 	struct mpu3050 *mpu3050 = i2c_mux_priv(mux);
 
 	pm_runtime_mark_last_busy(mpu3050->dev);
-	pm_runtime_put_autosuspend(mpu3050->dev);
+	__pm_runtime_put_autosuspend(mpu3050->dev);
 	return 0;
 }
 
diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
index 56ac19814250..4e43deadf02f 100644
--- a/drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
+++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
@@ -292,7 +292,7 @@ static int inv_icm42600_accel_read_sensor(struct iio_dev *indio_dev,
 exit:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
@@ -370,7 +370,7 @@ static int inv_icm42600_accel_write_scale(struct iio_dev *indio_dev,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -474,7 +474,7 @@ static int inv_icm42600_accel_write_odr(struct iio_dev *indio_dev,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -526,7 +526,7 @@ static int inv_icm42600_accel_read_offset(struct inv_icm42600_state *st,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	if (ret)
 		return ret;
 
@@ -664,7 +664,7 @@ static int inv_icm42600_accel_write_offset(struct inv_icm42600_state *st,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
index aae7c56481a3..acc141657d3f 100644
--- a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
+++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
@@ -440,7 +440,7 @@ static int inv_icm42600_buffer_postdisable(struct iio_dev *indio_dev)
 		msleep(sleep);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
index 938af5b640b0..3784b1719433 100644
--- a/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
+++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
@@ -188,7 +188,7 @@ static int inv_icm42600_gyro_read_sensor(struct inv_icm42600_state *st,
 exit:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
@@ -287,7 +287,7 @@ static int inv_icm42600_gyro_write_scale(struct iio_dev *indio_dev,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -382,7 +382,7 @@ static int inv_icm42600_gyro_write_odr(struct iio_dev *indio_dev,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -434,7 +434,7 @@ static int inv_icm42600_gyro_read_offset(struct inv_icm42600_state *st,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	if (ret)
 		return ret;
 
@@ -571,7 +571,7 @@ static int inv_icm42600_gyro_write_offset(struct inv_icm42600_state *st,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c
index 213cce1c3111..4c2f2d6dfff9 100644
--- a/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c
+++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c
@@ -38,7 +38,7 @@ static int inv_icm42600_temp_read(struct inv_icm42600_state *st, int16_t *temp)
 exit:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
index fdb48c5e5686..8fb35f37e5d2 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
@@ -708,12 +708,12 @@ static int inv_mpu6050_read_channel_data(struct iio_dev *indio_dev,
 	}
 
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 
 	return ret;
 
 error_power_off:
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 	return result;
 }
 
@@ -913,7 +913,7 @@ static int inv_mpu6050_write_raw(struct iio_dev *indio_dev,
 	}
 
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 error_write_raw_unlock:
 	mutex_unlock(&st->lock);
 	iio_device_release_direct_mode(indio_dev);
@@ -1121,14 +1121,14 @@ static int inv_mpu6050_enable_wom(struct inv_mpu6050_state *st, bool en)
 		}
 
 		pm_runtime_mark_last_busy(pdev);
-		pm_runtime_put_autosuspend(pdev);
+		__pm_runtime_put_autosuspend(pdev);
 	}
 
 	return result;
 
 error_suspend:
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 	return result;
 }
 
@@ -1227,7 +1227,7 @@ static int inv_mpu6050_write_event_value(struct iio_dev *indio_dev,
 	result = inv_mpu6050_set_wom_threshold(st, value, INV_MPU6050_FREQ_DIVIDER(st));
 
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 
 	return result;
 }
@@ -1336,7 +1336,7 @@ inv_mpu6050_fifo_rate_store(struct device *dev, struct device_attribute *attr,
 
 	pm_runtime_mark_last_busy(pdev);
 fifo_rate_fail_power_off:
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 fifo_rate_fail_unlock:
 	mutex_unlock(&st->lock);
 	if (result)
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
index 3bfeabab0ec4..e501ac9276d4 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
@@ -196,13 +196,13 @@ static int inv_mpu6050_set_enable(struct iio_dev *indio_dev, bool enable)
 		if (result)
 			goto error_power_off;
 		pm_runtime_mark_last_busy(pdev);
-		pm_runtime_put_autosuspend(pdev);
+		__pm_runtime_put_autosuspend(pdev);
 	}
 
 	return 0;
 
 error_power_off:
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 	return result;
 }
 
diff --git a/drivers/iio/imu/kmx61.c b/drivers/iio/imu/kmx61.c
index c61c012e25bb..75942b0b95d7 100644
--- a/drivers/iio/imu/kmx61.c
+++ b/drivers/iio/imu/kmx61.c
@@ -753,7 +753,7 @@ static int kmx61_set_power_state(struct kmx61_data *data, bool on, u8 device)
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
 		dev_err(&data->client->dev,
diff --git a/drivers/iio/light/apds9306.c b/drivers/iio/light/apds9306.c
index 079e02be1005..ade25e461397 100644
--- a/drivers/iio/light/apds9306.c
+++ b/drivers/iio/light/apds9306.c
@@ -538,7 +538,7 @@ static int apds9306_read_data(struct apds9306_data *data, int *val, int reg)
 	*val = get_unaligned_le24(&buff);
 
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
 }
@@ -1119,7 +1119,7 @@ static int apds9306_write_event_config(struct iio_dev *indio_dev,
 				return ret;
 
 			pm_runtime_mark_last_busy(data->dev);
-			pm_runtime_put_autosuspend(data->dev);
+			__pm_runtime_put_autosuspend(data->dev);
 
 			return 0;
 		}
@@ -1315,7 +1315,7 @@ static int apds9306_probe(struct i2c_client *client)
 	if (ret)
 		return dev_err_probe(dev, ret, "failed iio device registration\n");
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
index 3c14e4c30805..13db160be094 100644
--- a/drivers/iio/light/apds9960.c
+++ b/drivers/iio/light/apds9960.c
@@ -497,7 +497,7 @@ static int apds9960_set_power_state(struct apds9960_data *data, bool on)
 				     APDS9960_MAX_INT_TIME_IN_US);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	mutex_unlock(&data->lock);
@@ -910,7 +910,7 @@ static int apds9960_buffer_predisable(struct iio_dev *indio_dev)
 	if (ret)
 		return ret;
 
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 
 	return 0;
 }
diff --git a/drivers/iio/light/bh1780.c b/drivers/iio/light/bh1780.c
index 475f44954f61..d22bf5f684b1 100644
--- a/drivers/iio/light/bh1780.c
+++ b/drivers/iio/light/bh1780.c
@@ -112,7 +112,7 @@ static int bh1780_read_raw(struct iio_dev *indio_dev,
 			if (value < 0)
 				return value;
 			pm_runtime_mark_last_busy(&bh1780->client->dev);
-			pm_runtime_put_autosuspend(&bh1780->client->dev);
+			__pm_runtime_put_autosuspend(&bh1780->client->dev);
 			*val = value;
 
 			return IIO_VAL_INT;
diff --git a/drivers/iio/light/gp2ap002.c b/drivers/iio/light/gp2ap002.c
index f8b1d7dd6f5f..aeaba841dbb4 100644
--- a/drivers/iio/light/gp2ap002.c
+++ b/drivers/iio/light/gp2ap002.c
@@ -272,7 +272,7 @@ static int gp2ap002_read_raw(struct iio_dev *indio_dev,
 
 out:
 	pm_runtime_mark_last_busy(gp2ap002->dev);
-	pm_runtime_put_autosuspend(gp2ap002->dev);
+	__pm_runtime_put_autosuspend(gp2ap002->dev);
 
 	return ret;
 }
@@ -354,7 +354,7 @@ static int gp2ap002_write_event_config(struct iio_dev *indio_dev,
 		gp2ap002->enabled = true;
 	} else {
 		pm_runtime_mark_last_busy(gp2ap002->dev);
-		pm_runtime_put_autosuspend(gp2ap002->dev);
+		__pm_runtime_put_autosuspend(gp2ap002->dev);
 		gp2ap002->enabled = false;
 	}
 
diff --git a/drivers/iio/light/isl29028.c b/drivers/iio/light/isl29028.c
index 95bfb3ffa519..63b6fdda25ed 100644
--- a/drivers/iio/light/isl29028.c
+++ b/drivers/iio/light/isl29028.c
@@ -342,7 +342,7 @@ static int isl29028_set_pm_runtime_busy(struct isl29028_chip *chip, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
diff --git a/drivers/iio/light/ltrf216a.c b/drivers/iio/light/ltrf216a.c
index 37eecff571b9..228f03c7f192 100644
--- a/drivers/iio/light/ltrf216a.c
+++ b/drivers/iio/light/ltrf216a.c
@@ -209,7 +209,7 @@ static int ltrf216a_set_power_state(struct ltrf216a_data *data, bool on)
 		}
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
diff --git a/drivers/iio/light/pa12203001.c b/drivers/iio/light/pa12203001.c
index b920bf82c102..38313e712e65 100644
--- a/drivers/iio/light/pa12203001.c
+++ b/drivers/iio/light/pa12203001.c
@@ -190,7 +190,7 @@ static int pa12203001_set_power_state(struct pa12203001_data *data, bool on,
 
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 
 	return ret;
diff --git a/drivers/iio/light/rpr0521.c b/drivers/iio/light/rpr0521.c
index 78c08e0bd077..2010b6387be7 100644
--- a/drivers/iio/light/rpr0521.c
+++ b/drivers/iio/light/rpr0521.c
@@ -363,7 +363,7 @@ static int rpr0521_set_power_state(struct rpr0521_data *data, bool on,
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
 		dev_err(&data->client->dev,
diff --git a/drivers/iio/light/tsl2583.c b/drivers/iio/light/tsl2583.c
index 02ad11611b9c..d41fd79e724c 100644
--- a/drivers/iio/light/tsl2583.c
+++ b/drivers/iio/light/tsl2583.c
@@ -647,7 +647,7 @@ static int tsl2583_set_pm_runtime_busy(struct tsl2583_chip *chip, bool on)
 		ret = pm_runtime_resume_and_get(&chip->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&chip->client->dev);
-		ret = pm_runtime_put_autosuspend(&chip->client->dev);
+		ret = __pm_runtime_put_autosuspend(&chip->client->dev);
 	}
 
 	return ret;
diff --git a/drivers/iio/light/tsl2591.c b/drivers/iio/light/tsl2591.c
index 850c2465992f..43adaffe1400 100644
--- a/drivers/iio/light/tsl2591.c
+++ b/drivers/iio/light/tsl2591.c
@@ -773,7 +773,7 @@ static int tsl2591_read_raw(struct iio_dev *indio_dev,
 	mutex_unlock(&chip->als_mutex);
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 }
@@ -996,7 +996,7 @@ static int tsl2591_write_event_config(struct iio_dev *indio_dev,
 	} else if (!state && chip->events_enabled) {
 		chip->events_enabled = false;
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	return 0;
diff --git a/drivers/iio/light/us5182d.c b/drivers/iio/light/us5182d.c
index de6967ac3b0b..901288236d38 100644
--- a/drivers/iio/light/us5182d.c
+++ b/drivers/iio/light/us5182d.c
@@ -370,7 +370,7 @@ static int us5182d_set_power_state(struct us5182d_data *data, bool on)
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 
 	return ret;
diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c
index 4e3641ff2ed4..2877880897e4 100644
--- a/drivers/iio/light/vcnl4000.c
+++ b/drivers/iio/light/vcnl4000.c
@@ -582,7 +582,7 @@ static int vcnl4000_set_pm_runtime_state(struct vcnl4000_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
diff --git a/drivers/iio/light/vcnl4035.c b/drivers/iio/light/vcnl4035.c
index 337a1332c2c6..a7393255f6ac 100644
--- a/drivers/iio/light/vcnl4035.c
+++ b/drivers/iio/light/vcnl4035.c
@@ -150,7 +150,7 @@ static int vcnl4035_set_pm_runtime_state(struct vcnl4035_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
diff --git a/drivers/iio/magnetometer/af8133j.c b/drivers/iio/magnetometer/af8133j.c
index d81d89af6283..f0530854698d 100644
--- a/drivers/iio/magnetometer/af8133j.c
+++ b/drivers/iio/magnetometer/af8133j.c
@@ -235,7 +235,7 @@ static int af8133j_read_measurement(struct af8133j_data *data, __le16 buf[3])
 
 out_rpm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -454,7 +454,7 @@ static int af8133j_probe(struct i2c_client *client)
 	if (ret)
 		return ret;
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	indio_dev->info = &af8133j_info;
 	indio_dev->name = "af8133j";
diff --git a/drivers/iio/magnetometer/ak8974.c b/drivers/iio/magnetometer/ak8974.c
index 8306a18706ac..eed25cd701f0 100644
--- a/drivers/iio/magnetometer/ak8974.c
+++ b/drivers/iio/magnetometer/ak8974.c
@@ -584,7 +584,7 @@ static int ak8974_measure_channel(struct ak8974 *ak8974, unsigned long address,
 out_unlock:
 	mutex_unlock(&ak8974->lock);
 	pm_runtime_mark_last_busy(&ak8974->i2c->dev);
-	pm_runtime_put_autosuspend(&ak8974->i2c->dev);
+	__pm_runtime_put_autosuspend(&ak8974->i2c->dev);
 
 	return ret;
 }
@@ -679,7 +679,7 @@ static void ak8974_fill_buffer(struct iio_dev *indio_dev)
  out_unlock:
 	mutex_unlock(&ak8974->lock);
 	pm_runtime_mark_last_busy(&ak8974->i2c->dev);
-	pm_runtime_put_autosuspend(&ak8974->i2c->dev);
+	__pm_runtime_put_autosuspend(&ak8974->i2c->dev);
 }
 
 static irqreturn_t ak8974_handle_trigger(int irq, void *p)
diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
index 18077fb463a9..b637385f9d26 100644
--- a/drivers/iio/magnetometer/ak8975.c
+++ b/drivers/iio/magnetometer/ak8975.c
@@ -776,7 +776,7 @@ static int ak8975_read_axis(struct iio_dev *indio_dev, int index, int *val)
 	mutex_unlock(&data->lock);
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 
 	/* Swap bytes and convert to valid range. */
 	buff = le16_to_cpu(rval);
diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c
index 06d5a1ef1fbd..26dc68e4270d 100644
--- a/drivers/iio/magnetometer/bmc150_magn.c
+++ b/drivers/iio/magnetometer/bmc150_magn.c
@@ -268,7 +268,7 @@ static int bmc150_magn_set_power_state(struct bmc150_magn_data *data, bool on)
 		ret = pm_runtime_resume_and_get(data->dev);
 	} else {
 		pm_runtime_mark_last_busy(data->dev);
-		ret = pm_runtime_put_autosuspend(data->dev);
+		ret = __pm_runtime_put_autosuspend(data->dev);
 	}
 
 	if (ret < 0) {
diff --git a/drivers/iio/magnetometer/tmag5273.c b/drivers/iio/magnetometer/tmag5273.c
index 4187abe12784..bec579b7c6c6 100644
--- a/drivers/iio/magnetometer/tmag5273.c
+++ b/drivers/iio/magnetometer/tmag5273.c
@@ -296,7 +296,7 @@ static int tmag5273_read_raw(struct iio_dev *indio_dev,
 		ret = tmag5273_get_measure(data, &t, &x, &y, &z, &angle, &magnitude);
 
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 
 		if (ret)
 			return ret;
@@ -669,7 +669,7 @@ static int tmag5273_probe(struct i2c_client *i2c)
 	indio_dev->num_channels = ARRAY_SIZE(tmag5273_channels);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	ret = devm_iio_device_register(dev, indio_dev);
 	if (ret)
diff --git a/drivers/iio/magnetometer/yamaha-yas530.c b/drivers/iio/magnetometer/yamaha-yas530.c
index 65011a8598d3..62df8b91df3a 100644
--- a/drivers/iio/magnetometer/yamaha-yas530.c
+++ b/drivers/iio/magnetometer/yamaha-yas530.c
@@ -623,7 +623,7 @@ static int yas5xx_read_raw(struct iio_dev *indio_dev,
 		pm_runtime_get_sync(yas5xx->dev);
 		ret = ci->get_measure(yas5xx, &t, &x, &y, &z);
 		pm_runtime_mark_last_busy(yas5xx->dev);
-		pm_runtime_put_autosuspend(yas5xx->dev);
+		__pm_runtime_put_autosuspend(yas5xx->dev);
 		if (ret)
 			return ret;
 		switch (chan->address) {
@@ -664,7 +664,7 @@ static void yas5xx_fill_buffer(struct iio_dev *indio_dev)
 	pm_runtime_get_sync(yas5xx->dev);
 	ret = ci->get_measure(yas5xx, &t, &x, &y, &z);
 	pm_runtime_mark_last_busy(yas5xx->dev);
-	pm_runtime_put_autosuspend(yas5xx->dev);
+	__pm_runtime_put_autosuspend(yas5xx->dev);
 	if (ret) {
 		dev_err(yas5xx->dev, "error refilling buffer\n");
 		return;
diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c
index ca4915c9a394..806933baeffd 100644
--- a/drivers/iio/pressure/bmp280-core.c
+++ b/drivers/iio/pressure/bmp280-core.c
@@ -729,7 +729,7 @@ static int bmp280_read_raw(struct iio_dev *indio_dev,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp280_read_raw_impl(indio_dev, chan, val, val2, mask);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -904,7 +904,7 @@ static int bmp280_write_raw(struct iio_dev *indio_dev,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp280_write_raw_impl(indio_dev, chan, val, val2, mask);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -1960,7 +1960,7 @@ static int bmp580_nvmem_read(void *priv, unsigned int offset, void *val,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp580_nvmem_read_impl(priv, offset, val, bytes);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -2035,7 +2035,7 @@ static int bmp580_nvmem_write(void *priv, unsigned int offset, void *val,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp580_nvmem_write_impl(priv, offset, val, bytes);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -2641,7 +2641,7 @@ static int bmp280_buffer_postdisable(struct iio_dev *indio_dev)
 	struct bmp280_data *data = iio_priv(indio_dev);
 
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
 }
diff --git a/drivers/iio/pressure/icp10100.c b/drivers/iio/pressure/icp10100.c
index 3e0bf5d31ad7..866381bb1452 100644
--- a/drivers/iio/pressure/icp10100.c
+++ b/drivers/iio/pressure/icp10100.c
@@ -267,7 +267,7 @@ static int icp10100_get_measures(struct icp10100_state *st,
 
 	pm_runtime_mark_last_busy(&st->client->dev);
 error_measure:
-	pm_runtime_put_autosuspend(&st->client->dev);
+	__pm_runtime_put_autosuspend(&st->client->dev);
 	return ret;
 }
 
diff --git a/drivers/iio/pressure/mpl115.c b/drivers/iio/pressure/mpl115.c
index 02ea38c8a3e4..70b711b16e52 100644
--- a/drivers/iio/pressure/mpl115.c
+++ b/drivers/iio/pressure/mpl115.c
@@ -109,7 +109,7 @@ static int mpl115_read_raw(struct iio_dev *indio_dev,
 		if (ret < 0)
 			return ret;
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 
 		return IIO_VAL_INT_PLUS_MICRO;
 	case IIO_CHAN_INFO_RAW:
@@ -119,7 +119,7 @@ static int mpl115_read_raw(struct iio_dev *indio_dev,
 		if (ret < 0)
 			return ret;
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 		*val = ret >> 6;
 
 		return IIO_VAL_INT;
diff --git a/drivers/iio/pressure/zpa2326.c b/drivers/iio/pressure/zpa2326.c
index 950f8dee2b26..7274855d0297 100644
--- a/drivers/iio/pressure/zpa2326.c
+++ b/drivers/iio/pressure/zpa2326.c
@@ -698,7 +698,7 @@ static void zpa2326_suspend(struct iio_dev *indio_dev)
 	zpa2326_sleep(indio_dev);
 
 	pm_runtime_mark_last_busy(parent);
-	pm_runtime_put_autosuspend(parent);
+	__pm_runtime_put_autosuspend(parent);
 }
 
 static void zpa2326_init_runtime(struct device *parent)
@@ -709,7 +709,7 @@ static void zpa2326_init_runtime(struct device *parent)
 	pm_runtime_set_autosuspend_delay(parent, 1000);
 	pm_runtime_use_autosuspend(parent);
 	pm_runtime_mark_last_busy(parent);
-	pm_runtime_put_autosuspend(parent);
+	__pm_runtime_put_autosuspend(parent);
 }
 
 static void zpa2326_fini_runtime(struct device *parent)
diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
index 5c959730aecd..6be27497d6e3 100644
--- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
+++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
@@ -192,7 +192,7 @@ static int lidar_get_measurement(struct lidar_data *data, u16 *reg)
 		ret = -EIO;
 	}
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 }
diff --git a/drivers/iio/proximity/srf04.c b/drivers/iio/proximity/srf04.c
index 86c57672fc7e..ecea2671ce62 100644
--- a/drivers/iio/proximity/srf04.c
+++ b/drivers/iio/proximity/srf04.c
@@ -119,7 +119,7 @@ static int srf04_read(struct srf04_data *data)
 
 	if (data->gpiod_power) {
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 	}
 
 	/* it should not take more than 20 ms until echo is rising */
diff --git a/drivers/iio/temperature/mlx90614.c b/drivers/iio/temperature/mlx90614.c
index 740018d4b3df..22bed79589d1 100644
--- a/drivers/iio/temperature/mlx90614.c
+++ b/drivers/iio/temperature/mlx90614.c
@@ -212,7 +212,7 @@ static int mlx90614_power_get(struct mlx90614_data *data, bool startup)
 		if (time_before(now, data->ready_timestamp) &&
 		    msleep_interruptible(jiffies_to_msecs(
 				data->ready_timestamp - now)) != 0) {
-			pm_runtime_put_autosuspend(&data->client->dev);
+			__pm_runtime_put_autosuspend(&data->client->dev);
 			return -EINTR;
 		}
 	}
@@ -226,7 +226,7 @@ static void mlx90614_power_put(struct mlx90614_data *data)
 		return;
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 }
 #else
 static inline int mlx90614_power_get(struct mlx90614_data *data, bool startup)
diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
index ae4ea587e7f9..c8cea6a4f390 100644
--- a/drivers/iio/temperature/mlx90632.c
+++ b/drivers/iio/temperature/mlx90632.c
@@ -1044,7 +1044,7 @@ static int mlx90632_read_raw(struct iio_dev *indio_dev,
 
 mlx90632_read_raw_pm:
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 	return ret;
 }
 
@@ -1273,7 +1273,7 @@ static int mlx90632_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, MLX90632_SLEEP_DELAY_MS);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return devm_iio_device_register(&client->dev, indio_dev);
 }
diff --git a/drivers/iio/temperature/mlx90635.c b/drivers/iio/temperature/mlx90635.c
index f7f88498ba0e..77ea81aa5c9e 100644
--- a/drivers/iio/temperature/mlx90635.c
+++ b/drivers/iio/temperature/mlx90635.c
@@ -750,7 +750,7 @@ static int mlx90635_read_raw(struct iio_dev *indio_dev,
 
 mlx90635_read_raw_pm:
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 	return ret;
 }
 
@@ -1023,7 +1023,7 @@ static int mlx90635_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, MLX90635_SLEEP_DELAY_MS);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return devm_iio_device_register(&client->dev, indio_dev);
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 22/51] iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (25 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-10 15:33   ` Pranjal Shrivastava
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Will Deacon, Robin Murphy, Joerg Roedel, Jason Gunthorpe,
	Pranjal Shrivastava, Rob Clark, Georgi Djakov, Sakari Ailus
  Cc: linux-arm-kernel, iommu

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
index 8321962b3714..cad02d5dc6d2 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
@@ -79,7 +79,7 @@ static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
 static inline void arm_smmu_rpm_put(struct arm_smmu_device *smmu)
 {
 	if (pm_runtime_enabled(smmu->dev))
-		pm_runtime_put_autosuspend(smmu->dev);
+		__pm_runtime_put_autosuspend(smmu->dev);
 }
 
 static void arm_smmu_rpm_use_autosuspend(struct arm_smmu_device *smmu)
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 24/51] mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (21 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-07 14:27   ` Matthias Brugger
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Jassi Brar, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: linux-arm-kernel, linux-mediatek

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/mailbox/mtk-cmdq-mailbox.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 4bff73532085..180906761eda 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -397,7 +397,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
 
 	task = kzalloc(sizeof(*task), GFP_ATOMIC);
 	if (!task) {
-		pm_runtime_put_autosuspend(cmdq->mbox.dev);
+		__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 		return -ENOMEM;
 	}
 
@@ -447,7 +447,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
 	list_move_tail(&task->list_entry, &thread->task_busy_list);
 
 	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 
 	return 0;
 }
@@ -495,7 +495,7 @@ static void cmdq_mbox_shutdown(struct mbox_chan *chan)
 	spin_unlock_irqrestore(&thread->chan->lock, flags);
 
 	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 }
 
 static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
@@ -535,7 +535,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
 out:
 	spin_unlock_irqrestore(&thread->chan->lock, flags);
 	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 
 	return 0;
 
@@ -550,7 +550,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
 		return -EFAULT;
 	}
 	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 	return 0;
 }
 
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 25/51] media: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (23 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/i2c/alvium-csi2.c                      |  2 +-
 drivers/media/i2c/ccs/ccs-core.c                     | 10 +++++-----
 drivers/media/i2c/dw9719.c                           |  2 +-
 drivers/media/i2c/gc0308.c                           |  6 +++---
 drivers/media/i2c/gc2145.c                           |  8 ++++----
 drivers/media/i2c/imx283.c                           |  6 +++---
 drivers/media/i2c/imx290.c                           |  6 +++---
 drivers/media/i2c/imx296.c                           |  4 ++--
 drivers/media/i2c/imx415.c                           |  4 ++--
 drivers/media/i2c/mt9m114.c                          | 12 ++++++------
 drivers/media/i2c/ov2680.c                           |  2 +-
 drivers/media/i2c/ov4689.c                           |  6 +++---
 drivers/media/i2c/ov5640.c                           |  8 ++++----
 drivers/media/i2c/ov5645.c                           |  6 +++---
 drivers/media/i2c/ov5693.c                           |  2 +-
 drivers/media/i2c/ov64a40.c                          |  8 ++++----
 drivers/media/i2c/ov7251.c                           |  2 +-
 drivers/media/i2c/ov8858.c                           |  4 ++--
 drivers/media/i2c/thp7312.c                          |  8 ++++----
 drivers/media/i2c/video-i2c.c                        |  8 ++++----
 drivers/media/platform/nvidia/tegra-vde/h264.c       |  4 ++--
 drivers/media/platform/qcom/venus/vdec.c             |  4 ++--
 drivers/media/platform/qcom/venus/venc.c             |  4 ++--
 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c |  4 ++--
 drivers/media/platform/st/sti/delta/delta-v4l2.c     |  4 ++--
 drivers/media/platform/st/sti/hva/hva-hw.c           |  8 ++++----
 drivers/media/platform/verisilicon/hantro_drv.c      |  2 +-
 drivers/media/rc/gpio-ir-recv.c                      |  2 +-
 28 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/drivers/media/i2c/alvium-csi2.c b/drivers/media/i2c/alvium-csi2.c
index 5ddfd3dcb188..bdd1e531911f 100644
--- a/drivers/media/i2c/alvium-csi2.c
+++ b/drivers/media/i2c/alvium-csi2.c
@@ -1843,7 +1843,7 @@ static int alvium_s_stream(struct v4l2_subdev *sd, int enable)
 	} else {
 		alvium_set_stream_mipi(alvium, enable);
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	alvium->streaming = !!enable;
diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index e1ae0f9fad43..f7d4fb522473 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -789,7 +789,7 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
 
 	if (pm_status > 0) {
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	return rval;
@@ -1919,7 +1919,7 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
 		ccs_stop_streaming(sensor);
 		sensor->streaming = false;
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 
 		return 0;
 	}
@@ -1934,7 +1934,7 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
 	if (rval < 0) {
 		sensor->streaming = false;
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	return rval;
@@ -2682,7 +2682,7 @@ nvm_show(struct device *dev, struct device_attribute *attr, char *buf)
 	}
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	/*
 	 * NVM is still way below a PAGE_SIZE, so we can safely
@@ -3555,7 +3555,7 @@ static int ccs_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
index c626ed845928..36116c428a93 100644
--- a/drivers/media/i2c/dw9719.c
+++ b/drivers/media/i2c/dw9719.c
@@ -292,7 +292,7 @@ static int dw9719_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 
diff --git a/drivers/media/i2c/gc0308.c b/drivers/media/i2c/gc0308.c
index fa754a8a39a6..5814eeb6d2e1 100644
--- a/drivers/media/i2c/gc0308.c
+++ b/drivers/media/i2c/gc0308.c
@@ -976,7 +976,7 @@ static int gc0308_s_ctrl(struct v4l2_ctrl *ctrl)
 		dev_err(gc0308->dev, "failed to set control: %d\n", ret);
 
 	pm_runtime_mark_last_busy(gc0308->dev);
-	pm_runtime_put_autosuspend(gc0308->dev);
+	__pm_runtime_put_autosuspend(gc0308->dev);
 
 	return ret;
 }
@@ -1161,14 +1161,14 @@ static int gc0308_start_stream(struct gc0308 *gc0308)
 
 disable_pm:
 	pm_runtime_mark_last_busy(gc0308->dev);
-	pm_runtime_put_autosuspend(gc0308->dev);
+	__pm_runtime_put_autosuspend(gc0308->dev);
 	return ret;
 }
 
 static int gc0308_stop_stream(struct gc0308 *gc0308)
 {
 	pm_runtime_mark_last_busy(gc0308->dev);
-	pm_runtime_put_autosuspend(gc0308->dev);
+	__pm_runtime_put_autosuspend(gc0308->dev);
 	return 0;
 }
 
diff --git a/drivers/media/i2c/gc2145.c b/drivers/media/i2c/gc2145.c
index 667bb756d056..086436d823f7 100644
--- a/drivers/media/i2c/gc2145.c
+++ b/drivers/media/i2c/gc2145.c
@@ -963,7 +963,7 @@ static int gc2145_start_streaming(struct gc2145 *gc2145,
 
 err_rpm_put:
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 	return ret;
 }
 
@@ -982,7 +982,7 @@ static void gc2145_stop_streaming(struct gc2145 *gc2145)
 		dev_err(&client->dev, "%s failed to write regs\n", __func__);
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 }
 
 static int gc2145_set_stream(struct v4l2_subdev *sd, int enable)
@@ -1210,7 +1210,7 @@ static int gc2145_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 }
@@ -1434,7 +1434,7 @@ static int gc2145_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	ret = v4l2_async_register_subdev_sensor(&gc2145->sd);
 	if (ret < 0) {
diff --git a/drivers/media/i2c/imx283.c b/drivers/media/i2c/imx283.c
index 94276f4f2d83..f6558251649c 100644
--- a/drivers/media/i2c/imx283.c
+++ b/drivers/media/i2c/imx283.c
@@ -1145,7 +1145,7 @@ static int imx283_enable_streams(struct v4l2_subdev *sd,
 
 err_rpm_put:
 	pm_runtime_mark_last_busy(imx283->dev);
-	pm_runtime_put_autosuspend(imx283->dev);
+	__pm_runtime_put_autosuspend(imx283->dev);
 
 	return ret;
 }
@@ -1165,7 +1165,7 @@ static int imx283_disable_streams(struct v4l2_subdev *sd,
 		dev_err(imx283->dev, "Failed to stop stream\n");
 
 	pm_runtime_mark_last_busy(imx283->dev);
-	pm_runtime_put_autosuspend(imx283->dev);
+	__pm_runtime_put_autosuspend(imx283->dev);
 
 	return ret;
 }
@@ -1580,7 +1580,7 @@ static int imx283_probe(struct i2c_client *client)
 	 * autosuspend delay, turning the power off.
 	 */
 	pm_runtime_mark_last_busy(imx283->dev);
-	pm_runtime_put_autosuspend(imx283->dev);
+	__pm_runtime_put_autosuspend(imx283->dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
index 458905dfb3e1..f1f42bec211a 100644
--- a/drivers/media/i2c/imx290.c
+++ b/drivers/media/i2c/imx290.c
@@ -824,7 +824,7 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(imx290->dev);
-	pm_runtime_put_autosuspend(imx290->dev);
+	__pm_runtime_put_autosuspend(imx290->dev);
 
 	return ret;
 }
@@ -1058,7 +1058,7 @@ static int imx290_set_stream(struct v4l2_subdev *sd, int enable)
 	} else {
 		imx290_stop_streaming(imx290);
 		pm_runtime_mark_last_busy(imx290->dev);
-		pm_runtime_put_autosuspend(imx290->dev);
+		__pm_runtime_put_autosuspend(imx290->dev);
 	}
 
 	/*
@@ -1604,7 +1604,7 @@ static int imx290_probe(struct i2c_client *client)
 	 * autosuspend delay, turning the power off.
 	 */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/imx296.c b/drivers/media/i2c/imx296.c
index 83149fa729c4..4003e224412b 100644
--- a/drivers/media/i2c/imx296.c
+++ b/drivers/media/i2c/imx296.c
@@ -605,7 +605,7 @@ static int imx296_s_stream(struct v4l2_subdev *sd, int enable)
 		ret = imx296_stream_off(sensor);
 
 		pm_runtime_mark_last_busy(sensor->dev);
-		pm_runtime_put_autosuspend(sensor->dev);
+		__pm_runtime_put_autosuspend(sensor->dev);
 
 		goto unlock;
 	}
@@ -1102,7 +1102,7 @@ static int imx296_probe(struct i2c_client *client)
 	 */
 	pm_runtime_set_autosuspend_delay(sensor->dev, 1000);
 	pm_runtime_use_autosuspend(sensor->dev);
-	pm_runtime_put_autosuspend(sensor->dev);
+	__pm_runtime_put_autosuspend(sensor->dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
index a20b0db330d3..1681b06cdaa8 100644
--- a/drivers/media/i2c/imx415.c
+++ b/drivers/media/i2c/imx415.c
@@ -957,7 +957,7 @@ static int imx415_s_stream(struct v4l2_subdev *sd, int enable)
 		ret = imx415_stream_off(sensor);
 
 		pm_runtime_mark_last_busy(sensor->dev);
-		pm_runtime_put_autosuspend(sensor->dev);
+		__pm_runtime_put_autosuspend(sensor->dev);
 
 		goto unlock;
 	}
@@ -1399,7 +1399,7 @@ static int imx415_probe(struct i2c_client *client)
 	 */
 	pm_runtime_set_autosuspend_delay(sensor->dev, 1000);
 	pm_runtime_use_autosuspend(sensor->dev);
-	pm_runtime_put_autosuspend(sensor->dev);
+	__pm_runtime_put_autosuspend(sensor->dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/mt9m114.c b/drivers/media/i2c/mt9m114.c
index 5f0b0ad8f885..a78800f96fdb 100644
--- a/drivers/media/i2c/mt9m114.c
+++ b/drivers/media/i2c/mt9m114.c
@@ -955,7 +955,7 @@ static int mt9m114_start_streaming(struct mt9m114 *sensor,
 
 error:
 	pm_runtime_mark_last_busy(&sensor->client->dev);
-	pm_runtime_put_autosuspend(&sensor->client->dev);
+	__pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
 }
@@ -969,7 +969,7 @@ static int mt9m114_stop_streaming(struct mt9m114 *sensor)
 	ret = mt9m114_set_state(sensor, MT9M114_SYS_STATE_ENTER_SUSPEND);
 
 	pm_runtime_mark_last_busy(&sensor->client->dev);
-	pm_runtime_put_autosuspend(&sensor->client->dev);
+	__pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
 }
@@ -1027,7 +1027,7 @@ static int mt9m114_pa_g_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&sensor->client->dev);
-	pm_runtime_put_autosuspend(&sensor->client->dev);
+	__pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
 }
@@ -1094,7 +1094,7 @@ static int mt9m114_pa_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&sensor->client->dev);
-	pm_runtime_put_autosuspend(&sensor->client->dev);
+	__pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
 }
@@ -1546,7 +1546,7 @@ static int mt9m114_ifp_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&sensor->client->dev);
-	pm_runtime_put_autosuspend(&sensor->client->dev);
+	__pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
 }
@@ -2438,7 +2438,7 @@ static int mt9m114_probe(struct i2c_client *client)
 	 * autosuspend delay, turning the power off.
 	 */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/ov2680.c b/drivers/media/i2c/ov2680.c
index 7237fb27ecd0..c4766c0d09f4 100644
--- a/drivers/media/i2c/ov2680.c
+++ b/drivers/media/i2c/ov2680.c
@@ -1245,7 +1245,7 @@ static int ov2680_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/ov4689.c b/drivers/media/i2c/ov4689.c
index 1c3a449f9354..25139204fb76 100644
--- a/drivers/media/i2c/ov4689.c
+++ b/drivers/media/i2c/ov4689.c
@@ -498,7 +498,7 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
 		cci_write(ov4689->regmap, OV4689_REG_CTRL_MODE,
 			  OV4689_MODE_SW_STANDBY, NULL);
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 unlock_and_return:
@@ -703,7 +703,7 @@ static int ov4689_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1000,7 +1000,7 @@ static int ov4689_probe(struct i2c_client *client)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index c1d3fce4a7d3..66c272f0eb06 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3341,7 +3341,7 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
-	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
+	__pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
 	return 0;
 }
@@ -3417,7 +3417,7 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
-	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
+	__pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
 	return ret;
 }
@@ -3754,7 +3754,7 @@ static int ov5640_s_stream(struct v4l2_subdev *sd, int enable)
 
 	if (!enable || ret) {
 		pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
-		pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
+		__pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 	}
 
 	return ret;
@@ -3965,7 +3965,7 @@ static int ov5640_probe(struct i2c_client *client)
 	pm_runtime_set_autosuspend_delay(dev, 1000);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
index 0c32bd2940ec..15846490f88a 100644
--- a/drivers/media/i2c/ov5645.c
+++ b/drivers/media/i2c/ov5645.c
@@ -815,7 +815,7 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(ov5645->dev);
-	pm_runtime_put_autosuspend(ov5645->dev);
+	__pm_runtime_put_autosuspend(ov5645->dev);
 	mutex_unlock(&ov5645->power_lock);
 
 	return ret;
@@ -1026,7 +1026,7 @@ static int ov5645_s_stream(struct v4l2_subdev *subdev, int enable)
 
 stream_off_rpm_put:
 	pm_runtime_mark_last_busy(ov5645->dev);
-	pm_runtime_put_autosuspend(ov5645->dev);
+	__pm_runtime_put_autosuspend(ov5645->dev);
 	return ret;
 }
 
@@ -1247,7 +1247,7 @@ static int ov5645_probe(struct i2c_client *client)
 	pm_runtime_set_autosuspend_delay(dev, 1000);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
index 46b9ce111676..7a19d654b1a1 100644
--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -1360,7 +1360,7 @@ static int ov5693_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 
diff --git a/drivers/media/i2c/ov64a40.c b/drivers/media/i2c/ov64a40.c
index 541bf74581d2..cfa01880bda2 100644
--- a/drivers/media/i2c/ov64a40.c
+++ b/drivers/media/i2c/ov64a40.c
@@ -2992,7 +2992,7 @@ static int ov64a40_start_streaming(struct ov64a40 *ov64a40,
 
 error_power_off:
 	pm_runtime_mark_last_busy(ov64a40->dev);
-	pm_runtime_put_autosuspend(ov64a40->dev);
+	__pm_runtime_put_autosuspend(ov64a40->dev);
 
 	return ret;
 }
@@ -3002,7 +3002,7 @@ static int ov64a40_stop_streaming(struct ov64a40 *ov64a40,
 {
 	cci_update_bits(ov64a40->cci, OV64A40_REG_SMIA, BIT(0), 0, NULL);
 	pm_runtime_mark_last_busy(ov64a40->dev);
-	pm_runtime_put_autosuspend(ov64a40->dev);
+	__pm_runtime_put_autosuspend(ov64a40->dev);
 
 	__v4l2_ctrl_grab(ov64a40->link_freq, false);
 	__v4l2_ctrl_grab(ov64a40->vflip, false);
@@ -3338,7 +3338,7 @@ static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl)
 
 	if (pm_status > 0) {
 		pm_runtime_mark_last_busy(ov64a40->dev);
-		pm_runtime_put_autosuspend(ov64a40->dev);
+		__pm_runtime_put_autosuspend(ov64a40->dev);
 	}
 
 	return ret;
@@ -3631,7 +3631,7 @@ static int ov64a40_probe(struct i2c_client *client)
 	}
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c
index 30f61e04ecaf..09baaf19a0f7 100644
--- a/drivers/media/i2c/ov7251.c
+++ b/drivers/media/i2c/ov7251.c
@@ -1762,7 +1762,7 @@ static int ov7251_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	ret = v4l2_async_register_subdev(&ov7251->sd);
 	if (ret < 0) {
diff --git a/drivers/media/i2c/ov8858.c b/drivers/media/i2c/ov8858.c
index 326f50a5ab51..ead116e7c0d8 100644
--- a/drivers/media/i2c/ov8858.c
+++ b/drivers/media/i2c/ov8858.c
@@ -1393,7 +1393,7 @@ static int ov8858_s_stream(struct v4l2_subdev *sd, int on)
 	} else {
 		ov8858_stop_stream(ov8858);
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 	}
 
 unlock_and_return:
@@ -1953,7 +1953,7 @@ static int ov8858_probe(struct i2c_client *client)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
diff --git a/drivers/media/i2c/thp7312.c b/drivers/media/i2c/thp7312.c
index c77440ff098c..662dfa841e8b 100644
--- a/drivers/media/i2c/thp7312.c
+++ b/drivers/media/i2c/thp7312.c
@@ -810,7 +810,7 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
 		thp7312_stream_enable(thp7312, false);
 
 		pm_runtime_mark_last_busy(thp7312->dev);
-		pm_runtime_put_autosuspend(thp7312->dev);
+		__pm_runtime_put_autosuspend(thp7312->dev);
 
 		v4l2_subdev_unlock_state(sd_state);
 
@@ -841,7 +841,7 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
 
 finish_pm:
 	pm_runtime_mark_last_busy(thp7312->dev);
-	pm_runtime_put_autosuspend(thp7312->dev);
+	__pm_runtime_put_autosuspend(thp7312->dev);
 finish_unlock:
 	v4l2_subdev_unlock_state(sd_state);
 
@@ -1151,7 +1151,7 @@ static int thp7312_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(thp7312->dev);
-	pm_runtime_put_autosuspend(thp7312->dev);
+	__pm_runtime_put_autosuspend(thp7312->dev);
 
 	return ret;
 }
@@ -2187,7 +2187,7 @@ static int thp7312_probe(struct i2c_client *client)
 	 * autosuspend delay, turning the power off.
 	 */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	dev_info(dev, "THP7312 firmware version %02u.%02u\n",
 		 THP7312_FW_VERSION_MAJOR(thp7312->fw_version),
diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
index 56dbe07a1c99..0edbc48c5f28 100644
--- a/drivers/media/i2c/video-i2c.c
+++ b/drivers/media/i2c/video-i2c.c
@@ -299,7 +299,7 @@ static int amg88xx_read(struct device *dev, enum hwmon_sensor_types type,
 
 	tmp = regmap_bulk_read(data->regmap, AMG88XX_REG_TTHL, &buf, 2);
 	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
-	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
+	__pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 	if (tmp)
 		return tmp;
 
@@ -538,7 +538,7 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
 
 error_rpm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 error_del_list:
 	video_i2c_del_list(vq, VB2_BUF_STATE_QUEUED);
 
@@ -555,7 +555,7 @@ static void stop_streaming(struct vb2_queue *vq)
 	kthread_stop(data->kthread_vid_cap);
 	data->kthread_vid_cap = NULL;
 	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
-	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
+	__pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 
 	video_i2c_del_list(vq, VB2_BUF_STATE_ERROR);
 }
@@ -866,7 +866,7 @@ static int video_i2c_probe(struct i2c_client *client)
 		goto error_pm_disable;
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
 
diff --git a/drivers/media/platform/nvidia/tegra-vde/h264.c b/drivers/media/platform/nvidia/tegra-vde/h264.c
index 0e56a4331b0d..2cab9def0cf8 100644
--- a/drivers/media/platform/nvidia/tegra-vde/h264.c
+++ b/drivers/media/platform/nvidia/tegra-vde/h264.c
@@ -586,7 +586,7 @@ static int tegra_vde_decode_begin(struct tegra_vde *vde,
 
 put_runtime_pm:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 unlock:
 	mutex_unlock(&vde->lock);
@@ -613,7 +613,7 @@ static void tegra_vde_decode_abort(struct tegra_vde *vde)
 		dev_err(dev, "DEC end: Failed to assert HW reset: %d\n", err);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	mutex_unlock(&vde->lock);
 }
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index d12089370d91..3cd9ec3cac70 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -644,7 +644,7 @@ static int vdec_pm_put(struct venus_inst *inst, bool autosuspend)
 	mutex_lock(&core->pm_lock);
 
 	if (autosuspend)
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	else
 		ret = pm_runtime_put_sync(dev);
 
@@ -666,7 +666,7 @@ static int vdec_pm_get_put(struct venus_inst *inst)
 		if (ret < 0)
 			goto error;
 
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 error:
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 3ec2fb8d9fab..b429ad401f34 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -623,7 +623,7 @@ static int venc_pm_put(struct venus_inst *inst, bool autosuspend)
 	mutex_lock(&core->pm_lock);
 
 	if (autosuspend)
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	else
 		ret = pm_runtime_put_sync(dev);
 
@@ -645,7 +645,7 @@ static int venc_pm_get_put(struct venus_inst *inst)
 		if (ret < 0)
 			goto error;
 
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 error:
diff --git a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
index 65ff2382cffe..f5b16ee27620 100644
--- a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
+++ b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
@@ -952,7 +952,7 @@ static void pispbe_node_stop_streaming(struct vb2_queue *q)
 	spin_unlock_irqrestore(&pispbe->hw_lock, flags);
 
 	pm_runtime_mark_last_busy(pispbe->dev);
-	pm_runtime_put_autosuspend(pispbe->dev);
+	__pm_runtime_put_autosuspend(pispbe->dev);
 
 	dev_dbg(pispbe->dev, "Nodes streaming now 0x%x\n",
 		pispbe->streaming_map);
@@ -1741,7 +1741,7 @@ static int pispbe_probe(struct platform_device *pdev)
 		goto disable_devs_err;
 
 	pm_runtime_mark_last_busy(pispbe->dev);
-	pm_runtime_put_autosuspend(pispbe->dev);
+	__pm_runtime_put_autosuspend(pispbe->dev);
 
 	return 0;
 
diff --git a/drivers/media/platform/st/sti/delta/delta-v4l2.c b/drivers/media/platform/st/sti/delta/delta-v4l2.c
index da402d1e9171..667acbd674a6 100644
--- a/drivers/media/platform/st/sti/delta/delta-v4l2.c
+++ b/drivers/media/platform/st/sti/delta/delta-v4l2.c
@@ -1288,7 +1288,7 @@ void delta_put_autosuspend(struct delta_ctx *ctx)
 {
 	struct delta_dev *delta = ctx->dev;
 
-	pm_runtime_put_autosuspend(delta->dev);
+	__pm_runtime_put_autosuspend(delta->dev);
 }
 
 static void delta_vb2_au_queue(struct vb2_buffer *vb)
@@ -1910,7 +1910,7 @@ static void delta_remove(struct platform_device *pdev)
 
 	destroy_workqueue(delta->work_queue);
 
-	pm_runtime_put_autosuspend(delta->dev);
+	__pm_runtime_put_autosuspend(delta->dev);
 	pm_runtime_disable(delta->dev);
 
 	v4l2_device_unregister(&delta->v4l2_dev);
diff --git a/drivers/media/platform/st/sti/hva/hva-hw.c b/drivers/media/platform/st/sti/hva/hva-hw.c
index fcb18fb52fdd..00ab1fafb78a 100644
--- a/drivers/media/platform/st/sti/hva/hva-hw.c
+++ b/drivers/media/platform/st/sti/hva/hva-hw.c
@@ -278,7 +278,7 @@ static unsigned long int hva_hw_get_ip_version(struct hva_dev *hva)
 	version = readl_relaxed(hva->regs + HVA_HIF_REG_VERSION) &
 				VERSION_ID_MASK;
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	switch (version) {
 	case HVA_VERSION_V400:
@@ -418,7 +418,7 @@ void hva_hw_remove(struct hva_dev *hva)
 	disable_irq(hva->irq_its);
 	disable_irq(hva->irq_err);
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	pm_runtime_disable(dev);
 }
 
@@ -537,7 +537,7 @@ int hva_hw_execute_task(struct hva_ctx *ctx, enum hva_hw_cmd_type cmd,
 	}
 
 	if (got_pm)
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	mutex_unlock(&hva->protect_mutex);
 
 	return ret;
@@ -578,7 +578,7 @@ void hva_hw_dump_regs(struct hva_dev *hva, struct seq_file *s)
 	DUMP(HVA_HIF_REG_CLK_GATING);
 	DUMP(HVA_HIF_REG_VERSION);
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	mutex_unlock(&hva->protect_mutex);
 }
 #endif
diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
index 05bbac853c4f..238c31cef990 100644
--- a/drivers/media/platform/verisilicon/hantro_drv.c
+++ b/drivers/media/platform/verisilicon/hantro_drv.c
@@ -90,7 +90,7 @@ static void hantro_job_finish(struct hantro_dev *vpu,
 			      enum vb2_buffer_state result)
 {
 	pm_runtime_mark_last_busy(vpu->dev);
-	pm_runtime_put_autosuspend(vpu->dev);
+	__pm_runtime_put_autosuspend(vpu->dev);
 
 	clk_bulk_disable(vpu->variant->num_clocks, vpu->clocks);
 
diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
index b29a1a9f381d..2316759a768a 100644
--- a/drivers/media/rc/gpio-ir-recv.c
+++ b/drivers/media/rc/gpio-ir-recv.c
@@ -50,7 +50,7 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
 
 	if (pmdev) {
 		pm_runtime_mark_last_busy(pmdev);
-		pm_runtime_put_autosuspend(pmdev);
+		__pm_runtime_put_autosuspend(pmdev);
 	}
 
 	return IRQ_HANDLED;
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 28/51] mmc: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (28 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-mmc

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/mmc/core/core.c            | 4 ++--
 drivers/mmc/host/atmel-mci.c       | 4 ++--
 drivers/mmc/host/dw_mmc-rockchip.c | 2 +-
 drivers/mmc/host/dw_mmc.c          | 2 +-
 drivers/mmc/host/mmci.c            | 2 +-
 drivers/mmc/host/omap_hsmmc.c      | 6 +++---
 drivers/mmc/host/sdhci-msm.c       | 2 +-
 drivers/mmc/host/sdhci-of-at91.c   | 2 +-
 drivers/mmc/host/sdhci-omap.c      | 4 ++--
 drivers/mmc/host/sdhci-pci-core.c  | 2 +-
 drivers/mmc/host/sdhci-pxav3.c     | 6 +++---
 drivers/mmc/host/sdhci-sprd.c      | 2 +-
 drivers/mmc/host/sdhci-xenon.c     | 2 +-
 drivers/mmc/host/sdhci_am654.c     | 2 +-
 drivers/mmc/host/tmio_mmc_core.c   | 2 +-
 15 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index d6c819dd68ed..edfa700ef06c 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -849,7 +849,7 @@ void mmc_release_host(struct mmc_host *host)
 		if (host->caps & MMC_CAP_SYNC_RUNTIME_PM)
 			pm_runtime_put_sync_suspend(mmc_dev(host));
 		else
-			pm_runtime_put_autosuspend(mmc_dev(host));
+			__pm_runtime_put_autosuspend(mmc_dev(host));
 	}
 }
 EXPORT_SYMBOL(mmc_release_host);
@@ -877,7 +877,7 @@ void mmc_put_card(struct mmc_card *card, struct mmc_ctx *ctx)
 
 	mmc_release_host(host);
 	pm_runtime_mark_last_busy(&card->dev);
-	pm_runtime_put_autosuspend(&card->dev);
+	__pm_runtime_put_autosuspend(&card->dev);
 }
 EXPORT_SYMBOL(mmc_put_card);
 
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 204055b3c042..0ce3e1d62fbd 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -542,7 +542,7 @@ static int atmci_regs_show(struct seq_file *s, void *v)
 	spin_unlock_bh(&host->lock);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	seq_printf(s, "MR:\t0x%08x%s%s ",
 			buf[ATMCI_MR / 4],
@@ -2568,7 +2568,7 @@ static int atmci_probe(struct platform_device *pdev)
 		 host->mapbase, irq, nr_slots);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index baa23b517731..888f1f36808d 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -553,7 +553,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 }
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 41e451235f63..3832eb66f60f 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -159,7 +159,7 @@ static int dw_mci_regs_show(struct seq_file *s, void *v)
 	seq_printf(s, "INTMASK:\t0x%08x\n", mci_readl(host, INTMASK));
 	seq_printf(s, "CLKENA:\t0x%08x\n", mci_readl(host, CLKENA));
 
-	pm_runtime_put_autosuspend(host->dev);
+	__pm_runtime_put_autosuspend(host->dev);
 
 	return 0;
 }
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index b790c3c3c8f9..f842ee951965 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -2083,7 +2083,7 @@ static void mmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
 
 	if (!enable) {
 		pm_runtime_mark_last_busy(mmc_dev(mmc));
-		pm_runtime_put_autosuspend(mmc_dev(mmc));
+		__pm_runtime_put_autosuspend(mmc_dev(mmc));
 	}
 }
 
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 59e36e0ebbbf..ca4400aa61ea 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1664,7 +1664,7 @@ static int mmc_regs_show(struct seq_file *s, void *data)
 			OMAP_HSMMC_READ(host->base, CAPA));
 
 	pm_runtime_mark_last_busy(host->dev);
-	pm_runtime_put_autosuspend(host->dev);
+	__pm_runtime_put_autosuspend(host->dev);
 
 	return 0;
 }
@@ -1957,7 +1957,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);
+	__pm_runtime_put_autosuspend(host->dev);
 
 	return 0;
 
@@ -2039,7 +2039,7 @@ static int omap_hsmmc_resume(struct device *dev)
 		omap_hsmmc_conf_bus_power(host);
 
 	pm_runtime_mark_last_busy(host->dev);
-	pm_runtime_put_autosuspend(host->dev);
+	__pm_runtime_put_autosuspend(host->dev);
 	return 0;
 }
 #endif
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 8dd180a42f72..28b25689a44f 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -2649,7 +2649,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
 		goto pm_runtime_disable;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c
index 97988ed37467..b8079d3f9316 100644
--- a/drivers/mmc/host/sdhci-of-at91.c
+++ b/drivers/mmc/host/sdhci-of-at91.c
@@ -426,7 +426,7 @@ static int sdhci_at91_probe(struct platform_device *pdev)
 	    || mmc_gpio_get_cd(host->mmc) >= 0)
 		sdhci_at91_set_force_card_detect(host);
 
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c
index 54d795205fb4..f97165e66e20 100644
--- a/drivers/mmc/host/sdhci-omap.c
+++ b/drivers/mmc/host/sdhci-omap.c
@@ -1374,7 +1374,7 @@ static int sdhci_omap_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
@@ -1383,7 +1383,7 @@ static int sdhci_omap_probe(struct platform_device *pdev)
 
 err_rpm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 err_rpm_disable:
 	pm_runtime_dont_use_autosuspend(dev);
 	pm_runtime_disable(dev);
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index ed45ed0bdafd..3f8cd788fcb7 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -794,7 +794,7 @@ static void intel_ltr_set(struct device *dev, s32 val)
 	/* Cache the values into lpss structure */
 	intel_cache_ltr(slot);
 out:
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static bool intel_use_ltr(struct sdhci_pci_chip *chip)
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index 990723a008ae..e8e30c10f244 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -454,7 +454,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 	if (host->mmc->pm_caps & MMC_PM_WAKE_SDIO_IRQ)
 		device_init_wakeup(&pdev->dev, 1);
 
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
@@ -499,7 +499,7 @@ static int sdhci_pxav3_suspend(struct device *dev)
 		mmc_retune_needed(host->mmc);
 	ret = sdhci_suspend_host(host);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -512,7 +512,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_put_autosuspend(dev);
 
 	return ret;
 }
diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
index db5e253b0f79..0e6f7acbaf96 100644
--- a/drivers/mmc/host/sdhci-sprd.c
+++ b/drivers/mmc/host/sdhci-sprd.c
@@ -872,7 +872,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
 		goto err_cleanup_host;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
index 098f0ea45cbe..a647fac22bdd 100644
--- a/drivers/mmc/host/sdhci-xenon.c
+++ b/drivers/mmc/host/sdhci-xenon.c
@@ -581,7 +581,7 @@ static int xenon_probe(struct platform_device *pdev)
 	if (err)
 		goto remove_sdhc;
 
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 	/*
 	 * If we previously detected AC5 with over 2GB of memory,
 	 * then we disable ADMA and 64-bit DMA.
diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index b73f673db92b..4f6fbb632d90 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -989,7 +989,7 @@ static int sdhci_am654_probe(struct platform_device *pdev)
 	pm_runtime_set_autosuspend_delay(dev, SDHCI_AM654_AUTOSUSPEND_DELAY);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return 0;
 
 clk_disable:
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index 45a474ccab1c..06f1a7fba104 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -161,7 +161,7 @@ static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
 
 		host->sdio_irq_enabled = false;
 		pm_runtime_mark_last_busy(mmc_dev(mmc));
-		pm_runtime_put_autosuspend(mmc_dev(mmc));
+		__pm_runtime_put_autosuspend(mmc_dev(mmc));
 	}
 }
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 29/51] mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (27 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04 11:12   ` Miquel Raynal
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Han Xu, Miquel Raynal, Richard Weinberger, Vignesh Raghavendra; +Cc: linux-mtd

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
index e1b515304e3c..1a8fe322f5d6 100644
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
@@ -187,7 +187,7 @@ static int gpmi_init(struct gpmi_nand_data *this)
 
 err_out:
 	pm_runtime_mark_last_busy(this->dev);
-	pm_runtime_put_autosuspend(this->dev);
+	__pm_runtime_put_autosuspend(this->dev);
 	return ret;
 }
 
@@ -739,7 +739,7 @@ static int bch_set_geometry(struct gpmi_nand_data *this)
 
 	ret = pm_runtime_get_sync(this->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(this->dev);
+		__pm_runtime_put_autosuspend(this->dev);
 		return ret;
 	}
 
@@ -758,7 +758,7 @@ static int bch_set_geometry(struct gpmi_nand_data *this)
 	ret = 0;
 err_out:
 	pm_runtime_mark_last_busy(this->dev);
-	pm_runtime_put_autosuspend(this->dev);
+	__pm_runtime_put_autosuspend(this->dev);
 
 	return ret;
 }
@@ -2664,7 +2664,7 @@ static int gpmi_nfc_exec_op(struct nand_chip *chip,
 
 out_pm:
 	pm_runtime_mark_last_busy(this->dev);
-	pm_runtime_put_autosuspend(this->dev);
+	__pm_runtime_put_autosuspend(this->dev);
 
 	return ret;
 }
@@ -2780,7 +2780,7 @@ static int gpmi_nand_probe(struct platform_device *pdev)
 		goto exit_nfc_init;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_info(this->dev, "driver registered.\n");
 
-- 
2.39.5


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 26/51] mfd: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (31 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/mfd/arizona-irq.c  | 2 +-
 drivers/mfd/cs40l50-core.c | 2 +-
 drivers/mfd/cs42l43.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c
index d919ae9691e2..dd15608c65be 100644
--- a/drivers/mfd/arizona-irq.c
+++ b/drivers/mfd/arizona-irq.c
@@ -153,7 +153,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_put_autosuspend(arizona->dev);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/mfd/cs40l50-core.c b/drivers/mfd/cs40l50-core.c
index 26e7a769eb14..1b467d2a486b 100644
--- a/drivers/mfd/cs40l50-core.c
+++ b/drivers/mfd/cs40l50-core.c
@@ -532,7 +532,7 @@ int cs40l50_probe(struct cs40l50 *cs40l50)
 		return dev_err_probe(dev, ret, "Failed to request %s\n", CS40L50_FW);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c
index ae8fd37afb75..ac58ff2406b4 100644
--- a/drivers/mfd/cs42l43.c
+++ b/drivers/mfd/cs42l43.c
@@ -961,7 +961,7 @@ static void cs42l43_boot_work(struct work_struct *work)
 	}
 
 	pm_runtime_mark_last_busy(cs42l43->dev);
-	pm_runtime_put_autosuspend(cs42l43->dev);
+	__pm_runtime_put_autosuspend(cs42l43->dev);
 
 	return;
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 27/51] mei: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (29 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Tomas Winkler, Arnd Bergmann, Greg Kroah-Hartman; +Cc: linux-kernel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/misc/mei/client.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 9d090fa07516..fcdf62400a50 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -1014,7 +1014,7 @@ int mei_cl_disconnect(struct mei_cl *cl)
 
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return rets;
 }
@@ -1190,7 +1190,7 @@ int mei_cl_connect(struct mei_cl *cl, struct mei_me_client *me_cl,
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
 
@@ -1577,7 +1577,7 @@ int mei_cl_notify_request(struct mei_cl *cl,
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
 	return rets;
@@ -1725,7 +1725,7 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length, const struct file *fp)
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 nortpm:
 	if (rets)
 		mei_io_cb_free(cb);
@@ -2115,7 +2115,7 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, unsigned long time
 err:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 free:
 	mei_io_cb_free(cb);
 
@@ -2389,7 +2389,7 @@ int mei_cl_dma_alloc_and_map(struct mei_cl *cl, const struct file *fp,
 
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
 	return rets;
@@ -2467,7 +2467,7 @@ int mei_cl_dma_unmap(struct mei_cl *cl, const struct file *fp)
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
 	return rets;
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 30/51] net: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (30 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni; +Cc: netdev

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/net/ethernet/cadence/macb_main.c    | 10 +--
 drivers/net/ethernet/freescale/fec_main.c   | 16 ++---
 drivers/net/ethernet/renesas/ravb_main.c    |  8 +--
 drivers/net/ethernet/ti/davinci_mdio.c      | 14 ++--
 drivers/net/ipa/ipa_interrupt.c             |  2 +-
 drivers/net/ipa/ipa_main.c                  |  2 +-
 drivers/net/ipa/ipa_modem.c                 |  8 +--
 drivers/net/ipa/ipa_smp2p.c                 |  4 +-
 drivers/net/ipa/ipa_uc.c                    |  4 +-
 drivers/net/wireless/ath/wil6210/pm.c       |  2 +-
 drivers/net/wireless/ti/wl18xx/debugfs.c    |  6 +-
 drivers/net/wireless/ti/wlcore/cmd.c        |  2 +-
 drivers/net/wireless/ti/wlcore/debugfs.c    | 22 +++----
 drivers/net/wireless/ti/wlcore/main.c       | 72 ++++++++++-----------
 drivers/net/wireless/ti/wlcore/scan.c       |  2 +-
 drivers/net/wireless/ti/wlcore/sysfs.c      |  2 +-
 drivers/net/wireless/ti/wlcore/testmode.c   |  4 +-
 drivers/net/wireless/ti/wlcore/tx.c         |  2 +-
 drivers/net/wireless/ti/wlcore/vendor_cmd.c |  6 +-
 drivers/net/wwan/qcom_bam_dmux.c            |  4 +-
 drivers/net/wwan/t7xx/t7xx_hif_cldma.c      |  6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c  |  6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c  |  4 +-
 23 files changed, 104 insertions(+), 104 deletions(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index f06babec04a0..929ac771d5c3 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -364,7 +364,7 @@ static int macb_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum)
 
 mdio_read_exit:
 	pm_runtime_mark_last_busy(&bp->pdev->dev);
-	pm_runtime_put_autosuspend(&bp->pdev->dev);
+	__pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
 }
@@ -410,7 +410,7 @@ static int macb_mdio_read_c45(struct mii_bus *bus, int mii_id, int devad,
 
 mdio_read_exit:
 	pm_runtime_mark_last_busy(&bp->pdev->dev);
-	pm_runtime_put_autosuspend(&bp->pdev->dev);
+	__pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
 }
@@ -442,7 +442,7 @@ static int macb_mdio_write_c22(struct mii_bus *bus, int mii_id, int regnum,
 
 mdio_write_exit:
 	pm_runtime_mark_last_busy(&bp->pdev->dev);
-	pm_runtime_put_autosuspend(&bp->pdev->dev);
+	__pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
 }
@@ -488,7 +488,7 @@ static int macb_mdio_write_c45(struct mii_bus *bus, int mii_id,
 
 mdio_write_exit:
 	pm_runtime_mark_last_busy(&bp->pdev->dev);
-	pm_runtime_put_autosuspend(&bp->pdev->dev);
+	__pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
 }
@@ -5180,7 +5180,7 @@ static int macb_probe(struct platform_device *pdev)
 		    dev->base_addr, dev->irq, dev->dev_addr);
 
 	pm_runtime_mark_last_busy(&bp->pdev->dev);
-	pm_runtime_put_autosuspend(&bp->pdev->dev);
+	__pm_runtime_put_autosuspend(&bp->pdev->dev);
 
 	return 0;
 
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 31ebf6a4f973..493bfc7e44ee 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2166,7 +2166,7 @@ static int fec_enet_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum)
 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -2215,7 +2215,7 @@ static int fec_enet_mdio_read_c45(struct mii_bus *bus, int mii_id,
 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -2247,7 +2247,7 @@ static int fec_enet_mdio_write_c22(struct mii_bus *bus, int mii_id, int regnum,
 		netdev_err(fep->netdev, "MDIO write timeout\n");
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -2291,7 +2291,7 @@ static int fec_enet_mdio_write_c45(struct mii_bus *bus, int mii_id,
 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -2773,7 +2773,7 @@ static void fec_enet_get_regs(struct net_device *ndev,
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static int fec_enet_get_ts_info(struct net_device *ndev,
@@ -3557,7 +3557,7 @@ fec_enet_open(struct net_device *ndev)
 	fec_enet_clk_enable(ndev, false);
 clk_enable:
 	pm_runtime_mark_last_busy(&fep->pdev->dev);
-	pm_runtime_put_autosuspend(&fep->pdev->dev);
+	__pm_runtime_put_autosuspend(&fep->pdev->dev);
 	pinctrl_pm_select_sleep_state(&fep->pdev->dev);
 	return ret;
 }
@@ -3588,7 +3588,7 @@ fec_enet_close(struct net_device *ndev)
 
 	pinctrl_pm_select_sleep_state(&fep->pdev->dev);
 	pm_runtime_mark_last_busy(&fep->pdev->dev);
-	pm_runtime_put_autosuspend(&fep->pdev->dev);
+	__pm_runtime_put_autosuspend(&fep->pdev->dev);
 
 	fec_enet_free_buffers(ndev);
 
@@ -4535,7 +4535,7 @@ fec_probe(struct platform_device *pdev)
 	INIT_WORK(&fep->tx_timeout_work, fec_enet_timeout_work);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index d2a6518532f3..14c4c2070c2c 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1981,7 +1981,7 @@ static int ravb_open(struct net_device *ndev)
 	ravb_set_opmode(ndev, CCC_OPC_RESET);
 out_rpm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 out_napi_off:
 	if (info->nc_queues)
 		napi_disable(&priv->napi[RAVB_NC]);
@@ -2378,7 +2378,7 @@ static int ravb_close(struct net_device *ndev)
 		return error;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -3081,7 +3081,7 @@ static int ravb_probe(struct platform_device *pdev)
 		    (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
@@ -3260,7 +3260,7 @@ static int ravb_resume(struct device *dev)
 out_rpm_put:
 	if (!priv->wol_enabled) {
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 8e07d4a1b6ba..77893fc41a76 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -235,7 +235,7 @@ static int davinci_mdiobb_read_c22(struct mii_bus *bus, int phy, int reg)
 	ret = mdiobb_read_c22(bus, phy, reg);
 
 	pm_runtime_mark_last_busy(bus->parent);
-	pm_runtime_put_autosuspend(bus->parent);
+	__pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
 }
@@ -252,7 +252,7 @@ static int davinci_mdiobb_write_c22(struct mii_bus *bus, int phy, int reg,
 	ret = mdiobb_write_c22(bus, phy, reg, val);
 
 	pm_runtime_mark_last_busy(bus->parent);
-	pm_runtime_put_autosuspend(bus->parent);
+	__pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
 }
@@ -269,7 +269,7 @@ static int davinci_mdiobb_read_c45(struct mii_bus *bus, int phy, int devad,
 	ret = mdiobb_read_c45(bus, phy, devad, reg);
 
 	pm_runtime_mark_last_busy(bus->parent);
-	pm_runtime_put_autosuspend(bus->parent);
+	__pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
 }
@@ -286,7 +286,7 @@ static int davinci_mdiobb_write_c45(struct mii_bus *bus, int phy, int devad,
 	ret = mdiobb_write_c45(bus, phy, devad, reg, val);
 
 	pm_runtime_mark_last_busy(bus->parent);
-	pm_runtime_put_autosuspend(bus->parent);
+	__pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
 }
@@ -333,7 +333,7 @@ static int davinci_mdio_common_reset(struct davinci_mdio_data *data)
 
 done:
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
 }
@@ -442,7 +442,7 @@ static int davinci_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg)
 	}
 
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 	return ret;
 }
 
@@ -479,7 +479,7 @@ static int davinci_mdio_write(struct mii_bus *bus, int phy_id,
 	}
 
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
diff --git a/drivers/net/ipa/ipa_interrupt.c b/drivers/net/ipa/ipa_interrupt.c
index 245a06997055..737ffff14770 100644
--- a/drivers/net/ipa/ipa_interrupt.c
+++ b/drivers/net/ipa/ipa_interrupt.c
@@ -150,7 +150,7 @@ static irqreturn_t ipa_isr_thread(int irq, void *dev_id)
 	}
 out_power_put:
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
index 5f3dd5a2dcf4..bdb5e7b6cf29 100644
--- a/drivers/net/ipa/ipa_main.c
+++ b/drivers/net/ipa/ipa_main.c
@@ -912,7 +912,7 @@ static int ipa_probe(struct platform_device *pdev)
 		goto err_deconfig;
 done:
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
diff --git a/drivers/net/ipa/ipa_modem.c b/drivers/net/ipa/ipa_modem.c
index 8fe0d0e1a00f..17187676edae 100644
--- a/drivers/net/ipa/ipa_modem.c
+++ b/drivers/net/ipa/ipa_modem.c
@@ -72,7 +72,7 @@ static int ipa_open(struct net_device *netdev)
 	netif_start_queue(netdev);
 
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
@@ -103,7 +103,7 @@ static int ipa_stop(struct net_device *netdev)
 	ipa_endpoint_disable_one(priv->tx);
 out_power_put:
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -176,7 +176,7 @@ ipa_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 	ret = ipa_endpoint_skb_tx(endpoint, skb);
 
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	if (ret) {
 		if (ret != -E2BIG)
@@ -433,7 +433,7 @@ static void ipa_modem_crashed(struct ipa *ipa)
 
 out_power_put:
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 }
 
 static int ipa_modem_notify(struct notifier_block *nb, unsigned long action,
diff --git a/drivers/net/ipa/ipa_smp2p.c b/drivers/net/ipa/ipa_smp2p.c
index fcaadd111a8a..6339a1b580f2 100644
--- a/drivers/net/ipa/ipa_smp2p.c
+++ b/drivers/net/ipa/ipa_smp2p.c
@@ -172,7 +172,7 @@ static irqreturn_t ipa_smp2p_modem_setup_ready_isr(int irq, void *dev_id)
 
 out_power_put:
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	return IRQ_HANDLED;
 }
@@ -214,7 +214,7 @@ static void ipa_smp2p_power_release(struct ipa *ipa)
 		return;
 
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 	ipa->smp2p->power_on = false;
 }
 
diff --git a/drivers/net/ipa/ipa_uc.c b/drivers/net/ipa/ipa_uc.c
index 2963db83ab6b..256e6bad66c4 100644
--- a/drivers/net/ipa/ipa_uc.c
+++ b/drivers/net/ipa/ipa_uc.c
@@ -159,7 +159,7 @@ static void ipa_uc_response_hdlr(struct ipa *ipa)
 			ipa->uc_loaded = true;
 			ipa_power_retention(ipa, true);
 			pm_runtime_mark_last_busy(dev);
-			(void)pm_runtime_put_autosuspend(dev);
+			(void) __pm_runtime_put_autosuspend(dev);
 			ipa->uc_powered = false;
 		} else {
 			dev_warn(dev, "unexpected init_completed response\n");
@@ -204,7 +204,7 @@ void ipa_uc_deconfig(struct ipa *ipa)
 		return;
 
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 }
 
 /* Take a proxy power reference for the microcontroller */
diff --git a/drivers/net/wireless/ath/wil6210/pm.c b/drivers/net/wireless/ath/wil6210/pm.c
index f521af575e9b..eecafeb2ba90 100644
--- a/drivers/net/wireless/ath/wil6210/pm.c
+++ b/drivers/net/wireless/ath/wil6210/pm.c
@@ -459,5 +459,5 @@ void wil_pm_runtime_put(struct wil6210_priv *wil)
 	struct device *dev = wil_to_dev(wil);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
diff --git a/drivers/net/wireless/ti/wl18xx/debugfs.c b/drivers/net/wireless/ti/wl18xx/debugfs.c
index 80fbf740fe6d..33b780cd153a 100644
--- a/drivers/net/wireless/ti/wl18xx/debugfs.c
+++ b/drivers/net/wireless/ti/wl18xx/debugfs.c
@@ -273,7 +273,7 @@ static ssize_t radar_detection_write(struct file *file,
 		count = ret;
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -313,7 +313,7 @@ static ssize_t dynamic_fw_traces_write(struct file *file,
 		count = ret;
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -375,7 +375,7 @@ static ssize_t radar_debug_mode_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
index cd8ad0fe59cc..1a1444fc0ff0 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -214,7 +214,7 @@ int wlcore_cmd_wait_for_event_or_timeout(struct wl1271 *wl,
 
 out:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 free_vector:
 	kfree(events_vector);
 	return ret;
diff --git a/drivers/net/wireless/ti/wlcore/debugfs.c b/drivers/net/wireless/ti/wlcore/debugfs.c
index eb3d3f0e0b4d..4e7444066dd0 100644
--- a/drivers/net/wireless/ti/wlcore/debugfs.c
+++ b/drivers/net/wireless/ti/wlcore/debugfs.c
@@ -64,7 +64,7 @@ void wl1271_debugfs_update_stats(struct wl1271 *wl)
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -114,7 +114,7 @@ static void chip_op_handler(struct wl1271 *wl, unsigned long value,
 	chip_op(wl);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 }
 
 #define WL12XX_CONF_DEBUGFS(param, conf_sub_struct,			\
@@ -288,7 +288,7 @@ static ssize_t dynamic_ps_timeout_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -358,7 +358,7 @@ static ssize_t forced_ps_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -831,7 +831,7 @@ static ssize_t rx_streaming_interval_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -887,7 +887,7 @@ static ssize_t rx_streaming_always_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -935,7 +935,7 @@ static ssize_t beacon_filtering_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -1016,7 +1016,7 @@ static ssize_t sleep_auth_write(struct file *file,
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -1091,7 +1091,7 @@ static ssize_t dev_mem_read(struct file *file,
 
 part_err:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 skip_read:
 	mutex_unlock(&wl->mutex);
@@ -1173,7 +1173,7 @@ static ssize_t dev_mem_write(struct file *file, const char __user *user_buf,
 
 part_err:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 skip_write:
 	mutex_unlock(&wl->mutex);
@@ -1248,7 +1248,7 @@ static ssize_t fw_logger_write(struct file *file,
 	ret = wl12xx_cmd_config_fwlog(wl);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 0c77b8524160..09f311dee27f 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -155,7 +155,7 @@ static void wl1271_rx_streaming_enable_work(struct work_struct *work)
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 }
@@ -182,7 +182,7 @@ static void wl1271_rx_streaming_disable_work(struct work_struct *work)
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 }
@@ -234,7 +234,7 @@ static void wlcore_rc_update_work(struct work_struct *work)
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 }
@@ -711,7 +711,7 @@ static int wlcore_irq_locked(struct wl1271 *wl)
 
 err_ret:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	return ret;
@@ -1047,7 +1047,7 @@ static void wl1271_recovery_work(struct work_struct *work)
 
 	wlcore_op_stop_locked(wl);
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 	ieee80211_restart_hw(wl->hw);
 
@@ -1943,7 +1943,7 @@ static int __maybe_unused wl1271_op_resume(struct ieee80211_hw *hw)
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	wl->wow_enabled = false;
@@ -2131,7 +2131,7 @@ static void wlcore_channel_switch_work(struct work_struct *work)
 	wl12xx_cmd_stop_channel_switch(wl, wlvif);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 }
@@ -2201,7 +2201,7 @@ static void wlcore_pending_auth_complete_work(struct work_struct *work)
 	wlcore_update_inconn_sta(wl, wlvif, NULL, false);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 }
@@ -2694,7 +2694,7 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
 		wl->sta_count++;
 out:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out_unlock:
 	mutex_unlock(&wl->mutex);
 
@@ -2774,7 +2774,7 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
 		}
 
 		pm_runtime_mark_last_busy(wl->dev);
-		pm_runtime_put_autosuspend(wl->dev);
+		__pm_runtime_put_autosuspend(wl->dev);
 	}
 deinit:
 	wl12xx_tx_reset_wlvif(wl, wlvif);
@@ -3200,7 +3200,7 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -3315,7 +3315,7 @@ static void wl1271_op_configure_filter(struct ieee80211_hw *hw,
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -3531,7 +3531,7 @@ static int wlcore_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 	ret = wlcore_hw_set_key(wl, cmd, vif, sta, key_conf);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out_wake_queues:
 	if (might_change_spare)
@@ -3695,7 +3695,7 @@ static void wl1271_op_set_default_key_idx(struct ieee80211_hw *hw,
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out_unlock:
 	mutex_unlock(&wl->mutex);
@@ -3724,7 +3724,7 @@ void wlcore_regdomain_config(struct wl1271 *wl)
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 }
@@ -3772,7 +3772,7 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
 	ret = wlcore_scan(hw->priv, vif, ssid, len, req);
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -3823,7 +3823,7 @@ static void wl1271_op_cancel_hw_scan(struct ieee80211_hw *hw,
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -3860,7 +3860,7 @@ static int wl1271_op_sched_scan_start(struct ieee80211_hw *hw,
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return ret;
@@ -3887,7 +3887,7 @@ static int wl1271_op_sched_scan_stop(struct ieee80211_hw *hw,
 	wl->ops->sched_scan_stop(wl, wlvif);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -3915,7 +3915,7 @@ static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
 		wl1271_warning("wl1271_op_set_frag_threshold failed: %d", ret);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -3946,7 +3946,7 @@ static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
 			wl1271_warning("set rts threshold failed: %d", ret);
 	}
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -4712,7 +4712,7 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
 		wl1271_bss_info_changed_sta(wl, vif, bss_conf, changed);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -4777,7 +4777,7 @@ static void wlcore_op_change_chanctx(struct ieee80211_hw *hw,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 }
@@ -4826,7 +4826,7 @@ static int wlcore_op_assign_vif_chanctx(struct ieee80211_hw *hw,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -4869,7 +4869,7 @@ static void wlcore_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 }
@@ -4939,7 +4939,7 @@ wlcore_op_switch_vif_chanctx(struct ieee80211_hw *hw,
 	}
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -4993,7 +4993,7 @@ static int wl1271_op_conf_tx(struct ieee80211_hw *hw,
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -5027,7 +5027,7 @@ static u64 wl1271_op_get_tsf(struct ieee80211_hw *hw,
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -5340,7 +5340,7 @@ static int wl12xx_op_sta_state(struct ieee80211_hw *hw,
 	ret = wl12xx_update_sta_state(wl, wlvif, sta, old_state, new_state);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	if (new_state < old_state)
@@ -5465,7 +5465,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -5509,7 +5509,7 @@ static int wl12xx_set_bitrate_mask(struct ieee80211_hw *hw,
 		ret = wl1271_acx_sta_rate_policies(wl, wlvif);
 
 		pm_runtime_mark_last_busy(wl->dev);
-		pm_runtime_put_autosuspend(wl->dev);
+		__pm_runtime_put_autosuspend(wl->dev);
 	}
 out:
 	mutex_unlock(&wl->mutex);
@@ -5564,7 +5564,7 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -5643,7 +5643,7 @@ static void wlcore_op_channel_switch_beacon(struct ieee80211_hw *hw,
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 }
@@ -5697,7 +5697,7 @@ static int wlcore_op_remain_on_channel(struct ieee80211_hw *hw,
 				     msecs_to_jiffies(duration));
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return ret;
@@ -5746,7 +5746,7 @@ static int wlcore_roc_completed(struct wl1271 *wl)
 	ret = __wlcore_roc_completed(wl);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -5836,7 +5836,7 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw,
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
diff --git a/drivers/net/wireless/ti/wlcore/scan.c b/drivers/net/wireless/ti/wlcore/scan.c
index b414305acc32..ee16dc1c7da3 100644
--- a/drivers/net/wireless/ti/wlcore/scan.c
+++ b/drivers/net/wireless/ti/wlcore/scan.c
@@ -70,7 +70,7 @@ void wl1271_scan_complete_work(struct work_struct *work)
 	wlcore_cmd_regdomain_config_locked(wl);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 	ieee80211_scan_completed(wl->hw, &info);
 
diff --git a/drivers/net/wireless/ti/wlcore/sysfs.c b/drivers/net/wireless/ti/wlcore/sysfs.c
index c07acfcbbd9c..52fa40b5b8e7 100644
--- a/drivers/net/wireless/ti/wlcore/sysfs.c
+++ b/drivers/net/wireless/ti/wlcore/sysfs.c
@@ -59,7 +59,7 @@ static ssize_t bt_coex_state_store(struct device *dev,
 
 	wl1271_acx_sg_enable(wl, wl->sg_enabled);
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
  out:
 	mutex_unlock(&wl->mutex);
diff --git a/drivers/net/wireless/ti/wlcore/testmode.c b/drivers/net/wireless/ti/wlcore/testmode.c
index 3f338b8096c7..9b2c5ae7aef3 100644
--- a/drivers/net/wireless/ti/wlcore/testmode.c
+++ b/drivers/net/wireless/ti/wlcore/testmode.c
@@ -128,7 +128,7 @@ static int wl1271_tm_cmd_test(struct wl1271 *wl, struct nlattr *tb[])
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -193,7 +193,7 @@ static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[])
 	kfree(cmd);
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index 464587d16ab2..8151818722d7 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -864,7 +864,7 @@ void wl1271_tx_work(struct work_struct *work)
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 }
diff --git a/drivers/net/wireless/ti/wlcore/vendor_cmd.c b/drivers/net/wireless/ti/wlcore/vendor_cmd.c
index e4269e2b0098..f9bdbf2f387b 100644
--- a/drivers/net/wireless/ti/wlcore/vendor_cmd.c
+++ b/drivers/net/wireless/ti/wlcore/vendor_cmd.c
@@ -61,7 +61,7 @@ wlcore_vendor_cmd_smart_config_start(struct wiphy *wiphy,
 			nla_get_u32(tb[WLCORE_VENDOR_ATTR_GROUP_ID]));
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -93,7 +93,7 @@ wlcore_vendor_cmd_smart_config_stop(struct wiphy *wiphy,
 	ret = wlcore_smart_config_stop(wl);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -141,7 +141,7 @@ wlcore_vendor_cmd_smart_config_set_group_key(struct wiphy *wiphy,
 			nla_data(tb[WLCORE_VENDOR_ATTR_GROUP_KEY]));
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
diff --git a/drivers/net/wwan/qcom_bam_dmux.c b/drivers/net/wwan/qcom_bam_dmux.c
index 5dcb9a84a12e..59f6cacf2280 100644
--- a/drivers/net/wwan/qcom_bam_dmux.c
+++ b/drivers/net/wwan/qcom_bam_dmux.c
@@ -163,7 +163,7 @@ static void bam_dmux_tx_done(struct bam_dmux_skb_dma *skb_dma)
 	unsigned long flags;
 
 	pm_runtime_mark_last_busy(dmux->dev);
-	pm_runtime_put_autosuspend(dmux->dev);
+	__pm_runtime_put_autosuspend(dmux->dev);
 
 	if (skb_dma->addr)
 		bam_dmux_skb_dma_unmap(skb_dma, DMA_TO_DEVICE);
@@ -398,7 +398,7 @@ static void bam_dmux_tx_wakeup_work(struct work_struct *work)
 
 out:
 	pm_runtime_mark_last_busy(dmux->dev);
-	pm_runtime_put_autosuspend(dmux->dev);
+	__pm_runtime_put_autosuspend(dmux->dev);
 }
 
 static const struct net_device_ops bam_dmux_ops = {
diff --git a/drivers/net/wwan/t7xx/t7xx_hif_cldma.c b/drivers/net/wwan/t7xx/t7xx_hif_cldma.c
index 97163e1e5783..16f0708c8c54 100644
--- a/drivers/net/wwan/t7xx/t7xx_hif_cldma.c
+++ b/drivers/net/wwan/t7xx/t7xx_hif_cldma.c
@@ -251,7 +251,7 @@ static void t7xx_cldma_rx_done(struct work_struct *work)
 	t7xx_cldma_hw_irq_en_txrx(&md_ctrl->hw_info, queue->index, MTK_RX);
 	t7xx_cldma_hw_irq_en_eq(&md_ctrl->hw_info, queue->index, MTK_RX);
 	pm_runtime_mark_last_busy(md_ctrl->dev);
-	pm_runtime_put_autosuspend(md_ctrl->dev);
+	__pm_runtime_put_autosuspend(md_ctrl->dev);
 }
 
 static int t7xx_cldma_gpd_tx_collect(struct cldma_queue *queue)
@@ -363,7 +363,7 @@ static void t7xx_cldma_tx_done(struct work_struct *work)
 	spin_unlock_irqrestore(&md_ctrl->cldma_lock, flags);
 
 	pm_runtime_mark_last_busy(md_ctrl->dev);
-	pm_runtime_put_autosuspend(md_ctrl->dev);
+	__pm_runtime_put_autosuspend(md_ctrl->dev);
 }
 
 static void t7xx_cldma_ring_free(struct cldma_ctrl *md_ctrl,
@@ -988,7 +988,7 @@ int t7xx_cldma_send_skb(struct cldma_ctrl *md_ctrl, int qno, struct sk_buff *skb
 allow_sleep:
 	t7xx_pci_enable_sleep(md_ctrl->t7xx_dev);
 	pm_runtime_mark_last_busy(md_ctrl->dev);
-	pm_runtime_put_autosuspend(md_ctrl->dev);
+	__pm_runtime_put_autosuspend(md_ctrl->dev);
 	return ret;
 }
 
diff --git a/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c b/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
index 210d84c67ef9..9329d7a04814 100644
--- a/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
+++ b/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
@@ -840,7 +840,7 @@ int t7xx_dpmaif_napi_rx_poll(struct napi_struct *napi, const int budget)
 
 	if (!rxq->que_started) {
 		atomic_set(&rxq->rx_processing, 0);
-		pm_runtime_put_autosuspend(rxq->dpmaif_ctrl->dev);
+		__pm_runtime_put_autosuspend(rxq->dpmaif_ctrl->dev);
 		dev_err(rxq->dpmaif_ctrl->dev, "Work RXQ: %d has not been started\n", rxq->index);
 		return work_done;
 	}
@@ -877,7 +877,7 @@ int t7xx_dpmaif_napi_rx_poll(struct napi_struct *napi, const int budget)
 		t7xx_dpmaif_dlq_unmask_rx_done(&rxq->dpmaif_ctrl->hw_info, rxq->index);
 		t7xx_pci_enable_sleep(rxq->dpmaif_ctrl->t7xx_dev);
 		pm_runtime_mark_last_busy(rxq->dpmaif_ctrl->dev);
-		pm_runtime_put_autosuspend(rxq->dpmaif_ctrl->dev);
+		__pm_runtime_put_autosuspend(rxq->dpmaif_ctrl->dev);
 		atomic_set(&rxq->rx_processing, 0);
 	} else {
 		t7xx_dpmaif_clr_ip_busy_sts(&rxq->dpmaif_ctrl->hw_info);
@@ -1078,7 +1078,7 @@ static void t7xx_dpmaif_bat_release_work(struct work_struct *work)
 
 	t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
 	pm_runtime_mark_last_busy(dpmaif_ctrl->dev);
-	pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
+	__pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
 }
 
 int t7xx_dpmaif_bat_rel_wq_alloc(struct dpmaif_ctrl *dpmaif_ctrl)
diff --git a/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c b/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
index 8dab025a088a..de8f4284ee28 100644
--- a/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
+++ b/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
@@ -186,7 +186,7 @@ static void t7xx_dpmaif_tx_done(struct work_struct *work)
 
 	t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
 	pm_runtime_mark_last_busy(dpmaif_ctrl->dev);
-	pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
+	__pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
 }
 
 static void t7xx_setup_msg_drb(struct dpmaif_ctrl *dpmaif_ctrl, unsigned int q_num,
@@ -469,7 +469,7 @@ static int t7xx_dpmaif_tx_hw_push_thread(void *arg)
 		t7xx_do_tx_hw_push(dpmaif_ctrl);
 		t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
 		pm_runtime_mark_last_busy(dpmaif_ctrl->dev);
-		pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
+		__pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
 	}
 
 	return 0;
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 33/51] phy: motorola: phy-mapphone-mdm6600: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (37 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Sakari Ailus; +Cc: linux-phy

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/phy/motorola/phy-mapphone-mdm6600.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
index 376d023a0aa9..5daf3217c7a0 100644
--- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
+++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
@@ -251,7 +251,7 @@ static irqreturn_t phy_mdm6600_wakeirq_thread(int irq, void *data)
 
 	/* Just wake-up and kick the autosuspend timer */
 	pm_runtime_mark_last_busy(ddata->dev);
-	pm_runtime_put_autosuspend(ddata->dev);
+	__pm_runtime_put_autosuspend(ddata->dev);
 
 	return IRQ_HANDLED;
 }
@@ -619,7 +619,7 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
 
 idle:
 	pm_runtime_mark_last_busy(ddata->dev);
-	pm_runtime_put_autosuspend(ddata->dev);
+	__pm_runtime_put_autosuspend(ddata->dev);
 
 cleanup:
 	if (error < 0) {
-- 
2.39.5


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 34/51] phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (35 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Sakari Ailus; +Cc: linux-phy

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/phy/ti/phy-twl4030-usb.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/ti/phy-twl4030-usb.c b/drivers/phy/ti/phy-twl4030-usb.c
index 6b265992d988..e0492b61c9aa 100644
--- a/drivers/phy/ti/phy-twl4030-usb.c
+++ b/drivers/phy/ti/phy-twl4030-usb.c
@@ -506,7 +506,7 @@ static int twl4030_phy_power_on(struct phy *phy)
 	pm_runtime_get_sync(twl->dev);
 	schedule_delayed_work(&twl->id_workaround_work, HZ);
 	pm_runtime_mark_last_busy(twl->dev);
-	pm_runtime_put_autosuspend(twl->dev);
+	__pm_runtime_put_autosuspend(twl->dev);
 
 	return 0;
 }
@@ -599,7 +599,7 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
 			dev_dbg(twl->dev, "%s: cable disconnected %i\n",
 				__func__, status);
 			pm_runtime_mark_last_busy(twl->dev);
-			pm_runtime_put_autosuspend(twl->dev);
+			__pm_runtime_put_autosuspend(twl->dev);
 			twl->musb_mailbox_pending = true;
 		}
 	}
@@ -637,7 +637,7 @@ static int twl4030_phy_init(struct phy *phy)
 	twl->linkstat = MUSB_UNKNOWN;
 	schedule_delayed_work(&twl->id_workaround_work, HZ);
 	pm_runtime_mark_last_busy(twl->dev);
-	pm_runtime_put_autosuspend(twl->dev);
+	__pm_runtime_put_autosuspend(twl->dev);
 
 	return 0;
 }
@@ -782,7 +782,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 		return err;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(twl->dev);
+	__pm_runtime_put_autosuspend(twl->dev);
 
 	dev_info(&pdev->dev, "Initialized TWL4030 USB module\n");
 	return 0;
-- 
2.39.5


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 36/51] pwm: img: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (32 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04 12:38   ` Uwe Kleine-König
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-pwm

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/pwm/pwm-img.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pwm/pwm-img.c b/drivers/pwm/pwm-img.c
index 71542956feca..9bd177ebad0d 100644
--- a/drivers/pwm/pwm-img.c
+++ b/drivers/pwm/pwm-img.c
@@ -140,7 +140,7 @@ static int img_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	img_pwm_writel(imgchip, PWM_CH_CFG(pwm->hwpwm), val);
 
 	pm_runtime_mark_last_busy(pwmchip_parent(chip));
-	pm_runtime_put_autosuspend(pwmchip_parent(chip));
+	__pm_runtime_put_autosuspend(pwmchip_parent(chip));
 
 	return 0;
 }
@@ -176,7 +176,7 @@ static void img_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
 	img_pwm_writel(imgchip, PWM_CTRL_CFG, val);
 
 	pm_runtime_mark_last_busy(pwmchip_parent(chip));
-	pm_runtime_put_autosuspend(pwmchip_parent(chip));
+	__pm_runtime_put_autosuspend(pwmchip_parent(chip));
 }
 
 static int img_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 32/51] PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (36 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04  9:45   ` Ilpo Järvinen
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Bjorn Helgaas, Ilpo Järvinen, Sakari Ailus, Jonathan Cameron,
	Masahiro Yamada, Damien Le Moal
  Cc: linux-pci

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/pci/pcie/portdrv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c
index 6af5e0425872..53f48065cc82 100644
--- a/drivers/pci/pcie/portdrv.c
+++ b/drivers/pci/pcie/portdrv.c
@@ -711,7 +711,7 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
 		pm_runtime_set_autosuspend_delay(&dev->dev, 100);
 		pm_runtime_use_autosuspend(&dev->dev);
 		pm_runtime_mark_last_busy(&dev->dev);
-		pm_runtime_put_autosuspend(&dev->dev);
+		__pm_runtime_put_autosuspend(&dev->dev);
 		pm_runtime_allow(&dev->dev);
 	}
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 31/51] nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (38 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04 14:05   ` Krzysztof Kozlowski
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Mark Greer, Krzysztof Kozlowski; +Cc: linux-wireless, netdev

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/nfc/trf7970a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
index 9e1a34e23af2..4549f1960a27 100644
--- a/drivers/nfc/trf7970a.c
+++ b/drivers/nfc/trf7970a.c
@@ -1093,7 +1093,7 @@ static void trf7970a_switch_rf_off(struct trf7970a *trf)
 	trf->state = TRF7970A_ST_RF_OFF;
 
 	pm_runtime_mark_last_busy(trf->dev);
-	pm_runtime_put_autosuspend(trf->dev);
+	__pm_runtime_put_autosuspend(trf->dev);
 }
 
 static int trf7970a_switch_rf_on(struct trf7970a *trf)
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 37/51] regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (33 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04 11:34   ` Mark Brown
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Maxime Coquelin, Alexandre Torgue
  Cc: linux-stm32, linux-arm-kernel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/regulator/stm32-vrefbuf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/regulator/stm32-vrefbuf.c b/drivers/regulator/stm32-vrefbuf.c
index 40855105dd33..870e568e5de9 100644
--- a/drivers/regulator/stm32-vrefbuf.c
+++ b/drivers/regulator/stm32-vrefbuf.c
@@ -68,7 +68,7 @@ static int stm32_vrefbuf_enable(struct regulator_dev *rdev)
 	}
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return ret;
 }
@@ -88,7 +88,7 @@ static int stm32_vrefbuf_disable(struct regulator_dev *rdev)
 	writel_relaxed(val, priv->base + STM32_VREFBUF_CSR);
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return 0;
 }
@@ -105,7 +105,7 @@ static int stm32_vrefbuf_is_enabled(struct regulator_dev *rdev)
 	ret = readl_relaxed(priv->base + STM32_VREFBUF_CSR) & STM32_ENVR;
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return ret;
 }
@@ -126,7 +126,7 @@ static int stm32_vrefbuf_set_voltage_sel(struct regulator_dev *rdev,
 	writel_relaxed(val, priv->base + STM32_VREFBUF_CSR);
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return 0;
 }
@@ -145,7 +145,7 @@ static int stm32_vrefbuf_get_voltage_sel(struct regulator_dev *rdev)
 	ret = FIELD_GET(STM32_VRS, val);
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return ret;
 }
@@ -219,7 +219,7 @@ static int stm32_vrefbuf_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, rdev);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 35/51] power: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (34 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Sebastian Reichel, Andrew Davis, Hans de Goede,
	Uwe Kleine-König, Krzysztof Kozlowski, Thomas Weißschuh
  Cc: linux-kernel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/power/supply/bq24190_charger.c | 28 +++++++++++++-------------
 drivers/power/supply/twl4030_charger.c |  2 +-
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index 2b393eb5c282..526387a5faeb 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -502,7 +502,7 @@ static ssize_t bq24190_sysfs_show(struct device *dev,
 		count = sysfs_emit(buf, "%hhx\n", v);
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return count;
 }
@@ -533,7 +533,7 @@ static ssize_t bq24190_sysfs_store(struct device *dev,
 		count = ret;
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return count;
 }
@@ -560,7 +560,7 @@ static int bq24190_set_otg_vbus(struct bq24190_dev_info *bdi, bool enable)
 		ret = bq24190_charger_set_charge_type(bdi, &val);
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -597,7 +597,7 @@ static int bq24296_set_otg_vbus(struct bq24190_dev_info *bdi, bool enable)
 
 out:
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -630,7 +630,7 @@ static int bq24190_vbus_is_enabled(struct regulator_dev *dev)
 				BQ24190_REG_POC_CHG_CONFIG_SHIFT, &val);
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	if (ret)
 		return ret;
@@ -667,7 +667,7 @@ static int bq24296_vbus_is_enabled(struct regulator_dev *dev)
 				BQ24296_REG_POC_OTG_CONFIG_SHIFT, &val);
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	if (ret)
 		return ret;
@@ -1367,7 +1367,7 @@ static int bq24190_charger_get_property(struct power_supply *psy,
 	}
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -1409,7 +1409,7 @@ static int bq24190_charger_set_property(struct power_supply *psy,
 	}
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -1667,7 +1667,7 @@ static int bq24190_battery_get_property(struct power_supply *psy,
 	}
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -1698,7 +1698,7 @@ static int bq24190_battery_set_property(struct power_supply *psy,
 	}
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -1846,7 +1846,7 @@ static irqreturn_t bq24190_irq_handler_thread(int irq, void *data)
 	}
 	bq24190_check_status(bdi);
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 	bdi->irq_event = false;
 
 	return IRQ_HANDLED;
@@ -2148,7 +2148,7 @@ static int bq24190_probe(struct i2c_client *client)
 	enable_irq_wake(client->irq);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
@@ -2235,7 +2235,7 @@ static __maybe_unused int bq24190_pm_suspend(struct device *dev)
 
 	if (error >= 0) {
 		pm_runtime_mark_last_busy(bdi->dev);
-		pm_runtime_put_autosuspend(bdi->dev);
+		__pm_runtime_put_autosuspend(bdi->dev);
 	}
 
 	return 0;
@@ -2260,7 +2260,7 @@ static __maybe_unused int bq24190_pm_resume(struct device *dev)
 
 	if (error >= 0) {
 		pm_runtime_mark_last_busy(bdi->dev);
-		pm_runtime_put_autosuspend(bdi->dev);
+		__pm_runtime_put_autosuspend(bdi->dev);
 	}
 
 	/* Things may have changed while suspended so alert upper layer */
diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c
index f3f1a0862e93..1060a3b0d285 100644
--- a/drivers/power/supply/twl4030_charger.c
+++ b/drivers/power/supply/twl4030_charger.c
@@ -513,7 +513,7 @@ static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable)
 					TWL4030_BCIMDKEY);
 		if (bci->usb_enabled) {
 			pm_runtime_mark_last_busy(bci->transceiver->dev);
-			pm_runtime_put_autosuspend(bci->transceiver->dev);
+			__pm_runtime_put_autosuspend(bci->transceiver->dev);
 			bci->usb_enabled = 0;
 		}
 		bci->usb_cur = 0;
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 38/51] remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (40 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier; +Cc: linux-remoteproc

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/remoteproc/omap_remoteproc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index 9ae2e831456d..e8f0e915ca3f 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -552,7 +552,7 @@ static void omap_rproc_kick(struct rproc *rproc, int vqid)
 			ret);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 /**
@@ -653,7 +653,7 @@ static int omap_rproc_start(struct rproc *rproc)
 	pm_runtime_get_noresume(dev);
 	pm_runtime_enable(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
@@ -711,7 +711,7 @@ static int omap_rproc_stop(struct rproc *rproc)
 out:
 	/* schedule the next auto-suspend */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 39/51] slimbus: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (42 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Srinivas Kandagatla; +Cc: linux-sound

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/slimbus/core.c      | 2 +-
 drivers/slimbus/messaging.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
index 65e5515f7555..0c1127854f85 100644
--- a/drivers/slimbus/core.c
+++ b/drivers/slimbus/core.c
@@ -512,7 +512,7 @@ int slim_device_report_present(struct slim_controller *ctrl,
 
 slimbus_not_active:
 	pm_runtime_mark_last_busy(ctrl->dev);
-	pm_runtime_put_autosuspend(ctrl->dev);
+	__pm_runtime_put_autosuspend(ctrl->dev);
 	return ret;
 }
 EXPORT_SYMBOL_GPL(slim_device_report_present);
diff --git a/drivers/slimbus/messaging.c b/drivers/slimbus/messaging.c
index 242570a5e565..992826556c64 100644
--- a/drivers/slimbus/messaging.c
+++ b/drivers/slimbus/messaging.c
@@ -48,7 +48,7 @@ void slim_msg_response(struct slim_controller *ctrl, u8 *reply, u8 tid, u8 len)
 
 	/* Remove runtime-pm vote now that response was received for TID txn */
 	pm_runtime_mark_last_busy(ctrl->dev);
-	pm_runtime_put_autosuspend(ctrl->dev);
+	__pm_runtime_put_autosuspend(ctrl->dev);
 }
 EXPORT_SYMBOL_GPL(slim_msg_response);
 
@@ -171,7 +171,7 @@ int slim_do_transfer(struct slim_controller *ctrl, struct slim_msg_txn *txn)
 		 * if there was error during this transaction
 		 */
 		pm_runtime_mark_last_busy(ctrl->dev);
-		pm_runtime_put_autosuspend(ctrl->dev);
+		__pm_runtime_put_autosuspend(ctrl->dev);
 	}
 	return ret;
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 40/51] soundwire: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (41 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Vinod Koul, Bard Liao, Pierre-Louis Bossart, Sanyog Kale; +Cc: linux-sound

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/soundwire/bus.c            | 2 +-
 drivers/soundwire/cadence_master.c | 2 +-
 drivers/soundwire/qcom.c           | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index d1dc62c34f1c..ad07f21bcb87 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -1812,7 +1812,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
 
 io_err:
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	return ret;
 }
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index 05652e983539..3e75e07aee2f 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -485,7 +485,7 @@ static int cdns_parity_error_injection(void *data, u64 value)
 	 * also result in Slave devices suspending.
 	 */
 	pm_runtime_mark_last_busy(bus->dev);
-	pm_runtime_put_autosuspend(bus->dev);
+	__pm_runtime_put_autosuspend(bus->dev);
 
 	return 0;
 }
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 2b403b14066c..f5313687ff5b 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -657,7 +657,7 @@ static irqreturn_t qcom_swrm_wake_irq_handler(int irq, void *dev_id)
 	}
 
 	pm_runtime_mark_last_busy(ctrl->dev);
-	pm_runtime_put_autosuspend(ctrl->dev);
+	__pm_runtime_put_autosuspend(ctrl->dev);
 
 	return IRQ_HANDLED;
 }
@@ -1295,7 +1295,7 @@ static void qcom_swrm_shutdown(struct snd_pcm_substream *substream,
 
 	swrm_wait_for_wr_fifo_done(ctrl);
 	pm_runtime_mark_last_busy(ctrl->dev);
-	pm_runtime_put_autosuspend(ctrl->dev);
+	__pm_runtime_put_autosuspend(ctrl->dev);
 
 }
 
@@ -1477,7 +1477,7 @@ static int swrm_reg_show(struct seq_file *s_file, void *data)
 		seq_printf(s_file, "0x%.3x: 0x%.2x\n", reg, reg_val);
 	}
 	pm_runtime_mark_last_busy(ctrl->dev);
-	pm_runtime_put_autosuspend(ctrl->dev);
+	__pm_runtime_put_autosuspend(ctrl->dev);
 
 
 	return 0;
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 41/51] spi: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (39 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/spi/atmel-quadspi.c       | 10 +++++-----
 drivers/spi/spi-cadence-quadspi.c |  4 ++--
 drivers/spi/spi-cadence.c         |  2 +-
 drivers/spi/spi-dw-pci.c          |  2 +-
 drivers/spi/spi-fsl-espi.c        |  4 ++--
 drivers/spi/spi-fsl-lpspi.c       |  4 ++--
 drivers/spi/spi-imx.c             |  6 +++---
 drivers/spi/spi-mtk-nor.c         |  2 +-
 drivers/spi/spi-omap2-mcspi.c     |  6 +++---
 drivers/spi/spi-pxa2xx-pci.c      |  2 +-
 drivers/spi/spi-s3c64xx.c         |  6 +++---
 drivers/spi/spi-sprd.c            |  2 +-
 drivers/spi/spi-stm32-qspi.c      | 14 +++++++-------
 drivers/spi/spi-stm32.c           |  4 ++--
 drivers/spi/spi-ti-qspi.c         |  4 ++--
 drivers/spi/spi-zynqmp-gqspi.c    |  2 +-
 drivers/spi/spi.c                 |  6 +++---
 17 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index 91108ddfaef2..0ea46b0f9476 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -459,7 +459,7 @@ static int atmel_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
 
 pm_runtime_put:
 	pm_runtime_mark_last_busy(&aq->pdev->dev);
-	pm_runtime_put_autosuspend(&aq->pdev->dev);
+	__pm_runtime_put_autosuspend(&aq->pdev->dev);
 	return err;
 }
 
@@ -506,7 +506,7 @@ static int atmel_qspi_setup(struct spi_device *spi)
 	atmel_qspi_write(aq->scr, aq, QSPI_SCR);
 
 	pm_runtime_mark_last_busy(ctrl->dev.parent);
-	pm_runtime_put_autosuspend(ctrl->dev.parent);
+	__pm_runtime_put_autosuspend(ctrl->dev.parent);
 
 	return 0;
 }
@@ -568,7 +568,7 @@ static int atmel_qspi_set_cs_timing(struct spi_device *spi)
 	atmel_qspi_write(aq->mr, aq, QSPI_MR);
 
 	pm_runtime_mark_last_busy(ctrl->dev.parent);
-	pm_runtime_put_autosuspend(ctrl->dev.parent);
+	__pm_runtime_put_autosuspend(ctrl->dev.parent);
 
 	return 0;
 }
@@ -713,7 +713,7 @@ static int atmel_qspi_probe(struct platform_device *pdev)
 		goto disable_qspick;
 	}
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
@@ -801,7 +801,7 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev)
 	atmel_qspi_write(aq->scr, aq, QSPI_SCR);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 0b45b7b2b3ab..fb8af087bd49 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1443,7 +1443,7 @@ static int cqspi_exec_mem_op(struct spi_mem *mem, const struct spi_mem_op *op)
 	ret = cqspi_mem_process(mem, op);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (ret)
 		dev_err(&mem->spi->dev, "operation failed with %d\n", ret);
@@ -1936,7 +1936,7 @@ static int cqspi_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 probe_setup_failed:
diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index 9e56bde87768..48c4e84c085f 100644
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -663,7 +663,7 @@ static int cdns_spi_probe(struct platform_device *pdev)
 		ctlr->max_speed_hz = xspi->clk_rate / 4;
 		xspi->speed_hz = ctlr->max_speed_hz;
 		pm_runtime_mark_last_busy(&pdev->dev);
-		pm_runtime_put_autosuspend(&pdev->dev);
+		__pm_runtime_put_autosuspend(&pdev->dev);
 	} else {
 		ctlr->mode_bits |= SPI_NO_CS;
 		ctlr->target_abort = cdns_target_abort;
diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c
index 7c8279d13f31..e46353b487f8 100644
--- a/drivers/spi/spi-dw-pci.c
+++ b/drivers/spi/spi-dw-pci.c
@@ -140,7 +140,7 @@ static int dw_spi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *en
 
 	pm_runtime_set_autosuspend_delay(&pdev->dev, 1000);
 	pm_runtime_use_autosuspend(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 	pm_runtime_allow(&pdev->dev);
 
 	return 0;
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index 6a73eaa34cf7..0aaf6c5028d8 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -514,7 +514,7 @@ static int fsl_espi_setup(struct spi_device *spi)
 	fsl_espi_setup_transfer(spi, NULL);
 
 	pm_runtime_mark_last_busy(espi->dev);
-	pm_runtime_put_autosuspend(espi->dev);
+	__pm_runtime_put_autosuspend(espi->dev);
 
 	return 0;
 }
@@ -727,7 +727,7 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem,
 	dev_info(dev, "irq = %u\n", irq);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index 40f5c8fdba76..20d0a22b921d 100644
--- a/drivers/spi/spi-fsl-lpspi.c
+++ b/drivers/spi/spi-fsl-lpspi.c
@@ -234,7 +234,7 @@ static int lpspi_unprepare_xfer_hardware(struct spi_controller *controller)
 				spi_controller_get_devdata(controller);
 
 	pm_runtime_mark_last_busy(fsl_lpspi->dev);
-	pm_runtime_put_autosuspend(fsl_lpspi->dev);
+	__pm_runtime_put_autosuspend(fsl_lpspi->dev);
 
 	return 0;
 }
@@ -967,7 +967,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(fsl_lpspi->dev);
-	pm_runtime_put_autosuspend(fsl_lpspi->dev);
+	__pm_runtime_put_autosuspend(fsl_lpspi->dev);
 
 	return 0;
 
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index adfd7d74a984..5c2f64c57f78 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -1671,7 +1671,7 @@ spi_imx_prepare_message(struct spi_controller *controller, struct spi_message *m
 	ret = spi_imx->devtype_data->prepare_message(spi_imx, msg);
 	if (ret) {
 		pm_runtime_mark_last_busy(spi_imx->dev);
-		pm_runtime_put_autosuspend(spi_imx->dev);
+		__pm_runtime_put_autosuspend(spi_imx->dev);
 	}
 
 	return ret;
@@ -1683,7 +1683,7 @@ spi_imx_unprepare_message(struct spi_controller *controller, struct spi_message
 	struct spi_imx_data *spi_imx = spi_controller_get_devdata(controller);
 
 	pm_runtime_mark_last_busy(spi_imx->dev);
-	pm_runtime_put_autosuspend(spi_imx->dev);
+	__pm_runtime_put_autosuspend(spi_imx->dev);
 	return 0;
 }
 
@@ -1856,7 +1856,7 @@ static int spi_imx_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(spi_imx->dev);
-	pm_runtime_put_autosuspend(spi_imx->dev);
+	__pm_runtime_put_autosuspend(spi_imx->dev);
 
 	return ret;
 
diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c
index 85ab5ce96c4d..12a3bba77037 100644
--- a/drivers/spi/spi-mtk-nor.c
+++ b/drivers/spi/spi-mtk-nor.c
@@ -919,7 +919,7 @@ static int mtk_nor_probe(struct platform_device *pdev)
 		goto err_probe;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_info(&pdev->dev, "spi frequency: %d Hz\n", sp->spi_freq);
 
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index e2400a067a95..1c52157f926b 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -272,7 +272,7 @@ static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable)
 		mcspi_write_chconf0(spi, l);
 
 		pm_runtime_mark_last_busy(mcspi->dev);
-		pm_runtime_put_autosuspend(mcspi->dev);
+		__pm_runtime_put_autosuspend(mcspi->dev);
 	}
 }
 
@@ -1102,7 +1102,7 @@ static int omap2_mcspi_setup(struct spi_device *spi)
 		omap2_mcspi_cleanup(spi);
 
 	pm_runtime_mark_last_busy(mcspi->dev);
-	pm_runtime_put_autosuspend(mcspi->dev);
+	__pm_runtime_put_autosuspend(mcspi->dev);
 
 	return ret;
 }
@@ -1374,7 +1374,7 @@ static int omap2_mcspi_controller_setup(struct omap2_mcspi *mcspi)
 
 	omap2_mcspi_set_mode(ctlr);
 	pm_runtime_mark_last_busy(mcspi->dev);
-	pm_runtime_put_autosuspend(mcspi->dev);
+	__pm_runtime_put_autosuspend(mcspi->dev);
 	return 0;
 }
 
diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c
index cc8dcf782399..b06716edc274 100644
--- a/drivers/spi/spi-pxa2xx-pci.c
+++ b/drivers/spi/spi-pxa2xx-pci.c
@@ -304,7 +304,7 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
 
 	pm_runtime_set_autosuspend_delay(&dev->dev, 50);
 	pm_runtime_use_autosuspend(&dev->dev);
-	pm_runtime_put_autosuspend(&dev->dev);
+	__pm_runtime_put_autosuspend(&dev->dev);
 	pm_runtime_allow(&dev->dev);
 
 	return 0;
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 389275dbc003..08cf10eaa4ee 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1044,14 +1044,14 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
 	}
 
 	pm_runtime_mark_last_busy(&sdd->pdev->dev);
-	pm_runtime_put_autosuspend(&sdd->pdev->dev);
+	__pm_runtime_put_autosuspend(&sdd->pdev->dev);
 	s3c64xx_spi_set_cs(spi, false);
 
 	return 0;
 
 setup_exit:
 	pm_runtime_mark_last_busy(&sdd->pdev->dev);
-	pm_runtime_put_autosuspend(&sdd->pdev->dev);
+	__pm_runtime_put_autosuspend(&sdd->pdev->dev);
 	/* setup() returns with device de-selected */
 	s3c64xx_spi_set_cs(spi, false);
 
@@ -1383,7 +1383,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
 		mem_res, sdd->fifo_depth);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sprd.c
index ae794058b381..e380981e12f3 100644
--- a/drivers/spi/spi-sprd.c
+++ b/drivers/spi/spi-sprd.c
@@ -983,7 +983,7 @@ static int sprd_spi_probe(struct platform_device *pdev)
 		goto err_rpm_put;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c
index 540b6948b24d..823da8ec4fd8 100644
--- a/drivers/spi/spi-stm32-qspi.c
+++ b/drivers/spi/spi-stm32-qspi.c
@@ -469,7 +469,7 @@ static int stm32_qspi_poll_status(struct spi_mem *mem, const struct spi_mem_op *
 	mutex_unlock(&qspi->lock);
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret;
 }
@@ -493,7 +493,7 @@ static int stm32_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
 	mutex_unlock(&qspi->lock);
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret;
 }
@@ -549,7 +549,7 @@ static ssize_t stm32_qspi_dirmap_read(struct spi_mem_dirmap_desc *desc,
 	mutex_unlock(&qspi->lock);
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret ?: len;
 }
@@ -633,7 +633,7 @@ static int stm32_qspi_transfer_one_message(struct spi_controller *ctrl,
 	spi_finalize_current_message(ctrl);
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret;
 }
@@ -690,7 +690,7 @@ static int stm32_qspi_setup(struct spi_device *spi)
 	mutex_unlock(&qspi->lock);
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 
 	return 0;
 }
@@ -864,7 +864,7 @@ static int stm32_qspi_probe(struct platform_device *pdev)
 		goto err_pm_runtime_free;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
@@ -944,7 +944,7 @@ static int __maybe_unused stm32_qspi_resume(struct device *dev)
 	writel_relaxed(qspi->dcr_reg, qspi->io_base + QSPI_DCR);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index f2dd8ab12df8..6f8549bdd198 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -2233,7 +2233,7 @@ static int stm32_spi_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_info(&pdev->dev, "driver initialized (%s mode)\n",
 		 STM32_SPI_HOST_MODE(spi) ? "host" : "device");
@@ -2342,7 +2342,7 @@ static int __maybe_unused stm32_spi_resume(struct device *dev)
 	spi->cfg->config(spi);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index dfd4a7948c03..5ec4413304db 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -159,7 +159,7 @@ static int ti_qspi_setup(struct spi_device *spi)
 	}
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	ret = pm_runtime_put_autosuspend(qspi->dev);
+	ret = __pm_runtime_put_autosuspend(qspi->dev);
 	if (ret < 0) {
 		dev_err(qspi->dev, "pm_runtime_put_autosuspend() failed\n");
 		return ret;
@@ -196,7 +196,7 @@ static void ti_qspi_setup_clk(struct ti_qspi *qspi, u32 speed_hz)
 	}
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 }
 
 static void ti_qspi_restore_ctx(struct ti_qspi *qspi)
diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index 84cce78e4f2e..da771e4153aa 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -1345,7 +1345,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 073ffae97767..987e3d582740 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1726,7 +1726,7 @@ static void spi_idle_runtime_pm(struct spi_controller *ctlr)
 {
 	if (ctlr->auto_runtime_pm) {
 		pm_runtime_mark_last_busy(ctlr->dev.parent);
-		pm_runtime_put_autosuspend(ctlr->dev.parent);
+		__pm_runtime_put_autosuspend(ctlr->dev.parent);
 	}
 }
 
@@ -3860,7 +3860,7 @@ static int spi_set_cs_timing(struct spi_device *spi)
 
 			status = spi->controller->set_cs_timing(spi);
 			pm_runtime_mark_last_busy(parent);
-			pm_runtime_put_autosuspend(parent);
+			__pm_runtime_put_autosuspend(parent);
 		} else {
 			status = spi->controller->set_cs_timing(spi);
 		}
@@ -3995,7 +3995,7 @@ int spi_setup(struct spi_device *spi)
 
 		spi_set_cs(spi, false, true);
 		pm_runtime_mark_last_busy(spi->controller->dev.parent);
-		pm_runtime_put_autosuspend(spi->controller->dev.parent);
+		__pm_runtime_put_autosuspend(spi->controller->dev.parent);
 	} else {
 		spi_set_cs(spi, false, true);
 	}
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 42/51] staging: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (43 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/staging/greybus/gbphy.h       | 2 +-
 drivers/staging/media/rkvdec/rkvdec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/gbphy.h b/drivers/staging/greybus/gbphy.h
index d4a225b76338..afa0c2a1e683 100644
--- a/drivers/staging/greybus/gbphy.h
+++ b/drivers/staging/greybus/gbphy.h
@@ -86,7 +86,7 @@ static inline void gbphy_runtime_put_autosuspend(struct gbphy_device *gbphy_dev)
 	struct device *dev = &gbphy_dev->dev;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static inline void gbphy_runtime_get_noresume(struct gbphy_device *gbphy_dev)
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
index ac398b5a9736..91c565f9a446 100644
--- a/drivers/staging/media/rkvdec/rkvdec.c
+++ b/drivers/staging/media/rkvdec/rkvdec.c
@@ -660,7 +660,7 @@ static void rkvdec_job_finish(struct rkvdec_ctx *ctx,
 	struct rkvdec_dev *rkvdec = ctx->dev;
 
 	pm_runtime_mark_last_busy(rkvdec->dev);
-	pm_runtime_put_autosuspend(rkvdec->dev);
+	__pm_runtime_put_autosuspend(rkvdec->dev);
 	rkvdec_job_finish_no_pm(ctx, result);
 }
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 44/51] serial: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (45 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Andy Shevchenko,
	Uwe Kleine-König, Hugo Villeneuve
  Cc: linux-serial

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/tty/serial/8250/8250_omap.c | 18 +++++++++---------
 drivers/tty/serial/8250/8250_port.c |  4 ++--
 drivers/tty/serial/fsl_lpuart.c     |  2 +-
 drivers/tty/serial/serial_core.c    |  2 +-
 drivers/tty/serial/uartlite.c       |  4 ++--
 drivers/tty/serial/xilinx_uartps.c  |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 88b58f44e4e9..8bd8284e591e 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -208,7 +208,7 @@ static void omap8250_set_mctrl(struct uart_port *port, unsigned int mctrl)
 	__omap8250_set_mctrl(port, mctrl);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 }
 
 /*
@@ -510,7 +510,7 @@ static void omap_8250_set_termios(struct uart_port *port,
 
 	uart_port_unlock_irq(&up->port);
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 
 	/* calculate wakeup latency constraint */
 	priv->calc_latency = USEC_PER_SEC * 64 * 8 / baud;
@@ -548,7 +548,7 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state,
 	uart_port_unlock_irq(port);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 }
 
 static void omap_serial_fill_features_erratas(struct uart_8250_port *up,
@@ -767,7 +767,7 @@ static int omap_8250_startup(struct uart_port *port)
 	enable_irq(up->port.irq);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 	return 0;
 }
 
@@ -805,7 +805,7 @@ static void omap_8250_shutdown(struct uart_port *port)
 	serial_out(up, UART_FCR, UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 }
 
 static void omap_8250_throttle(struct uart_port *port)
@@ -821,7 +821,7 @@ static void omap_8250_throttle(struct uart_port *port)
 	uart_port_unlock_irqrestore(port, flags);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 }
 
 static void omap_8250_unthrottle(struct uart_port *port)
@@ -843,7 +843,7 @@ static void omap_8250_unthrottle(struct uart_port *port)
 	uart_port_unlock_irqrestore(port, flags);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 }
 
 static int omap8250_rs485_config(struct uart_port *port,
@@ -1594,7 +1594,7 @@ static int omap8250_probe(struct platform_device *pdev)
 	}
 	priv->line = ret;
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 	return 0;
 err:
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
@@ -1682,7 +1682,7 @@ static int omap8250_resume(struct device *dev)
 	serial8250_resume_port(priv->line);
 	/* Paired with pm_runtime_resume_and_get() in omap8250_suspend() */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 3509af7dc52b..a94f30fac856 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -510,7 +510,7 @@ void serial8250_rpm_put(struct uart_8250_port *p)
 	if (!(p->capabilities & UART_CAP_RPM))
 		return;
 	pm_runtime_mark_last_busy(p->port.dev);
-	pm_runtime_put_autosuspend(p->port.dev);
+	__pm_runtime_put_autosuspend(p->port.dev);
 }
 EXPORT_SYMBOL_GPL(serial8250_rpm_put);
 
@@ -654,7 +654,7 @@ void serial8250_rpm_put_tx(struct uart_8250_port *p)
 	if (!rpm_active)
 		return;
 	pm_runtime_mark_last_busy(p->port.dev);
-	pm_runtime_put_autosuspend(p->port.dev);
+	__pm_runtime_put_autosuspend(p->port.dev);
 }
 EXPORT_SYMBOL_GPL(serial8250_rpm_put_tx);
 
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 77efa7ee6eda..5bf0d6d6f417 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -825,7 +825,7 @@ lpuart_uart_pm(struct uart_port *port, unsigned int state, unsigned int oldstate
 	switch (state) {
 	case UART_PM_STATE_OFF:
 		pm_runtime_mark_last_busy(port->dev);
-		pm_runtime_put_autosuspend(port->dev);
+		__pm_runtime_put_autosuspend(port->dev);
 		break;
 	default:
 		pm_runtime_get_sync(port->dev);
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index d94d73e45fb6..906254bed9fa 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -159,7 +159,7 @@ static void __uart_start(struct uart_state *state)
 	if (!pm_runtime_enabled(port->dev) || pm_runtime_active(&port_dev->dev))
 		port->ops->start_tx(port);
 	pm_runtime_mark_last_busy(&port_dev->dev);
-	pm_runtime_put_autosuspend(&port_dev->dev);
+	__pm_runtime_put_autosuspend(&port_dev->dev);
 }
 
 static void uart_start(struct tty_struct *tty)
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index 68357ac8ffe3..a7ecdcbce6d3 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -423,7 +423,7 @@ static void ulite_pm(struct uart_port *port, unsigned int state,
 			dev_err(port->dev, "Failed to enable clocks\n");
 	} else {
 		pm_runtime_mark_last_busy(port->dev);
-		pm_runtime_put_autosuspend(port->dev);
+		__pm_runtime_put_autosuspend(port->dev);
 	}
 }
 
@@ -893,7 +893,7 @@ static int ulite_probe(struct platform_device *pdev)
 	ret = ulite_assign(&pdev->dev, id, res->start, irq, pdata);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return ret;
 }
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 777392914819..a06afaa314d3 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1241,7 +1241,7 @@ static void cdns_uart_pm(struct uart_port *port, unsigned int state,
 	switch (state) {
 	case UART_PM_STATE_OFF:
 		pm_runtime_mark_last_busy(port->dev);
-		pm_runtime_put_autosuspend(port->dev);
+		__pm_runtime_put_autosuspend(port->dev);
 		break;
 	default:
 		pm_runtime_get_sync(port->dev);
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 48/51] ALSA: hda: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (48 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04 10:56   ` Takashi Iwai
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Mark Brown, Cezary Rojewski,
	Rodrigo Vivi, Sakari Ailus, bo liu, Stefan Binding, Gergo Koteles,
	Richard Fitzgerald, Simon Trimmer
  Cc: linux-sound

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 sound/hda/hdac_device.c         | 2 +-
 sound/pci/hda/cs35l41_hda.c     | 8 ++++----
 sound/pci/hda/cs35l56_hda.c     | 2 +-
 sound/pci/hda/hda_intel.c       | 2 +-
 sound/pci/hda/tas2781_hda_i2c.c | 6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index 3fbb9793dcfc..0cac8e008ff9 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -582,7 +582,7 @@ int snd_hdac_power_down(struct hdac_device *codec)
 	struct device *dev = &codec->dev;
 
 	pm_runtime_mark_last_busy(dev);
-	return pm_runtime_put_autosuspend(dev);
+	return __pm_runtime_put_autosuspend(dev);
 }
 EXPORT_SYMBOL_GPL(snd_hdac_power_down);
 
diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index d68bf7591d90..50d5b1e86d8d 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -805,7 +805,7 @@ static void cs35l41_hda_playback_hook(struct device *dev, int action)
 		 * This ensures no amps are playing back when we start putting them to sleep.
 		 */
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		break;
 	default:
 		break;
@@ -1232,7 +1232,7 @@ static void cs35l41_fw_load_work(struct work_struct *work)
 	mutex_unlock(&cs35l41->fw_mutex);
 
 	pm_runtime_mark_last_busy(cs35l41->dev);
-	pm_runtime_put_autosuspend(cs35l41->dev);
+	__pm_runtime_put_autosuspend(cs35l41->dev);
 }
 
 static int cs35l41_fw_load_ctl_put(struct snd_kcontrol *kcontrol,
@@ -1463,7 +1463,7 @@ static int cs35l41_hda_bind(struct device *dev, struct device *master, void *mas
 	unlock_system_sleep(sleep_flags);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	dev_info(cs35l41->dev,
 		 "CS35L41 Bound - SSID: %s, BST: %d, VSPK: %d, CH: %c, FW EN: %d, SPKID: %d\n",
@@ -1992,7 +1992,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
 	if (ret)
 		goto err_pm;
 
-	pm_runtime_put_autosuspend(cs35l41->dev);
+	__pm_runtime_put_autosuspend(cs35l41->dev);
 
 	ret = component_add(cs35l41->dev, &cs35l41_hda_comp_ops);
 	if (ret) {
diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
index e3ac0e23ae32..fe482e4367e0 100644
--- a/sound/pci/hda/cs35l56_hda.c
+++ b/sound/pci/hda/cs35l56_hda.c
@@ -91,7 +91,7 @@ static void cs35l56_hda_pause(struct cs35l56_hda *cs35l56)
 			  BIT(CS35L56_ASP_TX3_EN_SHIFT) | BIT(CS35L56_ASP_TX4_EN_SHIFT));
 
 	pm_runtime_mark_last_busy(cs35l56->base.dev);
-	pm_runtime_put_autosuspend(cs35l56->base.dev);
+	__pm_runtime_put_autosuspend(cs35l56->base.dev);
 }
 
 static void cs35l56_hda_playback_hook(struct device *dev, int action)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index b4540c5cd2a6..a462b0745c16 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2351,7 +2351,7 @@ static int azx_probe_continue(struct azx *chip)
 	if (azx_has_pm_runtime(chip)) {
 		pm_runtime_use_autosuspend(&pci->dev);
 		pm_runtime_allow(&pci->dev);
-		pm_runtime_put_autosuspend(&pci->dev);
+		__pm_runtime_put_autosuspend(&pci->dev);
 	}
 
 out_free:
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 370d847517f9..7e89b27643c7 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -160,7 +160,7 @@ static void tas2781_hda_playback_hook(struct device *dev, int action)
 		mutex_unlock(&tas_hda->priv->codec_lock);
 
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		break;
 	default:
 		break;
@@ -698,7 +698,7 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
 	if (fmw)
 		release_firmware(fmw);
 	pm_runtime_mark_last_busy(tas_hda->dev);
-	pm_runtime_put_autosuspend(tas_hda->dev);
+	__pm_runtime_put_autosuspend(tas_hda->dev);
 }
 
 static int tas2781_hda_bind(struct device *dev, struct device *master,
@@ -741,7 +741,7 @@ static int tas2781_hda_bind(struct device *dev, struct device *master,
 		comp->playback_hook = tas2781_hda_playback_hook;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 49/51] ASoC: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (47 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai; +Cc: linux-sound

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 sound/soc/atmel/mchp-spdifrx.c                 | 12 ++++++------
 sound/soc/codecs/arizona-jack.c                | 12 ++++++------
 sound/soc/codecs/arizona.c                     |  2 +-
 sound/soc/codecs/cs35l41.c                     |  4 ++--
 sound/soc/codecs/cs35l45.c                     |  2 +-
 sound/soc/codecs/cs35l56-sdw.c                 |  4 ++--
 sound/soc/codecs/cs35l56-shared.c              |  2 +-
 sound/soc/codecs/cs35l56.c                     |  2 +-
 sound/soc/codecs/cs42l42-sdw.c                 |  2 +-
 sound/soc/codecs/cs42l42.c                     |  4 ++--
 sound/soc/codecs/cs42l43-jack.c                | 10 +++++-----
 sound/soc/codecs/cs42l43.c                     |  4 ++--
 sound/soc/codecs/hda.c                         |  6 +++---
 sound/soc/codecs/madera.c                      |  6 +++---
 sound/soc/codecs/max98363.c                    |  2 +-
 sound/soc/codecs/max98373-sdw.c                |  2 +-
 sound/soc/codecs/rt1017-sdca-sdw.c             |  2 +-
 sound/soc/codecs/rt1308-sdw.c                  |  2 +-
 sound/soc/codecs/rt1316-sdw.c                  |  2 +-
 sound/soc/codecs/rt1318-sdw.c                  |  2 +-
 sound/soc/codecs/rt1320-sdw.c                  |  2 +-
 sound/soc/codecs/rt5682-sdw.c                  |  2 +-
 sound/soc/codecs/rt700.c                       |  4 ++--
 sound/soc/codecs/rt711-sdca.c                  |  4 ++--
 sound/soc/codecs/rt711.c                       |  4 ++--
 sound/soc/codecs/rt712-sdca-dmic.c             |  2 +-
 sound/soc/codecs/rt712-sdca.c                  |  4 ++--
 sound/soc/codecs/rt715-sdca.c                  |  2 +-
 sound/soc/codecs/rt715.c                       |  2 +-
 sound/soc/codecs/rt722-sdca.c                  |  4 ++--
 sound/soc/codecs/wcd-mbhc-v2.c                 |  4 ++--
 sound/soc/codecs/wsa881x.c                     |  2 +-
 sound/soc/codecs/wsa884x.c                     |  2 +-
 sound/soc/intel/atom/sst/sst_pvt.c             |  2 +-
 sound/soc/intel/avs/core.c                     |  2 +-
 sound/soc/intel/avs/debugfs.c                  |  4 ++--
 sound/soc/intel/avs/pcm.c                      |  2 +-
 sound/soc/intel/catpt/pcm.c                    | 12 ++++++------
 sound/soc/intel/catpt/sysfs.c                  |  2 +-
 sound/soc/soc-component.c                      |  2 +-
 sound/soc/sof/control.c                        |  2 +-
 sound/soc/sof/debug.c                          |  2 +-
 sound/soc/sof/ipc3-dtrace.c                    |  2 +-
 sound/soc/sof/ipc4-loader.c                    |  2 +-
 sound/soc/sof/pcm.c                            |  2 +-
 sound/soc/sof/sof-client-ipc-flood-test.c      |  2 +-
 sound/soc/sof/sof-client-ipc-kernel-injector.c |  2 +-
 sound/soc/sof/sof-client-ipc-msg-injector.c    |  2 +-
 sound/soc/sof/sof-client-probes.c              |  6 +++---
 49 files changed, 85 insertions(+), 85 deletions(-)

diff --git a/sound/soc/atmel/mchp-spdifrx.c b/sound/soc/atmel/mchp-spdifrx.c
index fb820609c043..08577aabd8b8 100644
--- a/sound/soc/atmel/mchp-spdifrx.c
+++ b/sound/soc/atmel/mchp-spdifrx.c
@@ -578,7 +578,7 @@ static int mchp_spdifrx_cs_get(struct mchp_spdifrx_dev *dev,
 
 pm_runtime_put:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 unlock:
 	mutex_unlock(&dev->mlock);
 	return ret;
@@ -661,7 +661,7 @@ static int mchp_spdifrx_subcode_ch_get(struct mchp_spdifrx_dev *dev,
 
 pm_runtime_put:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 unlock:
 	mutex_unlock(&dev->mlock);
 	return ret;
@@ -727,7 +727,7 @@ static int mchp_spdifrx_ulock_get(struct snd_kcontrol *kcontrol,
 	uvalue->value.integer.value[0] = ctrl->ulock;
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 unlock:
 	mutex_unlock(&dev->mlock);
 
@@ -763,7 +763,7 @@ static int mchp_spdifrx_badf_get(struct snd_kcontrol *kcontrol,
 	}
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 unlock:
 	mutex_unlock(&dev->mlock);
 
@@ -812,7 +812,7 @@ static int mchp_spdifrx_signal_get(struct snd_kcontrol *kcontrol,
 	}
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 unlock:
 	mutex_unlock(&dev->mlock);
@@ -876,7 +876,7 @@ static int mchp_spdifrx_rate_get(struct snd_kcontrol *kcontrol,
 
 pm_runtime_put:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 unlock:
 	mutex_unlock(&dev->mlock);
 	return ret;
diff --git a/sound/soc/codecs/arizona-jack.c b/sound/soc/codecs/arizona-jack.c
index 9c15ddba6008..1a454f32d06f 100644
--- a/sound/soc/codecs/arizona-jack.c
+++ b/sound/soc/codecs/arizona-jack.c
@@ -278,7 +278,7 @@ static void arizona_start_mic(struct arizona_priv *info)
 		dev_err(arizona->dev, "Failed to enable micd: %d\n", ret);
 	} else if (!change) {
 		regulator_disable(info->micvdd);
-		pm_runtime_put_autosuspend(arizona->dev);
+		__pm_runtime_put_autosuspend(arizona->dev);
 	}
 }
 
@@ -320,7 +320,7 @@ static void arizona_stop_mic(struct arizona_priv *info)
 	if (change) {
 		regulator_disable(info->micvdd);
 		pm_runtime_mark_last_busy(arizona->dev);
-		pm_runtime_put_autosuspend(arizona->dev);
+		__pm_runtime_put_autosuspend(arizona->dev);
 	}
 }
 
@@ -594,7 +594,7 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data)
 		arizona_start_mic(info);
 
 	if (info->hpdet_active) {
-		pm_runtime_put_autosuspend(arizona->dev);
+		__pm_runtime_put_autosuspend(arizona->dev);
 		info->hpdet_active = false;
 	}
 
@@ -647,7 +647,7 @@ static void arizona_identify_headphone(struct arizona_priv *info)
 
 err:
 	arizona_extcon_hp_clamp(info, false);
-	pm_runtime_put_autosuspend(arizona->dev);
+	__pm_runtime_put_autosuspend(arizona->dev);
 
 	/* Just report headphone */
 	snd_soc_jack_report(info->jack, SND_JACK_HEADPHONE,
@@ -1043,7 +1043,7 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
 	if (ret) {
 		dev_err(arizona->dev, "Failed to read jackdet status: %d\n", ret);
 		mutex_unlock(&info->lock);
-		pm_runtime_put_autosuspend(arizona->dev);
+		__pm_runtime_put_autosuspend(arizona->dev);
 		return IRQ_NONE;
 	}
 
@@ -1128,7 +1128,7 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
 	mutex_unlock(&info->lock);
 
 	pm_runtime_mark_last_busy(arizona->dev);
-	pm_runtime_put_autosuspend(arizona->dev);
+	__pm_runtime_put_autosuspend(arizona->dev);
 
 	return IRQ_HANDLED;
 }
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 402b9a2ff024..b489bad40eda 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -2548,7 +2548,7 @@ static void arizona_disable_fll(struct arizona_fll *fll)
 
 	if (ref_change) {
 		arizona_set_fll_clks(fll, fll->base, false);
-		pm_runtime_put_autosuspend(arizona->dev);
+		__pm_runtime_put_autosuspend(arizona->dev);
 	}
 }
 
diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c
index 07a5cab35fe1..e8149f92708f 100644
--- a/sound/soc/codecs/cs35l41.c
+++ b/sound/soc/codecs/cs35l41.c
@@ -484,7 +484,7 @@ static irqreturn_t cs35l41_irq(int irq, void *data)
 
 done:
 	pm_runtime_mark_last_busy(cs35l41->dev);
-	pm_runtime_put_autosuspend(cs35l41->dev);
+	__pm_runtime_put_autosuspend(cs35l41->dev);
 
 	return ret;
 }
@@ -1325,7 +1325,7 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg *
 		goto err_pm;
 	}
 
-	pm_runtime_put_autosuspend(cs35l41->dev);
+	__pm_runtime_put_autosuspend(cs35l41->dev);
 
 	dev_info(cs35l41->dev, "Cirrus Logic CS35L41 (%x), Revision: %02X\n",
 		 regid, reg_revid);
diff --git a/sound/soc/codecs/cs35l45.c b/sound/soc/codecs/cs35l45.c
index fa1d9d9151f9..fc078971122f 100644
--- a/sound/soc/codecs/cs35l45.c
+++ b/sound/soc/codecs/cs35l45.c
@@ -1469,7 +1469,7 @@ int cs35l45_probe(struct cs35l45_private *cs35l45)
 	if (ret < 0)
 		goto err_dsp;
 
-	pm_runtime_put_autosuspend(cs35l45->dev);
+	__pm_runtime_put_autosuspend(cs35l45->dev);
 
 	return 0;
 
diff --git a/sound/soc/codecs/cs35l56-sdw.c b/sound/soc/codecs/cs35l56-sdw.c
index 7c9a17fe2195..0166aa07e0a7 100644
--- a/sound/soc/codecs/cs35l56-sdw.c
+++ b/sound/soc/codecs/cs35l56-sdw.c
@@ -283,7 +283,7 @@ static void cs35l56_sdw_init(struct sdw_slave *peripheral)
 
 out:
 	pm_runtime_mark_last_busy(cs35l56->base.dev);
-	pm_runtime_put_autosuspend(cs35l56->base.dev);
+	__pm_runtime_put_autosuspend(cs35l56->base.dev);
 }
 
 static int cs35l56_sdw_interrupt(struct sdw_slave *peripheral,
@@ -332,7 +332,7 @@ static void cs35l56_sdw_irq_work(struct work_struct *work)
 		sdw_write_no_pm(cs35l56->sdw_peripheral, CS35L56_SDW_GEN_INT_MASK_1,
 				CS35L56_SDW_INT_MASK_CODEC_IRQ);
 
-	pm_runtime_put_autosuspend(cs35l56->base.dev);
+	__pm_runtime_put_autosuspend(cs35l56->base.dev);
 }
 
 static int cs35l56_sdw_read_prop(struct sdw_slave *peripheral)
diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index e45e9ae01bc6..656502427347 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -440,7 +440,7 @@ int cs35l56_is_fw_reload_needed(struct cs35l56_base *cs35l56_base)
 	else
 		ret = !!(val & CS35L56_FIRMWARE_MISSING);
 
-	pm_runtime_put_autosuspend(cs35l56_base->dev);
+	__pm_runtime_put_autosuspend(cs35l56_base->dev);
 
 	return ret;
 }
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 757ade6373ed..55760ba019f4 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -823,7 +823,7 @@ static void cs35l56_dsp_work(struct work_struct *work)
 
 err:
 	pm_runtime_mark_last_busy(cs35l56->base.dev);
-	pm_runtime_put_autosuspend(cs35l56->base.dev);
+	__pm_runtime_put_autosuspend(cs35l56->base.dev);
 }
 
 static int cs35l56_component_probe(struct snd_soc_component *component)
diff --git a/sound/soc/codecs/cs42l42-sdw.c b/sound/soc/codecs/cs42l42-sdw.c
index 29891c1f6bec..a416ca0af376 100644
--- a/sound/soc/codecs/cs42l42-sdw.c
+++ b/sound/soc/codecs/cs42l42-sdw.c
@@ -304,7 +304,7 @@ static void cs42l42_sdw_init(struct sdw_slave *peripheral)
 
 err:
 	/* This cancels the pm_runtime_get_noresume() call from cs42l42_sdw_probe(). */
-	pm_runtime_put_autosuspend(cs42l42->dev);
+	__pm_runtime_put_autosuspend(cs42l42->dev);
 }
 
 static int cs42l42_sdw_read_prop(struct sdw_slave *peripheral)
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index 6400ac875e6f..3d4b2ef78447 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -1672,7 +1672,7 @@ irqreturn_t cs42l42_irq_thread(int irq, void *data)
 	mutex_lock(&cs42l42->irq_lock);
 	if (cs42l42->suspended || !cs42l42->init_done) {
 		mutex_unlock(&cs42l42->irq_lock);
-		pm_runtime_put_autosuspend(cs42l42->dev);
+		__pm_runtime_put_autosuspend(cs42l42->dev);
 		return IRQ_NONE;
 	}
 
@@ -1776,7 +1776,7 @@ irqreturn_t cs42l42_irq_thread(int irq, void *data)
 
 	mutex_unlock(&cs42l42->irq_lock);
 	pm_runtime_mark_last_busy(cs42l42->dev);
-	pm_runtime_put_autosuspend(cs42l42->dev);
+	__pm_runtime_put_autosuspend(cs42l42->dev);
 
 	return IRQ_HANDLED;
 }
diff --git a/sound/soc/codecs/cs42l43-jack.c b/sound/soc/codecs/cs42l43-jack.c
index d9ab003e166b..be75f6e3467f 100644
--- a/sound/soc/codecs/cs42l43-jack.c
+++ b/sound/soc/codecs/cs42l43-jack.c
@@ -243,7 +243,7 @@ int cs42l43_set_jack(struct snd_soc_component *component,
 	mutex_unlock(&priv->jack_lock);
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return ret;
 }
@@ -424,7 +424,7 @@ void cs42l43_button_press_work(struct work_struct *work)
 	mutex_unlock(&priv->jack_lock);
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 }
 
 irqreturn_t cs42l43_button_press(int irq, void *data)
@@ -463,7 +463,7 @@ void cs42l43_button_release_work(struct work_struct *work)
 	mutex_unlock(&priv->jack_lock);
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 }
 
 irqreturn_t cs42l43_button_release(int irq, void *data)
@@ -505,7 +505,7 @@ void cs42l43_bias_sense_timeout(struct work_struct *work)
 	mutex_unlock(&priv->jack_lock);
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 }
 
 static void cs42l43_start_load_detect(struct cs42l43_codec *priv)
@@ -765,7 +765,7 @@ void cs42l43_tip_sense_work(struct work_struct *work)
 	mutex_unlock(&priv->jack_lock);
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 }
 
 irqreturn_t cs42l43_tip_sense(int irq, void *data)
diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c
index d0098b4558b5..8095b24fdade 100644
--- a/sound/soc/codecs/cs42l43.c
+++ b/sound/soc/codecs/cs42l43.c
@@ -1089,7 +1089,7 @@ static int cs42l43_shutter_get(struct cs42l43_codec *priv, unsigned int shift)
 
 error:
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return ret;
 }
@@ -2371,7 +2371,7 @@ static int cs42l43_codec_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return 0;
 
diff --git a/sound/soc/codecs/hda.c b/sound/soc/codecs/hda.c
index ddc00927313c..af6e89879a5e 100644
--- a/sound/soc/codecs/hda.c
+++ b/sound/soc/codecs/hda.c
@@ -163,7 +163,7 @@ int hda_codec_probe_complete(struct hda_codec *codec)
 out:
 	/* Complement pm_runtime_get_sync(bus) in probe */
 	pm_runtime_mark_last_busy(bus->dev);
-	pm_runtime_put_autosuspend(bus->dev);
+	__pm_runtime_put_autosuspend(bus->dev);
 
 	return ret;
 }
@@ -263,7 +263,7 @@ static int hda_codec_probe(struct snd_soc_component *component)
 	snd_hdac_ext_bus_link_put(bus, hlink);
 
 	pm_runtime_mark_last_busy(bus->dev);
-	pm_runtime_put_autosuspend(bus->dev);
+	__pm_runtime_put_autosuspend(bus->dev);
 	return ret;
 }
 
@@ -301,7 +301,7 @@ static void hda_codec_remove(struct snd_soc_component *component)
 	 */
 	if (!was_registered) {
 		pm_runtime_mark_last_busy(bus->dev);
-		pm_runtime_put_autosuspend(bus->dev);
+		__pm_runtime_put_autosuspend(bus->dev);
 	}
 
 #ifdef CONFIG_PM
diff --git a/sound/soc/codecs/madera.c b/sound/soc/codecs/madera.c
index b24d6472ad5f..b8c3b306f742 100644
--- a/sound/soc/codecs/madera.c
+++ b/sound/soc/codecs/madera.c
@@ -3940,7 +3940,7 @@ static void madera_disable_fll(struct madera_fll *fll)
 
 	if (ref_change) {
 		madera_set_fll_clks(fll, fll->base, false);
-		pm_runtime_put_autosuspend(madera->dev);
+		__pm_runtime_put_autosuspend(madera->dev);
 	}
 }
 
@@ -4322,7 +4322,7 @@ static int madera_disable_fll_ao(struct madera_fll *fll)
 
 	if (change) {
 		madera_set_fllao_clks(fll, fll->base, false);
-		pm_runtime_put_autosuspend(madera->dev);
+		__pm_runtime_put_autosuspend(madera->dev);
 	}
 
 	return 0;
@@ -4411,7 +4411,7 @@ static int madera_fllhj_disable(struct madera_fll *fll)
 
 	if (change) {
 		madera_set_fllhj_clks(fll, fll->base, false);
-		pm_runtime_put_autosuspend(madera->dev);
+		__pm_runtime_put_autosuspend(madera->dev);
 	}
 
 	return 0;
diff --git a/sound/soc/codecs/max98363.c b/sound/soc/codecs/max98363.c
index 950105e5bffd..77ba5c25a759 100644
--- a/sound/soc/codecs/max98363.c
+++ b/sound/soc/codecs/max98363.c
@@ -189,7 +189,7 @@ static int max98363_io_init(struct sdw_slave *slave)
 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c
index 26860882fd91..ff24f0e021e7 100644
--- a/sound/soc/codecs/max98373-sdw.c
+++ b/sound/soc/codecs/max98373-sdw.c
@@ -459,7 +459,7 @@ static int max98373_io_init(struct sdw_slave *slave)
 	max98373->hw_init = true;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
diff --git a/sound/soc/codecs/rt1017-sdca-sdw.c b/sound/soc/codecs/rt1017-sdca-sdw.c
index 7c8103a0d562..c3cfb7b29b68 100644
--- a/sound/soc/codecs/rt1017-sdca-sdw.c
+++ b/sound/soc/codecs/rt1017-sdca-sdw.c
@@ -363,7 +363,7 @@ static int rt1017_sdca_io_init(struct device *dev, struct sdw_slave *slave)
 	rt1017->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "hw_init complete\n");
 	return 0;
diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c
index 563df483a466..5a9d640fb04c 100644
--- a/sound/soc/codecs/rt1308-sdw.c
+++ b/sound/soc/codecs/rt1308-sdw.c
@@ -292,7 +292,7 @@ static int rt1308_io_init(struct device *dev, struct sdw_slave *slave)
 	rt1308->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "%s hw_init complete\n", __func__);
 
diff --git a/sound/soc/codecs/rt1316-sdw.c b/sound/soc/codecs/rt1316-sdw.c
index 22f1ed4e03f1..90af6b232193 100644
--- a/sound/soc/codecs/rt1316-sdw.c
+++ b/sound/soc/codecs/rt1316-sdw.c
@@ -303,7 +303,7 @@ static int rt1316_io_init(struct device *dev, struct sdw_slave *slave)
 	rt1316->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "%s hw_init complete\n", __func__);
 	return 0;
diff --git a/sound/soc/codecs/rt1318-sdw.c b/sound/soc/codecs/rt1318-sdw.c
index 319f71f5e60d..461c971d5a8b 100644
--- a/sound/soc/codecs/rt1318-sdw.c
+++ b/sound/soc/codecs/rt1318-sdw.c
@@ -435,7 +435,7 @@ static int rt1318_io_init(struct device *dev, struct sdw_slave *slave)
 	rt1318->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "%s hw_init complete\n", __func__);
 	return 0;
diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c
index ebd6f09bd990..ae6ab0e05ab4 100644
--- a/sound/soc/codecs/rt1320-sdw.c
+++ b/sound/soc/codecs/rt1320-sdw.c
@@ -708,7 +708,7 @@ static int rt1320_io_init(struct device *dev, struct sdw_slave *slave)
 	rt1320->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "%s hw_init complete\n", __func__);
 	return 0;
diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c
index 5edf11e136b4..84195703b945 100644
--- a/sound/soc/codecs/rt5682-sdw.c
+++ b/sound/soc/codecs/rt5682-sdw.c
@@ -475,7 +475,7 @@ static int rt5682_io_init(struct device *dev, struct sdw_slave *slave)
 
 err_nodev:
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "%s hw_init complete: %d\n", __func__, ret);
 
diff --git a/sound/soc/codecs/rt700.c b/sound/soc/codecs/rt700.c
index 434b926f96c8..cfa8b7bfaad9 100644
--- a/sound/soc/codecs/rt700.c
+++ b/sound/soc/codecs/rt700.c
@@ -339,7 +339,7 @@ static int rt700_set_jack_detect(struct snd_soc_component *component,
 	rt700_jack_init(rt700);
 
 	pm_runtime_mark_last_busy(component->dev);
-	pm_runtime_put_autosuspend(component->dev);
+	__pm_runtime_put_autosuspend(component->dev);
 
 	return 0;
 }
@@ -1231,7 +1231,7 @@ int rt700_io_init(struct device *dev, struct sdw_slave *slave)
 	rt700->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "%s hw_init complete\n", __func__);
 
diff --git a/sound/soc/codecs/rt711-sdca.c b/sound/soc/codecs/rt711-sdca.c
index dd6ccf17afd4..078b1afa06cd 100644
--- a/sound/soc/codecs/rt711-sdca.c
+++ b/sound/soc/codecs/rt711-sdca.c
@@ -546,7 +546,7 @@ static int rt711_sdca_set_jack_detect(struct snd_soc_component *component,
 	rt711_sdca_jack_init(rt711);
 
 	pm_runtime_mark_last_busy(component->dev);
-	pm_runtime_put_autosuspend(component->dev);
+	__pm_runtime_put_autosuspend(component->dev);
 
 	return 0;
 }
@@ -1663,7 +1663,7 @@ int rt711_sdca_io_init(struct device *dev, struct sdw_slave *slave)
 	rt711->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "%s hw_init complete\n", __func__);
 	return 0;
diff --git a/sound/soc/codecs/rt711.c b/sound/soc/codecs/rt711.c
index 5446f9506a16..695ca6a3b2f8 100644
--- a/sound/soc/codecs/rt711.c
+++ b/sound/soc/codecs/rt711.c
@@ -481,7 +481,7 @@ static int rt711_set_jack_detect(struct snd_soc_component *component,
 	rt711_jack_init(rt711);
 
 	pm_runtime_mark_last_busy(component->dev);
-	pm_runtime_put_autosuspend(component->dev);
+	__pm_runtime_put_autosuspend(component->dev);
 
 	return 0;
 }
@@ -1332,7 +1332,7 @@ int rt711_io_init(struct device *dev, struct sdw_slave *slave)
 	rt711->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "%s hw_init complete\n", __func__);
 	return 0;
diff --git a/sound/soc/codecs/rt712-sdca-dmic.c b/sound/soc/codecs/rt712-sdca-dmic.c
index ee5435f3a80a..2b0ce2da6332 100644
--- a/sound/soc/codecs/rt712-sdca-dmic.c
+++ b/sound/soc/codecs/rt712-sdca-dmic.c
@@ -237,7 +237,7 @@ static int rt712_sdca_dmic_io_init(struct device *dev, struct sdw_slave *slave)
 	rt712->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "%s hw_init complete\n", __func__);
 	return 0;
diff --git a/sound/soc/codecs/rt712-sdca.c b/sound/soc/codecs/rt712-sdca.c
index e210c574bb74..d202662c4711 100644
--- a/sound/soc/codecs/rt712-sdca.c
+++ b/sound/soc/codecs/rt712-sdca.c
@@ -479,7 +479,7 @@ static int rt712_sdca_set_jack_detect(struct snd_soc_component *component,
 	rt712_sdca_jack_init(rt712);
 
 	pm_runtime_mark_last_busy(component->dev);
-	pm_runtime_put_autosuspend(component->dev);
+	__pm_runtime_put_autosuspend(component->dev);
 
 	return 0;
 }
@@ -1863,7 +1863,7 @@ int rt712_sdca_io_init(struct device *dev, struct sdw_slave *slave)
 	rt712->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "%s hw_init complete\n", __func__);
 	return 0;
diff --git a/sound/soc/codecs/rt715-sdca.c b/sound/soc/codecs/rt715-sdca.c
index 7e10fd913812..2a2c3f0e4cf9 100644
--- a/sound/soc/codecs/rt715-sdca.c
+++ b/sound/soc/codecs/rt715-sdca.c
@@ -1074,7 +1074,7 @@ int rt715_sdca_io_init(struct device *dev, struct sdw_slave *slave)
 	rt715->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	return 0;
 }
diff --git a/sound/soc/codecs/rt715.c b/sound/soc/codecs/rt715.c
index 299c9b12377c..24d4c0395bfc 100644
--- a/sound/soc/codecs/rt715.c
+++ b/sound/soc/codecs/rt715.c
@@ -1138,7 +1138,7 @@ int rt715_io_init(struct device *dev, struct sdw_slave *slave)
 	rt715->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	return 0;
 }
diff --git a/sound/soc/codecs/rt722-sdca.c b/sound/soc/codecs/rt722-sdca.c
index e5bd9ef812de..2b142e4ef8d0 100644
--- a/sound/soc/codecs/rt722-sdca.c
+++ b/sound/soc/codecs/rt722-sdca.c
@@ -337,7 +337,7 @@ static int rt722_sdca_set_jack_detect(struct snd_soc_component *component,
 	rt722_sdca_jack_init(rt722);
 
 	pm_runtime_mark_last_busy(component->dev);
-	pm_runtime_put_autosuspend(component->dev);
+	__pm_runtime_put_autosuspend(component->dev);
 
 	return 0;
 }
@@ -1557,7 +1557,7 @@ int rt722_sdca_io_init(struct device *dev, struct sdw_slave *slave)
 	rt722->hw_init = true;
 
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	dev_dbg(&slave->dev, "%s hw_init complete\n", __func__);
 	return 0;
diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c
index d589a212b768..2b9f7f9b0165 100644
--- a/sound/soc/codecs/wcd-mbhc-v2.c
+++ b/sound/soc/codecs/wcd-mbhc-v2.c
@@ -826,7 +826,7 @@ static int wcd_mbhc_initialise(struct wcd_mbhc *mbhc)
 	mutex_unlock(&mbhc->lock);
 
 	pm_runtime_mark_last_busy(component->dev);
-	pm_runtime_put_autosuspend(component->dev);
+	__pm_runtime_put_autosuspend(component->dev);
 
 	return 0;
 }
@@ -1320,7 +1320,7 @@ static void wcd_correct_swch_plug(struct work_struct *work)
 		mbhc->mbhc_cb->hph_pull_down_ctrl(component, true);
 
 	pm_runtime_mark_last_busy(component->dev);
-	pm_runtime_put_autosuspend(component->dev);
+	__pm_runtime_put_autosuspend(component->dev);
 }
 
 static irqreturn_t wcd_mbhc_adc_hs_rem_irq(int irq, void *data)
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c
index dd2d6661adc7..b27b31ea2704 100644
--- a/sound/soc/codecs/wsa881x.c
+++ b/sound/soc/codecs/wsa881x.c
@@ -781,7 +781,7 @@ static int wsa881x_put_pa_gain(struct snd_kcontrol *kc,
 	}
 
 	pm_runtime_mark_last_busy(comp->dev);
-	pm_runtime_put_autosuspend(comp->dev);
+	__pm_runtime_put_autosuspend(comp->dev);
 
 	return 1;
 }
diff --git a/sound/soc/codecs/wsa884x.c b/sound/soc/codecs/wsa884x.c
index 86df5152c547..71d9dc0a57ff 100644
--- a/sound/soc/codecs/wsa884x.c
+++ b/sound/soc/codecs/wsa884x.c
@@ -1942,7 +1942,7 @@ static int wsa884x_get_temp(struct wsa884x_priv *wsa884x, long *temp)
 
 out:
 	pm_runtime_mark_last_busy(wsa884x->dev);
-	pm_runtime_put_autosuspend(wsa884x->dev);
+	__pm_runtime_put_autosuspend(wsa884x->dev);
 
 	return ret;
 }
diff --git a/sound/soc/intel/atom/sst/sst_pvt.c b/sound/soc/intel/atom/sst/sst_pvt.c
index e6a5c18a7018..62c5fa294098 100644
--- a/sound/soc/intel/atom/sst/sst_pvt.c
+++ b/sound/soc/intel/atom/sst/sst_pvt.c
@@ -293,7 +293,7 @@ int sst_pm_runtime_put(struct intel_sst_drv *sst_drv)
 	int ret;
 
 	pm_runtime_mark_last_busy(sst_drv->dev);
-	ret = pm_runtime_put_autosuspend(sst_drv->dev);
+	ret = __pm_runtime_put_autosuspend(sst_drv->dev);
 	if (ret < 0)
 		return ret;
 	return 0;
diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c
index da7bac09acb4..194fc3c23210 100644
--- a/sound/soc/intel/avs/core.c
+++ b/sound/soc/intel/avs/core.c
@@ -224,7 +224,7 @@ static void avs_hda_probe_work(struct work_struct *work)
 	pm_runtime_set_autosuspend_delay(bus->dev, 2000);
 	pm_runtime_use_autosuspend(bus->dev);
 	pm_runtime_mark_last_busy(bus->dev);
-	pm_runtime_put_autosuspend(bus->dev);
+	__pm_runtime_put_autosuspend(bus->dev);
 	pm_runtime_allow(bus->dev);
 }
 
diff --git a/sound/soc/intel/avs/debugfs.c b/sound/soc/intel/avs/debugfs.c
index 1767ded4d983..5faa152f3edb 100644
--- a/sound/soc/intel/avs/debugfs.c
+++ b/sound/soc/intel/avs/debugfs.c
@@ -315,7 +315,7 @@ static int enable_logs(struct avs_dev *adev, u32 resource_mask, u32 *priorities)
 		avs_dsp_enable_d0ix(adev);
 err_d0ix:
 		pm_runtime_mark_last_busy(adev->dev);
-		pm_runtime_put_autosuspend(adev->dev);
+		__pm_runtime_put_autosuspend(adev->dev);
 	}
 
 	return ret;
@@ -342,7 +342,7 @@ static int disable_logs(struct avs_dev *adev, u32 resource_mask)
 	if (!adev->logged_resources) {
 		avs_dsp_enable_d0ix(adev);
 		pm_runtime_mark_last_busy(adev->dev);
-		pm_runtime_put_autosuspend(adev->dev);
+		__pm_runtime_put_autosuspend(adev->dev);
 	}
 
 	return ret;
diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c
index afc0fc74cf94..e5f93e353844 100644
--- a/sound/soc/intel/avs/pcm.c
+++ b/sound/soc/intel/avs/pcm.c
@@ -860,7 +860,7 @@ static int avs_component_load_libraries(struct avs_soc_component *acomp)
 		ret = avs_module_info_init(adev, false);
 
 	pm_runtime_mark_last_busy(adev->dev);
-	pm_runtime_put_autosuspend(adev->dev);
+	__pm_runtime_put_autosuspend(adev->dev);
 
 	return ret;
 }
diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c
index 81a2f0339e05..59771c362295 100644
--- a/sound/soc/intel/catpt/pcm.c
+++ b/sound/soc/intel/catpt/pcm.c
@@ -674,7 +674,7 @@ static int catpt_dai_pcm_new(struct snd_soc_pcm_runtime *rtm,
 	ret = catpt_ipc_set_device_format(cdev, &devfmt);
 
 	pm_runtime_mark_last_busy(cdev->dev);
-	pm_runtime_put_autosuspend(cdev->dev);
+	__pm_runtime_put_autosuspend(cdev->dev);
 
 	if (ret)
 		return CATPT_IPC_ERROR(ret);
@@ -872,7 +872,7 @@ static int catpt_mixer_volume_get(struct snd_kcontrol *kcontrol,
 	}
 
 	pm_runtime_mark_last_busy(cdev->dev);
-	pm_runtime_put_autosuspend(cdev->dev);
+	__pm_runtime_put_autosuspend(cdev->dev);
 
 	return 0;
 }
@@ -893,7 +893,7 @@ static int catpt_mixer_volume_put(struct snd_kcontrol *kcontrol,
 			       ucontrol->value.integer.value);
 
 	pm_runtime_mark_last_busy(cdev->dev);
-	pm_runtime_put_autosuspend(cdev->dev);
+	__pm_runtime_put_autosuspend(cdev->dev);
 
 	return ret;
 }
@@ -928,7 +928,7 @@ static int catpt_stream_volume_get(struct snd_kcontrol *kcontrol,
 	}
 
 	pm_runtime_mark_last_busy(cdev->dev);
-	pm_runtime_put_autosuspend(cdev->dev);
+	__pm_runtime_put_autosuspend(cdev->dev);
 
 	return 0;
 }
@@ -959,7 +959,7 @@ static int catpt_stream_volume_put(struct snd_kcontrol *kcontrol,
 			       ucontrol->value.integer.value);
 
 	pm_runtime_mark_last_busy(cdev->dev);
-	pm_runtime_put_autosuspend(cdev->dev);
+	__pm_runtime_put_autosuspend(cdev->dev);
 
 	if (ret)
 		return ret;
@@ -1036,7 +1036,7 @@ static int catpt_loopback_switch_put(struct snd_kcontrol *kcontrol,
 	ret = catpt_ipc_mute_loopback(cdev, stream->info.stream_hw_id, mute);
 
 	pm_runtime_mark_last_busy(cdev->dev);
-	pm_runtime_put_autosuspend(cdev->dev);
+	__pm_runtime_put_autosuspend(cdev->dev);
 
 	if (ret)
 		return CATPT_IPC_ERROR(ret);
diff --git a/sound/soc/intel/catpt/sysfs.c b/sound/soc/intel/catpt/sysfs.c
index 936ac9d503ff..0815aa118bb1 100644
--- a/sound/soc/intel/catpt/sysfs.c
+++ b/sound/soc/intel/catpt/sysfs.c
@@ -22,7 +22,7 @@ static ssize_t fw_version_show(struct device *dev,
 	ret = catpt_ipc_get_fw_version(cdev, &version);
 
 	pm_runtime_mark_last_busy(cdev->dev);
-	pm_runtime_put_autosuspend(cdev->dev);
+	__pm_runtime_put_autosuspend(cdev->dev);
 
 	if (ret)
 		return CATPT_IPC_ERROR(ret);
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index b67ef78f405c..02c960a99754 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -1291,7 +1291,7 @@ void snd_soc_pcm_component_pm_runtime_put(struct snd_soc_pcm_runtime *rtd,
 			continue;
 
 		pm_runtime_mark_last_busy(component->dev);
-		pm_runtime_put_autosuspend(component->dev);
+		__pm_runtime_put_autosuspend(component->dev);
 
 		/* remove marked stream */
 		soc_component_mark_pop(component, pm);
diff --git a/sound/soc/sof/control.c b/sound/soc/sof/control.c
index 463d418e7200..bfda2a679d3b 100644
--- a/sound/soc/sof/control.c
+++ b/sound/soc/sof/control.c
@@ -197,7 +197,7 @@ int snd_sof_bytes_ext_volatile_get(struct snd_kcontrol *kcontrol, unsigned int _
 		ret = tplg_ops->control->bytes_ext_volatile_get(scontrol, binary_data, size);
 
 	pm_runtime_mark_last_busy(scomp->dev);
-	err = pm_runtime_put_autosuspend(scomp->dev);
+	err = __pm_runtime_put_autosuspend(scomp->dev);
 	if (err < 0)
 		dev_err_ratelimited(scomp->dev, "%s: failed to idle %d\n", __func__, err);
 
diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
index d0ffa1d71145..96f1d3fd66a4 100644
--- a/sound/soc/sof/debug.c
+++ b/sound/soc/sof/debug.c
@@ -218,7 +218,7 @@ static int memory_info_update(struct snd_sof_dev *sdev, char *buf, size_t buff_s
 
 	ret = sof_ipc_tx_message(sdev->ipc, &msg, msg.size, reply, SOF_IPC_MSG_MAX_SIZE);
 	pm_runtime_mark_last_busy(sdev->dev);
-	pm_runtime_put_autosuspend(sdev->dev);
+	__pm_runtime_put_autosuspend(sdev->dev);
 	if (ret < 0 || reply->rhdr.error < 0) {
 		ret = min(ret, reply->rhdr.error);
 		dev_err(sdev->dev, "error: reading memory info failed, %d\n", ret);
diff --git a/sound/soc/sof/ipc3-dtrace.c b/sound/soc/sof/ipc3-dtrace.c
index 744a91a150bc..74a1cb7a1797 100644
--- a/sound/soc/sof/ipc3-dtrace.c
+++ b/sound/soc/sof/ipc3-dtrace.c
@@ -173,7 +173,7 @@ static int ipc3_trace_update_filter(struct snd_sof_dev *sdev, int num_elems,
 	}
 	ret = sof_ipc_tx_message_no_reply(sdev->ipc, msg, msg->hdr.size);
 	pm_runtime_mark_last_busy(sdev->dev);
-	pm_runtime_put_autosuspend(sdev->dev);
+	__pm_runtime_put_autosuspend(sdev->dev);
 
 error:
 	kfree(msg);
diff --git a/sound/soc/sof/ipc4-loader.c b/sound/soc/sof/ipc4-loader.c
index bcdb33d03682..0d5dea038cf5 100644
--- a/sound/soc/sof/ipc4-loader.c
+++ b/sound/soc/sof/ipc4-loader.c
@@ -239,7 +239,7 @@ static int sof_ipc4_load_library_by_uuid(struct snd_sof_dev *sdev,
 	ret = ipc4_data->load_library(sdev, fw_lib, false);
 
 	pm_runtime_mark_last_busy(sdev->dev);
-	err = pm_runtime_put_autosuspend(sdev->dev);
+	err = __pm_runtime_put_autosuspend(sdev->dev);
 	if (err < 0)
 		dev_err_ratelimited(sdev->dev, "%s: pm_runtime idle failed: %d\n",
 				    __func__, err);
diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c
index 35a7462d8b69..749e8c342b4b 100644
--- a/sound/soc/sof/pcm.c
+++ b/sound/soc/sof/pcm.c
@@ -658,7 +658,7 @@ static int sof_pcm_probe(struct snd_soc_component *component)
 
 pm_error:
 	pm_runtime_mark_last_busy(component->dev);
-	pm_runtime_put_autosuspend(component->dev);
+	__pm_runtime_put_autosuspend(component->dev);
 
 	return ret;
 }
diff --git a/sound/soc/sof/sof-client-ipc-flood-test.c b/sound/soc/sof/sof-client-ipc-flood-test.c
index e7d2001140e8..713ea95aa4f3 100644
--- a/sound/soc/sof/sof-client-ipc-flood-test.c
+++ b/sound/soc/sof/sof-client-ipc-flood-test.c
@@ -232,7 +232,7 @@ static ssize_t sof_ipc_flood_dfs_write(struct file *file, const char __user *buf
 				       ipc_duration_ms, ipc_count);
 
 	pm_runtime_mark_last_busy(dev);
-	err = pm_runtime_put_autosuspend(dev);
+	err = __pm_runtime_put_autosuspend(dev);
 	if (err < 0)
 		dev_err_ratelimited(dev, "debugfs write failed to idle %d\n", err);
 
diff --git a/sound/soc/sof/sof-client-ipc-kernel-injector.c b/sound/soc/sof/sof-client-ipc-kernel-injector.c
index d3f541069b24..aadf7dd805b1 100644
--- a/sound/soc/sof/sof-client-ipc-kernel-injector.c
+++ b/sound/soc/sof/sof-client-ipc-kernel-injector.c
@@ -66,7 +66,7 @@ static ssize_t sof_kernel_msg_inject_dfs_write(struct file *file, const char __u
 	sof_client_ipc_rx_message(cdev, hdr, priv->kernel_buffer);
 
 	pm_runtime_mark_last_busy(dev);
-	ret = pm_runtime_put_autosuspend(dev);
+	ret = __pm_runtime_put_autosuspend(dev);
 	if (ret < 0)
 		dev_err_ratelimited(dev, "debugfs write failed to idle %d\n", ret);
 
diff --git a/sound/soc/sof/sof-client-ipc-msg-injector.c b/sound/soc/sof/sof-client-ipc-msg-injector.c
index d0f8beb9d000..83f6740af39f 100644
--- a/sound/soc/sof/sof-client-ipc-msg-injector.c
+++ b/sound/soc/sof/sof-client-ipc-msg-injector.c
@@ -138,7 +138,7 @@ static int sof_msg_inject_send_message(struct sof_client_dev *cdev)
 		dev_err(dev, "IPC message send failed: %d\n", ret);
 
 	pm_runtime_mark_last_busy(dev);
-	err = pm_runtime_put_autosuspend(dev);
+	err = __pm_runtime_put_autosuspend(dev);
 	if (err < 0)
 		dev_err_ratelimited(dev, "debugfs write failed to idle %d\n", err);
 
diff --git a/sound/soc/sof/sof-client-probes.c b/sound/soc/sof/sof-client-probes.c
index ccc7d38ddc38..43f0df010469 100644
--- a/sound/soc/sof/sof-client-probes.c
+++ b/sound/soc/sof/sof-client-probes.c
@@ -239,7 +239,7 @@ static ssize_t sof_probes_dfs_points_read(struct file *file, char __user *to,
 
 pm_error:
 	pm_runtime_mark_last_busy(dev);
-	err = pm_runtime_put_autosuspend(dev);
+	err = __pm_runtime_put_autosuspend(dev);
 	if (err < 0)
 		dev_err_ratelimited(dev, "debugfs read failed to idle %d\n", err);
 
@@ -290,7 +290,7 @@ sof_probes_dfs_points_write(struct file *file, const char __user *from,
 		ret = count;
 
 	pm_runtime_mark_last_busy(dev);
-	err = pm_runtime_put_autosuspend(dev);
+	err = __pm_runtime_put_autosuspend(dev);
 	if (err < 0)
 		dev_err_ratelimited(dev, "debugfs write failed to idle %d\n", err);
 exit:
@@ -338,7 +338,7 @@ sof_probes_dfs_points_remove_write(struct file *file, const char __user *from,
 		ret = count;
 
 	pm_runtime_mark_last_busy(dev);
-	err = pm_runtime_put_autosuspend(dev);
+	err = __pm_runtime_put_autosuspend(dev);
 	if (err < 0)
 		dev_err_ratelimited(dev, "debugfs write failed to idle %d\n", err);
 exit:
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 45/51] usb: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (49 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/usb/cdns3/cdns3-gadget.c            |  2 +-
 drivers/usb/cdns3/cdnsp-gadget.c            |  2 +-
 drivers/usb/chipidea/core.c                 |  2 +-
 drivers/usb/chipidea/otg_fsm.c              |  2 +-
 drivers/usb/dwc3/core.c                     |  2 +-
 drivers/usb/dwc3/dwc3-am62.c                |  2 +-
 drivers/usb/dwc3/dwc3-imx8mp.c              |  2 +-
 drivers/usb/gadget/udc/cdns2/cdns2-gadget.c |  2 +-
 drivers/usb/host/xhci-mtk.c                 |  2 +-
 drivers/usb/misc/apple-mfi-fastcharge.c     |  2 +-
 drivers/usb/mtu3/mtu3_plat.c                |  2 +-
 drivers/usb/musb/musb_core.c                | 10 +++++-----
 drivers/usb/musb/musb_debugfs.c             | 10 +++++-----
 drivers/usb/musb/musb_dsps.c                |  2 +-
 drivers/usb/musb/musb_gadget.c              |  8 ++++----
 drivers/usb/musb/omap2430.c                 |  2 +-
 16 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c
index fd1beb10bba7..660bbf6d9f17 100644
--- a/drivers/usb/cdns3/cdns3-gadget.c
+++ b/drivers/usb/cdns3/cdns3-gadget.c
@@ -3250,7 +3250,7 @@ static void cdns3_gadget_exit(struct cdns *cdns)
 
 
 	pm_runtime_mark_last_busy(cdns->dev);
-	pm_runtime_put_autosuspend(cdns->dev);
+	__pm_runtime_put_autosuspend(cdns->dev);
 
 	usb_del_gadget(&priv_dev->gadget);
 	devm_free_irq(cdns->dev, cdns->dev_irq, priv_dev);
diff --git a/drivers/usb/cdns3/cdnsp-gadget.c b/drivers/usb/cdns3/cdnsp-gadget.c
index 4a3f0f958256..47975436eec0 100644
--- a/drivers/usb/cdns3/cdnsp-gadget.c
+++ b/drivers/usb/cdns3/cdnsp-gadget.c
@@ -1948,7 +1948,7 @@ static void cdnsp_gadget_exit(struct cdns *cdns)
 
 	devm_free_irq(pdev->dev, cdns->dev_irq, pdev);
 	pm_runtime_mark_last_busy(cdns->dev);
-	pm_runtime_put_autosuspend(cdns->dev);
+	__pm_runtime_put_autosuspend(cdns->dev);
 	usb_del_gadget_udc(&pdev->gadget);
 	cdnsp_gadget_free_endpoints(pdev);
 	cdnsp_mem_cleanup(pdev);
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 835bf2428dc6..285cbb430e01 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -1371,7 +1371,7 @@ static int ci_controller_resume(struct device *dev)
 	if (ci->wakeup_int) {
 		ci->wakeup_int = false;
 		pm_runtime_mark_last_busy(ci->dev);
-		pm_runtime_put_autosuspend(ci->dev);
+		__pm_runtime_put_autosuspend(ci->dev);
 		enable_irq(ci->irq);
 		if (ci_otg_is_fsm_mode(ci))
 			ci_otg_fsm_wakeup_by_srp(ci);
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index c17516c29b63..21d0eb6eed57 100644
--- a/drivers/usb/chipidea/otg_fsm.c
+++ b/drivers/usb/chipidea/otg_fsm.c
@@ -631,7 +631,7 @@ int ci_otg_fsm_work(struct ci_hdrc *ci)
 			}
 		} else if (ci->fsm.otg->state == OTG_STATE_A_HOST) {
 			pm_runtime_mark_last_busy(ci->dev);
-			pm_runtime_put_autosuspend(ci->dev);
+			__pm_runtime_put_autosuspend(ci->dev);
 			return 0;
 		}
 	}
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 9eb085f359ce..ec460e70082f 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -265,7 +265,7 @@ static void __dwc3_set_mode(struct work_struct *work)
 
 out:
 	pm_runtime_mark_last_busy(dwc->dev);
-	pm_runtime_put_autosuspend(dwc->dev);
+	__pm_runtime_put_autosuspend(dwc->dev);
 	mutex_unlock(&dwc->mutex);
 }
 
diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c
index fad151e78fd6..dcc14c406f7f 100644
--- a/drivers/usb/dwc3/dwc3-am62.c
+++ b/drivers/usb/dwc3/dwc3-am62.c
@@ -282,7 +282,7 @@ static int dwc3_ti_probe(struct platform_device *pdev)
 	pm_runtime_set_autosuspend_delay(dev, DWC3_AM62_AUTOSUSPEND_DELAY);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return 0;
 
 err_pm_disable:
diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
index 64c0cd1995aa..c3b354f074c1 100644
--- a/drivers/usb/dwc3/dwc3-imx8mp.c
+++ b/drivers/usb/dwc3/dwc3-imx8mp.c
@@ -306,7 +306,7 @@ static int dwc3_imx8mp_resume(struct dwc3_imx8mp *dwc3_imx, pm_message_t msg)
 		dwc3_imx->wakeup_pending = false;
 		if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_DEVICE) {
 			pm_runtime_mark_last_busy(dwc->dev);
-			pm_runtime_put_autosuspend(dwc->dev);
+			__pm_runtime_put_autosuspend(dwc->dev);
 		} else {
 			/*
 			 * Add wait for xhci switch from suspend
diff --git a/drivers/usb/gadget/udc/cdns2/cdns2-gadget.c b/drivers/usb/gadget/udc/cdns2/cdns2-gadget.c
index 62fce42ef2da..aabe325069c6 100644
--- a/drivers/usb/gadget/udc/cdns2/cdns2-gadget.c
+++ b/drivers/usb/gadget/udc/cdns2/cdns2-gadget.c
@@ -2415,7 +2415,7 @@ int cdns2_gadget_resume(struct cdns2_device *pdev, bool hibernated)
 void cdns2_gadget_remove(struct cdns2_device *pdev)
 {
 	pm_runtime_mark_last_busy(pdev->dev);
-	pm_runtime_put_autosuspend(pdev->dev);
+	__pm_runtime_put_autosuspend(pdev->dev);
 
 	usb_del_gadget(&pdev->gadget);
 	cdns2_free_all_eps(pdev);
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 3252e3d2d79c..c9d408860fce 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -671,7 +671,7 @@ static int xhci_mtk_probe(struct platform_device *pdev)
 
 	device_enable_async_suspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	pm_runtime_forbid(dev);
 
 	return 0;
diff --git a/drivers/usb/misc/apple-mfi-fastcharge.c b/drivers/usb/misc/apple-mfi-fastcharge.c
index ac8695195c13..37be7548dc75 100644
--- a/drivers/usb/misc/apple-mfi-fastcharge.c
+++ b/drivers/usb/misc/apple-mfi-fastcharge.c
@@ -134,7 +134,7 @@ static int apple_mfi_fc_set_property(struct power_supply *psy,
 	}
 
 	pm_runtime_mark_last_busy(&mfi->udev->dev);
-	pm_runtime_put_autosuspend(&mfi->udev->dev);
+	__pm_runtime_put_autosuspend(&mfi->udev->dev);
 
 	return ret;
 }
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index 6858ed9fc3b2..51ab1d360bf7 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -432,7 +432,7 @@ static int mtu3_probe(struct platform_device *pdev)
 
 	device_enable_async_suspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	pm_runtime_forbid(dev);
 
 	return 0;
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index b24adb5b399f..f92b3a119f75 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2031,7 +2031,7 @@ static void musb_pm_runtime_check_session(struct musb *musb)
 			break;
 		trace_musb_state(musb, devctl, "Allow PM on possible host mode disconnect");
 		pm_runtime_mark_last_busy(musb->controller);
-		pm_runtime_put_autosuspend(musb->controller);
+		__pm_runtime_put_autosuspend(musb->controller);
 		musb->session = false;
 		return;
 	default:
@@ -2063,7 +2063,7 @@ static void musb_pm_runtime_check_session(struct musb *musb)
 	} else {
 		trace_musb_state(musb, devctl, "Allow PM with no session");
 		pm_runtime_mark_last_busy(musb->controller);
-		pm_runtime_put_autosuspend(musb->controller);
+		__pm_runtime_put_autosuspend(musb->controller);
 	}
 
 	musb->session = s;
@@ -2090,7 +2090,7 @@ static void musb_irq_work(struct work_struct *data)
 	}
 
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 }
 
 static void musb_recover_from_babble(struct musb *musb)
@@ -2564,7 +2564,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
 
 	musb->is_initialized = 1;
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 
 	return 0;
 
@@ -2887,7 +2887,7 @@ static int musb_resume(struct device *dev)
 	spin_unlock_irqrestore(&musb->lock, flags);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/usb/musb/musb_debugfs.c
index 2d623284edf6..bdb7a9dbe946 100644
--- a/drivers/usb/musb/musb_debugfs.c
+++ b/drivers/usb/musb/musb_debugfs.c
@@ -107,7 +107,7 @@ static int musb_regdump_show(struct seq_file *s, void *unused)
 	}
 
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 	return 0;
 }
 DEFINE_SHOW_ATTRIBUTE(musb_regdump);
@@ -120,7 +120,7 @@ static int musb_test_mode_show(struct seq_file *s, void *unused)
 	pm_runtime_get_sync(musb->controller);
 	test = musb_readb(musb->mregs, MUSB_TESTMODE);
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 
 	if (test == (MUSB_TEST_FORCE_HOST | MUSB_TEST_FORCE_FS))
 		seq_printf(s, "force host full-speed\n");
@@ -217,7 +217,7 @@ static ssize_t musb_test_mode_write(struct file *file,
 
 ret:
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 	return count;
 }
 
@@ -244,7 +244,7 @@ static int musb_softconnect_show(struct seq_file *s, void *unused)
 		connect = reg & MUSB_DEVCTL_SESSION ? 1 : 0;
 
 		pm_runtime_mark_last_busy(musb->controller);
-		pm_runtime_put_autosuspend(musb->controller);
+		__pm_runtime_put_autosuspend(musb->controller);
 		break;
 	default:
 		connect = -1;
@@ -305,7 +305,7 @@ static ssize_t musb_softconnect_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 	return count;
 }
 
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 9c7a8bbc0542..3d864c316043 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -296,7 +296,7 @@ static void otg_timer(struct timer_list *t)
 		dev_err(dev, "%s resume work: %i\n", __func__, err);
 	spin_unlock_irqrestore(&musb->lock, flags);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static void dsps_musb_clear_ep_rxintr(struct musb *musb, int epnum)
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index bdf13911a1e5..9aa7e7398d32 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1251,7 +1251,7 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req,
 unlock:
 	spin_unlock_irqrestore(&musb->lock, lockflags);
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 
 	return status;
 }
@@ -1635,7 +1635,7 @@ static void musb_gadget_work(struct work_struct *work)
 	musb_pullup(musb, musb->softconnect);
 	spin_unlock_irqrestore(&musb->lock, flags);
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 }
 
 static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
@@ -1855,7 +1855,7 @@ static int musb_gadget_start(struct usb_gadget *g,
 		musb_platform_set_vbus(musb, 1);
 
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 
 	return 0;
 
@@ -1908,7 +1908,7 @@ static int musb_gadget_stop(struct usb_gadget *g)
 
 	/* Force check of devctl register for PM runtime */
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 
 	return 0;
 }
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index b4a4c1df4e0d..25ef19b05af6 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -152,7 +152,7 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
 		dev_dbg(musb->controller, "ID float\n");
 	}
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 	atomic_notifier_call_chain(&musb->xceiv->notifier,
 			musb->xceiv->last_event, NULL);
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 43/51] thunderbolt: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (46 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04 10:07   ` Mika Westerberg
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Andreas Noever, Michael Jamet, Mika Westerberg, Yehezkel Bernat; +Cc: linux-usb

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/thunderbolt/debugfs.c   | 22 +++++++++++-----------
 drivers/thunderbolt/domain.c    |  4 ++--
 drivers/thunderbolt/icm.c       | 14 +++++++-------
 drivers/thunderbolt/nhi.c       |  2 +-
 drivers/thunderbolt/retimer.c   |  4 ++--
 drivers/thunderbolt/switch.c    |  6 +++---
 drivers/thunderbolt/tb.c        | 18 +++++++++---------
 drivers/thunderbolt/usb4_port.c |  4 ++--
 8 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/drivers/thunderbolt/debugfs.c b/drivers/thunderbolt/debugfs.c
index 350310bd0fee..c9dbd7e8c3b6 100644
--- a/drivers/thunderbolt/debugfs.c
+++ b/drivers/thunderbolt/debugfs.c
@@ -209,7 +209,7 @@ static ssize_t regs_write(struct tb_switch *sw, struct tb_port *port,
 
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 	free_page((unsigned long)buf);
 
 	return ret < 0 ? ret : count;
@@ -341,7 +341,7 @@ static ssize_t port_sb_regs_write(struct file *file, const char __user *user_buf
 	mutex_unlock(&tb->lock);
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 	free_page((unsigned long)buf);
 
 	return ret < 0 ? ret : count;
@@ -374,7 +374,7 @@ static ssize_t retimer_sb_regs_write(struct file *file,
 	mutex_unlock(&tb->lock);
 out:
 	pm_runtime_mark_last_busy(&rt->dev);
-	pm_runtime_put_autosuspend(&rt->dev);
+	__pm_runtime_put_autosuspend(&rt->dev);
 	free_page((unsigned long)buf);
 
 	return ret < 0 ? ret : count;
@@ -1113,7 +1113,7 @@ static int margining_run_write(void *data, u64 val)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1647,7 +1647,7 @@ static ssize_t counters_write(struct file *file, const char __user *user_buf,
 
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 	free_page((unsigned long)buf);
 
 	return ret < 0 ? ret : count;
@@ -1842,7 +1842,7 @@ static int port_regs_show(struct seq_file *s, void *not_used)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -1946,7 +1946,7 @@ static int switch_regs_show(struct seq_file *s, void *not_used)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -2007,7 +2007,7 @@ static int path_show(struct seq_file *s, void *not_used)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -2061,7 +2061,7 @@ static int counters_show(struct seq_file *s, void *not_used)
 
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -2115,7 +2115,7 @@ static int port_sb_regs_show(struct seq_file *s, void *not_used)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -2228,7 +2228,7 @@ static int retimer_sb_regs_show(struct seq_file *s, void *not_used)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(&rt->dev);
-	pm_runtime_put_autosuspend(&rt->dev);
+	__pm_runtime_put_autosuspend(&rt->dev);
 
 	return ret;
 }
diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c
index 144d0232a70c..a9106881f822 100644
--- a/drivers/thunderbolt/domain.c
+++ b/drivers/thunderbolt/domain.c
@@ -151,7 +151,7 @@ static ssize_t boot_acl_show(struct device *dev, struct device_attribute *attr,
 
 out:
 	pm_runtime_mark_last_busy(&tb->dev);
-	pm_runtime_put_autosuspend(&tb->dev);
+	__pm_runtime_put_autosuspend(&tb->dev);
 	kfree(uuids);
 
 	return ret;
@@ -223,7 +223,7 @@ static ssize_t boot_acl_store(struct device *dev, struct device_attribute *attr,
 
 err_rpm_put:
 	pm_runtime_mark_last_busy(&tb->dev);
-	pm_runtime_put_autosuspend(&tb->dev);
+	__pm_runtime_put_autosuspend(&tb->dev);
 err_free_acl:
 	kfree(acl);
 err_free_str:
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index 7859bccc592d..3ed8703316ba 100644
--- a/drivers/thunderbolt/icm.c
+++ b/drivers/thunderbolt/icm.c
@@ -367,7 +367,7 @@ static void icm_veto_end(struct tb *tb)
 		icm->veto = false;
 		/* Allow the domain suspend now */
 		pm_runtime_mark_last_busy(&tb->dev);
-		pm_runtime_put_autosuspend(&tb->dev);
+		__pm_runtime_put_autosuspend(&tb->dev);
 	}
 }
 
@@ -697,7 +697,7 @@ static void add_xdomain(struct tb_switch *sw, u64 route,
 
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 }
 
 static void update_xdomain(struct tb_xdomain *xd, u64 route, u8 link)
@@ -859,7 +859,7 @@ icm_fr_device_connected(struct tb *tb, const struct icm_pkg_header *hdr)
 	}
 
 	pm_runtime_mark_last_busy(&parent_sw->dev);
-	pm_runtime_put_autosuspend(&parent_sw->dev);
+	__pm_runtime_put_autosuspend(&parent_sw->dev);
 
 	tb_switch_put(parent_sw);
 }
@@ -893,7 +893,7 @@ icm_fr_device_disconnected(struct tb *tb, const struct icm_pkg_header *hdr)
 	remove_switch(sw);
 
 	pm_runtime_mark_last_busy(sw->dev.parent);
-	pm_runtime_put_autosuspend(sw->dev.parent);
+	__pm_runtime_put_autosuspend(sw->dev.parent);
 
 	tb_switch_put(sw);
 }
@@ -1285,7 +1285,7 @@ __icm_tr_device_connected(struct tb *tb, const struct icm_pkg_header *hdr,
 	}
 
 	pm_runtime_mark_last_busy(&parent_sw->dev);
-	pm_runtime_put_autosuspend(&parent_sw->dev);
+	__pm_runtime_put_autosuspend(&parent_sw->dev);
 
 	tb_switch_put(parent_sw);
 }
@@ -1316,7 +1316,7 @@ icm_tr_device_disconnected(struct tb *tb, const struct icm_pkg_header *hdr)
 	remove_switch(sw);
 
 	pm_runtime_mark_last_busy(sw->dev.parent);
-	pm_runtime_put_autosuspend(sw->dev.parent);
+	__pm_runtime_put_autosuspend(sw->dev.parent);
 
 	tb_switch_put(sw);
 }
@@ -2045,7 +2045,7 @@ static void remove_unplugged_switch(struct tb_switch *sw)
 	tb_switch_remove(sw);
 
 	pm_runtime_mark_last_busy(parent);
-	pm_runtime_put_autosuspend(parent);
+	__pm_runtime_put_autosuspend(parent);
 
 	put_device(parent);
 }
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
index 7af2642b97cb..d46fab8a7a33 100644
--- a/drivers/thunderbolt/nhi.c
+++ b/drivers/thunderbolt/nhi.c
@@ -1408,7 +1408,7 @@ static int nhi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	pm_runtime_allow(&pdev->dev);
 	pm_runtime_set_autosuspend_delay(&pdev->dev, TB_AUTOSUSPEND_DELAY);
 	pm_runtime_use_autosuspend(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 }
diff --git a/drivers/thunderbolt/retimer.c b/drivers/thunderbolt/retimer.c
index 721319329afa..3818f0bb2512 100644
--- a/drivers/thunderbolt/retimer.c
+++ b/drivers/thunderbolt/retimer.c
@@ -54,7 +54,7 @@ static int nvm_read(void *priv, unsigned int offset, void *val, size_t bytes)
 
 out:
 	pm_runtime_mark_last_busy(&rt->dev);
-	pm_runtime_put_autosuspend(&rt->dev);
+	__pm_runtime_put_autosuspend(&rt->dev);
 
 	return ret;
 }
@@ -304,7 +304,7 @@ static ssize_t nvm_authenticate_store(struct device *dev,
 	mutex_unlock(&rt->tb->lock);
 exit_rpm:
 	pm_runtime_mark_last_busy(&rt->dev);
-	pm_runtime_put_autosuspend(&rt->dev);
+	__pm_runtime_put_autosuspend(&rt->dev);
 
 	if (ret)
 		return ret;
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 6a2116cbb06f..126e8ddd26f4 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -319,7 +319,7 @@ static int nvm_read(void *priv, unsigned int offset, void *val, size_t bytes)
 
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -1847,7 +1847,7 @@ static ssize_t authorized_store(struct device *dev,
 	pm_runtime_get_sync(&sw->dev);
 	ret = tb_switch_set_authorized(sw, val);
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret ? ret : count;
 }
@@ -2079,7 +2079,7 @@ static ssize_t nvm_authenticate_sysfs(struct device *dev, const char *buf,
 	mutex_unlock(&sw->tb->lock);
 exit_rpm:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index 10e719dd837c..7a1d80ce3666 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -1217,7 +1217,7 @@ static void tb_scan_switch(struct tb_switch *sw)
 		tb_scan_port(port);
 
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 }
 
 /*
@@ -1349,7 +1349,7 @@ static void tb_scan_port(struct tb_port *port)
 out_rpm_put:
 	if (port->usb4) {
 		pm_runtime_mark_last_busy(&port->usb4->dev);
-		pm_runtime_put_autosuspend(&port->usb4->dev);
+		__pm_runtime_put_autosuspend(&port->usb4->dev);
 	}
 }
 
@@ -1674,9 +1674,9 @@ static void tb_deactivate_and_free_tunnel(struct tb_tunnel *tunnel)
 		tb_configure_sym(tb, src_port, dst_port, true);
 		/* Now we can allow the domain to runtime suspend again */
 		pm_runtime_mark_last_busy(&dst_port->sw->dev);
-		pm_runtime_put_autosuspend(&dst_port->sw->dev);
+		__pm_runtime_put_autosuspend(&dst_port->sw->dev);
 		pm_runtime_mark_last_busy(&src_port->sw->dev);
-		pm_runtime_put_autosuspend(&src_port->sw->dev);
+		__pm_runtime_put_autosuspend(&src_port->sw->dev);
 		fallthrough;
 
 	case TB_TUNNEL_USB3:
@@ -1932,9 +1932,9 @@ static bool tb_tunnel_one_dp(struct tb *tb, struct tb_port *in,
 	tb_switch_dealloc_dp_resource(in->sw, in);
 err_rpm_put:
 	pm_runtime_mark_last_busy(&out->sw->dev);
-	pm_runtime_put_autosuspend(&out->sw->dev);
+	__pm_runtime_put_autosuspend(&out->sw->dev);
 	pm_runtime_mark_last_busy(&in->sw->dev);
-	pm_runtime_put_autosuspend(&in->sw->dev);
+	__pm_runtime_put_autosuspend(&in->sw->dev);
 
 	return false;
 }
@@ -2364,7 +2364,7 @@ static void tb_handle_hotplug(struct work_struct *work)
 	}
 
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 put_sw:
 	tb_switch_put(sw);
@@ -2372,7 +2372,7 @@ static void tb_handle_hotplug(struct work_struct *work)
 	mutex_unlock(&tb->lock);
 
 	pm_runtime_mark_last_busy(&tb->dev);
-	pm_runtime_put_autosuspend(&tb->dev);
+	__pm_runtime_put_autosuspend(&tb->dev);
 
 	kfree(ev);
 }
@@ -2673,7 +2673,7 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
 	mutex_unlock(&tb->lock);
 
 	pm_runtime_mark_last_busy(&tb->dev);
-	pm_runtime_put_autosuspend(&tb->dev);
+	__pm_runtime_put_autosuspend(&tb->dev);
 
 	kfree(ev);
 }
diff --git a/drivers/thunderbolt/usb4_port.c b/drivers/thunderbolt/usb4_port.c
index 5150879888ca..9b71ec355cd5 100644
--- a/drivers/thunderbolt/usb4_port.c
+++ b/drivers/thunderbolt/usb4_port.c
@@ -158,7 +158,7 @@ static ssize_t offline_store(struct device *dev,
 	mutex_unlock(&tb->lock);
 out_rpm:
 	pm_runtime_mark_last_busy(&usb4->dev);
-	pm_runtime_put_autosuspend(&usb4->dev);
+	__pm_runtime_put_autosuspend(&usb4->dev);
 
 	return ret ? ret : count;
 }
@@ -200,7 +200,7 @@ static ssize_t rescan_store(struct device *dev,
 	mutex_unlock(&tb->lock);
 out_rpm:
 	pm_runtime_mark_last_busy(&usb4->dev);
-	pm_runtime_put_autosuspend(&usb4->dev);
+	__pm_runtime_put_autosuspend(&usb4->dev);
 
 	return ret ? ret : count;
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 46/51] w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (44 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04 14:05   ` Krzysztof Kozlowski
  -1 siblings, 1 reply; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Uwe Kleine-König, Sakari Ailus; +Cc: linux-kernel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/w1/masters/omap_hdq.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index d1cb5190445a..b7e87a3ef62d 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -446,7 +446,7 @@ static u8 omap_w1_triplet(void *_hdq, u8 bdir)
 	mutex_unlock(&hdq_data->hdq_mutex);
 rtn:
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 
 	return ret;
 }
@@ -467,7 +467,7 @@ static u8 omap_w1_reset_bus(void *_hdq)
 	omap_hdq_break(hdq_data);
 
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 
 	return 0;
 }
@@ -491,7 +491,7 @@ static u8 omap_w1_read_byte(void *_hdq)
 		val = -1;
 
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 
 	return val;
 }
@@ -526,7 +526,7 @@ static void omap_w1_write_byte(void *_hdq, u8 byte)
 
 out_err:
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 }
 
 static struct w1_bus_master omap_w1_master = {
@@ -626,7 +626,7 @@ static int omap_hdq_probe(struct platform_device *pdev)
 	omap_hdq_break(hdq_data);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	omap_w1_master.data = hdq_data;
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 51/51] soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (51 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Hector Martin, Sven Peter, Alyssa Rosenzweig; +Cc: asahi, linux-arm-kernel

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/soc/apple/mailbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/apple/mailbox.c b/drivers/soc/apple/mailbox.c
index 49a0955e82d6..30fefafa9c59 100644
--- a/drivers/soc/apple/mailbox.c
+++ b/drivers/soc/apple/mailbox.c
@@ -276,7 +276,7 @@ void apple_mbox_stop(struct apple_mbox *mbox)
 	mbox->active = false;
 	disable_irq(mbox->irq_recv_not_empty);
 	pm_runtime_mark_last_busy(mbox->dev);
-	pm_runtime_put_autosuspend(mbox->dev);
+	__pm_runtime_put_autosuspend(mbox->dev);
 }
 EXPORT_SYMBOL(apple_mbox_stop);
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* [PATCH 50/51] ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
                   ` (50 preceding siblings ...)
  (?)
@ 2024-10-04  9:41 ` Sakari Ailus
  -1 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04  9:41 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Jani Nikula, Mitul Golani,
	Rodrigo Vivi, Sakari Ailus, Lucas De Marchi
  Cc: linux-sound

pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 sound/x86/intel_hdmi_audio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index d41ea09ffbe5..1ae2949a0a6e 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -1102,7 +1102,7 @@ static int had_pcm_open(struct snd_pcm_substream *substream)
 	return retval;
  error:
 	pm_runtime_mark_last_busy(intelhaddata->dev);
-	pm_runtime_put_autosuspend(intelhaddata->dev);
+	__pm_runtime_put_autosuspend(intelhaddata->dev);
 	return retval;
 }
 
@@ -1127,7 +1127,7 @@ static int had_pcm_close(struct snd_pcm_substream *substream)
 	spin_unlock_irq(&intelhaddata->had_spinlock);
 
 	pm_runtime_mark_last_busy(intelhaddata->dev);
-	pm_runtime_put_autosuspend(intelhaddata->dev);
+	__pm_runtime_put_autosuspend(intelhaddata->dev);
 	return 0;
 }
 
@@ -1589,7 +1589,7 @@ static void had_audio_wq(struct work_struct *work)
 
 	mutex_unlock(&ctx->mutex);
 	pm_runtime_mark_last_busy(ctx->dev);
-	pm_runtime_put_autosuspend(ctx->dev);
+	__pm_runtime_put_autosuspend(ctx->dev);
 }
 
 /*
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 122+ messages in thread

* Re: [PATCH 32/51] PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 32/51] PCI/portdrv: " Sakari Ailus
@ 2024-10-04  9:45   ` Ilpo Järvinen
  0 siblings, 0 replies; 122+ messages in thread
From: Ilpo Järvinen @ 2024-10-04  9:45 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Bjorn Helgaas, Jonathan Cameron, Masahiro Yamada, Damien Le Moal,
	linux-pci

On Fri, 4 Oct 2024, Sakari Ailus wrote:

> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/pci/pcie/portdrv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c
> index 6af5e0425872..53f48065cc82 100644
> --- a/drivers/pci/pcie/portdrv.c
> +++ b/drivers/pci/pcie/portdrv.c
> @@ -711,7 +711,7 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
>  		pm_runtime_set_autosuspend_delay(&dev->dev, 100);
>  		pm_runtime_use_autosuspend(&dev->dev);
>  		pm_runtime_mark_last_busy(&dev->dev);
> -		pm_runtime_put_autosuspend(&dev->dev);
> +		__pm_runtime_put_autosuspend(&dev->dev);

Eh?

This call is preceeded by pm_runtime_mark_last_busy() so why all the 
extra churn when you really only want to remove that 
pm_runtime_mark_last_busy() call from above when it gets put inside the 
autosuspend call, no? Is extra last busy marking even dangerous so it 
could removed after the API change?

-- 
 i.


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 01/51] accel/ivpu: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 01/51] accel/ivpu: " Sakari Ailus
@ 2024-10-04  9:51   ` Jacek Lawrynowicz
  0 siblings, 0 replies; 122+ messages in thread
From: Jacek Lawrynowicz @ 2024-10-04  9:51 UTC (permalink / raw)
  To: Sakari Ailus, Stanislaw Gruszka, Oded Gabbay; +Cc: dri-devel

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>

On 10/4/2024 11:41 AM, Sakari Ailus wrote:
> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/accel/ivpu/ivpu_drv.c | 2 +-
>  drivers/accel/ivpu/ivpu_pm.c  | 8 ++++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
> index c91400ecf926..4140ff55a4e6 100644
> --- a/drivers/accel/ivpu/ivpu_drv.c
> +++ b/drivers/accel/ivpu/ivpu_drv.c
> @@ -104,7 +104,7 @@ static void file_priv_release(struct kref *ref)
>  	mutex_lock(&vdev->context_list_lock);
>  	file_priv_unbind(vdev, file_priv);
>  	mutex_unlock(&vdev->context_list_lock);
> -	pm_runtime_put_autosuspend(vdev->drm.dev);
> +	__pm_runtime_put_autosuspend(vdev->drm.dev);
>  
>  	mutex_destroy(&file_priv->ms_lock);
>  	mutex_destroy(&file_priv->lock);
> diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c
> index 59d3170f5e35..643854e51fa0 100644
> --- a/drivers/accel/ivpu/ivpu_pm.c
> +++ b/drivers/accel/ivpu/ivpu_pm.c
> @@ -143,7 +143,7 @@ static void ivpu_pm_recovery_work(struct work_struct *work)
>  
>  	kobject_uevent_env(&vdev->drm.dev->kobj, KOBJ_CHANGE, evt);
>  	pm_runtime_mark_last_busy(vdev->drm.dev);
> -	pm_runtime_put_autosuspend(vdev->drm.dev);
> +	__pm_runtime_put_autosuspend(vdev->drm.dev);
>  }
>  
>  void ivpu_pm_trigger_recovery(struct ivpu_device *vdev, const char *reason)
> @@ -303,7 +303,7 @@ int ivpu_rpm_get(struct ivpu_device *vdev)
>  void ivpu_rpm_put(struct ivpu_device *vdev)
>  {
>  	pm_runtime_mark_last_busy(vdev->drm.dev);
> -	pm_runtime_put_autosuspend(vdev->drm.dev);
> +	__pm_runtime_put_autosuspend(vdev->drm.dev);
>  }
>  
>  void ivpu_pm_reset_prepare_cb(struct pci_dev *pdev)
> @@ -339,7 +339,7 @@ void ivpu_pm_reset_done_cb(struct pci_dev *pdev)
>  	ivpu_dbg(vdev, PM, "Post-reset done.\n");
>  
>  	pm_runtime_mark_last_busy(vdev->drm.dev);
> -	pm_runtime_put_autosuspend(vdev->drm.dev);
> +	__pm_runtime_put_autosuspend(vdev->drm.dev);
>  }
>  
>  void ivpu_pm_init(struct ivpu_device *vdev)
> @@ -381,7 +381,7 @@ void ivpu_pm_enable(struct ivpu_device *vdev)
>  	pm_runtime_set_active(dev);
>  	pm_runtime_allow(dev);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  }
>  
>  void ivpu_pm_disable(struct ivpu_device *vdev)


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 08/51] gpio: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 08/51] gpio: " Sakari Ailus
@ 2024-10-04  9:55   ` Bartosz Golaszewski
  2024-10-04 10:08     ` Sakari Ailus
  0 siblings, 1 reply; 122+ messages in thread
From: Bartosz Golaszewski @ 2024-10-04  9:55 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: Linus Walleij, linux-gpio

On Fri, Oct 4, 2024 at 11:41 AM Sakari Ailus
<sakari.ailus@linux.intel.com> wrote:
>
> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---

Sakari,

You didn't Cc me on the cover letter, please do it next time whenever
you post such a big series.

I got the cover letter from lore but it doesn't explain how this will
be merged, are there prerequisites earlier in the series? Or are the
patches independent? If the latter, why not send them separately
targeting individual subsystems?

Bart

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 20/51] Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 20/51] Input: omap4-keypad: " Sakari Ailus
@ 2024-10-04  9:55   ` Andreas Kemnade
  2024-10-04 10:26     ` Sakari Ailus
  0 siblings, 1 reply; 122+ messages in thread
From: Andreas Kemnade @ 2024-10-04  9:55 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: Dmitry Torokhov, Tony Lindgren, linux-input

Am Fri,  4 Oct 2024 12:41:23 +0300
schrieb Sakari Ailus <sakari.ailus@linux.intel.com>:

> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/input/keyboard/omap4-keypad.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/keyboard/omap4-keypad.c
> b/drivers/input/keyboard/omap4-keypad.c index
> 040b340995d8..cc8d77601fc7 100644 ---
> a/drivers/input/keyboard/omap4-keypad.c +++
> b/drivers/input/keyboard/omap4-keypad.c @@ -196,7 +196,7 @@ static
> irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
> kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)); 
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return IRQ_HANDLED;
>  }
> @@ -234,7 +234,7 @@ static int omap4_keypad_open(struct input_dev
> *input) 
>  out:
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
hmm, if pm_runtime_put_autosuspend() will include the call to
pm_runtime_mark_last_busy(), then why is this change needed?
After the change, the mark_last_busy could be removed.

Regards,
Andreas

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 43/51] thunderbolt: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 43/51] thunderbolt: " Sakari Ailus
@ 2024-10-04 10:07   ` Mika Westerberg
  0 siblings, 0 replies; 122+ messages in thread
From: Mika Westerberg @ 2024-10-04 10:07 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: Andreas Noever, Michael Jamet, Yehezkel Bernat, linux-usb

On Fri, Oct 04, 2024 at 12:41:45PM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 08/51] gpio: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:55   ` Bartosz Golaszewski
@ 2024-10-04 10:08     ` Sakari Ailus
  0 siblings, 0 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04 10:08 UTC (permalink / raw)
  To: Bartosz Golaszewski; +Cc: Linus Walleij, linux-gpio

Hi Bart,

On Fri, Oct 04, 2024 at 11:55:01AM +0200, Bartosz Golaszewski wrote:
> On Fri, Oct 4, 2024 at 11:41 AM Sakari Ailus
> <sakari.ailus@linux.intel.com> wrote:
> >
> > pm_runtime_put_autosuspend() will soon be changed to include a call to
> > pm_runtime_mark_last_busy(). This patch switches the current users to
> > __pm_runtime_put_autosuspend() which will continue to have the
> > functionality of old pm_runtime_put_autosuspend().
> >
> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > ---
> 
> Sakari,
> 
> You didn't Cc me on the cover letter, please do it next time whenever
> you post such a big series.

I thought of that but it would have included 120 more recipients. That
wouldn't make it through to most lists.

> 
> I got the cover letter from lore but it doesn't explain how this will
> be merged, are there prerequisites earlier in the series? Or are the
> patches independent? If the latter, why not send them separately
> targeting individual subsystems?

This patch can be merged independently and my intention was the tree
maintainers could pick them.

-- 
Kind regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 20/51] Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:55   ` Andreas Kemnade
@ 2024-10-04 10:26     ` Sakari Ailus
  2024-10-04 10:54       ` Andreas Kemnade
  2024-10-04 11:08       ` Dmitry Torokhov
  0 siblings, 2 replies; 122+ messages in thread
From: Sakari Ailus @ 2024-10-04 10:26 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: Dmitry Torokhov, Tony Lindgren, linux-input, Ilpo Järvinen

Hi Andreas,

On Fri, Oct 04, 2024 at 11:55:11AM +0200, Andreas Kemnade wrote:
> Am Fri,  4 Oct 2024 12:41:23 +0300
> schrieb Sakari Ailus <sakari.ailus@linux.intel.com>:
> 
> > pm_runtime_put_autosuspend() will soon be changed to include a call to
> > pm_runtime_mark_last_busy(). This patch switches the current users to
> > __pm_runtime_put_autosuspend() which will continue to have the
> > functionality of old pm_runtime_put_autosuspend().
> > 
> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > ---
> >  drivers/input/keyboard/omap4-keypad.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/input/keyboard/omap4-keypad.c
> > b/drivers/input/keyboard/omap4-keypad.c index
> > 040b340995d8..cc8d77601fc7 100644 ---
> > a/drivers/input/keyboard/omap4-keypad.c +++
> > b/drivers/input/keyboard/omap4-keypad.c @@ -196,7 +196,7 @@ static
> > irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
> > kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)); 
> >  	pm_runtime_mark_last_busy(dev);
> > -	pm_runtime_put_autosuspend(dev);
> > +	__pm_runtime_put_autosuspend(dev);
> >  
> >  	return IRQ_HANDLED;
> >  }
> > @@ -234,7 +234,7 @@ static int omap4_keypad_open(struct input_dev
> > *input) 
> >  out:
> >  	pm_runtime_mark_last_busy(dev);
> > -	pm_runtime_put_autosuspend(dev);
> > +	__pm_runtime_put_autosuspend(dev);
> >  
> hmm, if pm_runtime_put_autosuspend() will include the call to
> pm_runtime_mark_last_busy(), then why is this change needed?
> After the change, the mark_last_busy could be removed.

It could, in which case we'd be living with pm_runtime_mark_last_busy()
called twice, for some time, and for some code, possibly even in a release
kernel, depending on how well the patches "stick". It likely wouldn't be
harmful. Still, to avoid making functional changes to more than 350 files I
know little about, I've instead posted this set to prepare for
pm_runtime_put_autosuspend() functionality change while keeping the
functionality of the code exactly the same.

Also added Ilpo who had a similar question.

-- 
Kidn regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 20/51] Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
  2024-10-04 10:26     ` Sakari Ailus
@ 2024-10-04 10:54       ` Andreas Kemnade
  2024-10-04 11:08       ` Dmitry Torokhov
  1 sibling, 0 replies; 122+ messages in thread
From: Andreas Kemnade @ 2024-10-04 10:54 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Dmitry Torokhov, Tony Lindgren, linux-input, Ilpo Järvinen

Am Fri, 4 Oct 2024 10:26:42 +0000
schrieb Sakari Ailus <sakari.ailus@linux.intel.com>:

> Hi Andreas,
> 
> On Fri, Oct 04, 2024 at 11:55:11AM +0200, Andreas Kemnade wrote:
> > Am Fri,  4 Oct 2024 12:41:23 +0300
> > schrieb Sakari Ailus <sakari.ailus@linux.intel.com>:
> >   
> > > pm_runtime_put_autosuspend() will soon be changed to include a
> > > call to pm_runtime_mark_last_busy(). This patch switches the
> > > current users to __pm_runtime_put_autosuspend() which will
> > > continue to have the functionality of old
> > > pm_runtime_put_autosuspend().
> > > 
> > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > > ---
> > >  drivers/input/keyboard/omap4-keypad.c | 8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/input/keyboard/omap4-keypad.c
> > > b/drivers/input/keyboard/omap4-keypad.c index
> > > 040b340995d8..cc8d77601fc7 100644 ---
> > > a/drivers/input/keyboard/omap4-keypad.c +++
> > > b/drivers/input/keyboard/omap4-keypad.c @@ -196,7 +196,7 @@ static
> > > irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
> > > kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)); 
> > >  	pm_runtime_mark_last_busy(dev);
> > > -	pm_runtime_put_autosuspend(dev);
> > > +	__pm_runtime_put_autosuspend(dev);
> > >  
> > >  	return IRQ_HANDLED;
> > >  }
> > > @@ -234,7 +234,7 @@ static int omap4_keypad_open(struct input_dev
> > > *input) 
> > >  out:
> > >  	pm_runtime_mark_last_busy(dev);
> > > -	pm_runtime_put_autosuspend(dev);
> > > +	__pm_runtime_put_autosuspend(dev);
> > >    
> > hmm, if pm_runtime_put_autosuspend() will include the call to
> > pm_runtime_mark_last_busy(), then why is this change needed?
> > After the change, the mark_last_busy could be removed.  
> 
> It could, in which case we'd be living with
> pm_runtime_mark_last_busy() called twice, for some time, and for some
> code, possibly even in a release kernel, depending on how well the
> patches "stick". It likely wouldn't be harmful. Still, to avoid
> making functional changes to more than 350 files I know little about,
> I've instead posted this set to prepare for
> pm_runtime_put_autosuspend() functionality change while keeping the
> functionality of the code exactly the same.
> 
> Also added Ilpo who had a similar question.
> 
Ah, ok, I did not get the cover letter.

> Once this conversion is done and pm_runtime_put_autosuspend()
> re-purposed, I'll post another set to merge the calls to
> __pm_runtime_put_autosuspend() and pm_runtime_mark_last_busy()

with that all this makes sense to me. So:

Reviewed-by: Andreas Kemnade <andreas@kemnade.info>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 48/51] ALSA: hda: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 48/51] ALSA: hda: " Sakari Ailus
@ 2024-10-04 10:56   ` Takashi Iwai
  2024-10-04 23:57     ` Mark Brown
  0 siblings, 1 reply; 122+ messages in thread
From: Takashi Iwai @ 2024-10-04 10:56 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Jaroslav Kysela, Takashi Iwai, Mark Brown, Cezary Rojewski,
	Rodrigo Vivi, bo liu, Stefan Binding, Gergo Koteles,
	Richard Fitzgerald, Simon Trimmer, linux-sound

On Fri, 04 Oct 2024 11:41:45 +0200,
Sakari Ailus wrote:
> 
> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().

Many of those calls are with pm_runtime_mark_last_busy().
(Actually the only one without it can be an oversight, it's better to
be with *_mark_last_busy(), too).

Wouldn't it be better to keep without converting and rather drop the
superfluous *_mark_last_busy()?


thanks,

Takashi

> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  sound/hda/hdac_device.c         | 2 +-
>  sound/pci/hda/cs35l41_hda.c     | 8 ++++----
>  sound/pci/hda/cs35l56_hda.c     | 2 +-
>  sound/pci/hda/hda_intel.c       | 2 +-
>  sound/pci/hda/tas2781_hda_i2c.c | 6 +++---
>  5 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
> index 3fbb9793dcfc..0cac8e008ff9 100644
> --- a/sound/hda/hdac_device.c
> +++ b/sound/hda/hdac_device.c
> @@ -582,7 +582,7 @@ int snd_hdac_power_down(struct hdac_device *codec)
>  	struct device *dev = &codec->dev;
>  
>  	pm_runtime_mark_last_busy(dev);
> -	return pm_runtime_put_autosuspend(dev);
> +	return __pm_runtime_put_autosuspend(dev);
>  }
>  EXPORT_SYMBOL_GPL(snd_hdac_power_down);
>  
> diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
> index d68bf7591d90..50d5b1e86d8d 100644
> --- a/sound/pci/hda/cs35l41_hda.c
> +++ b/sound/pci/hda/cs35l41_hda.c
> @@ -805,7 +805,7 @@ static void cs35l41_hda_playback_hook(struct device *dev, int action)
>  		 * This ensures no amps are playing back when we start putting them to sleep.
>  		 */
>  		pm_runtime_mark_last_busy(dev);
> -		pm_runtime_put_autosuspend(dev);
> +		__pm_runtime_put_autosuspend(dev);
>  		break;
>  	default:
>  		break;
> @@ -1232,7 +1232,7 @@ static void cs35l41_fw_load_work(struct work_struct *work)
>  	mutex_unlock(&cs35l41->fw_mutex);
>  
>  	pm_runtime_mark_last_busy(cs35l41->dev);
> -	pm_runtime_put_autosuspend(cs35l41->dev);
> +	__pm_runtime_put_autosuspend(cs35l41->dev);
>  }
>  
>  static int cs35l41_fw_load_ctl_put(struct snd_kcontrol *kcontrol,
> @@ -1463,7 +1463,7 @@ static int cs35l41_hda_bind(struct device *dev, struct device *master, void *mas
>  	unlock_system_sleep(sleep_flags);
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	dev_info(cs35l41->dev,
>  		 "CS35L41 Bound - SSID: %s, BST: %d, VSPK: %d, CH: %c, FW EN: %d, SPKID: %d\n",
> @@ -1992,7 +1992,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
>  	if (ret)
>  		goto err_pm;
>  
> -	pm_runtime_put_autosuspend(cs35l41->dev);
> +	__pm_runtime_put_autosuspend(cs35l41->dev);
>  
>  	ret = component_add(cs35l41->dev, &cs35l41_hda_comp_ops);
>  	if (ret) {
> diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
> index e3ac0e23ae32..fe482e4367e0 100644
> --- a/sound/pci/hda/cs35l56_hda.c
> +++ b/sound/pci/hda/cs35l56_hda.c
> @@ -91,7 +91,7 @@ static void cs35l56_hda_pause(struct cs35l56_hda *cs35l56)
>  			  BIT(CS35L56_ASP_TX3_EN_SHIFT) | BIT(CS35L56_ASP_TX4_EN_SHIFT));
>  
>  	pm_runtime_mark_last_busy(cs35l56->base.dev);
> -	pm_runtime_put_autosuspend(cs35l56->base.dev);
> +	__pm_runtime_put_autosuspend(cs35l56->base.dev);
>  }
>  
>  static void cs35l56_hda_playback_hook(struct device *dev, int action)
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index b4540c5cd2a6..a462b0745c16 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -2351,7 +2351,7 @@ static int azx_probe_continue(struct azx *chip)
>  	if (azx_has_pm_runtime(chip)) {
>  		pm_runtime_use_autosuspend(&pci->dev);
>  		pm_runtime_allow(&pci->dev);
> -		pm_runtime_put_autosuspend(&pci->dev);
> +		__pm_runtime_put_autosuspend(&pci->dev);
>  	}
>  
>  out_free:
> diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
> index 370d847517f9..7e89b27643c7 100644
> --- a/sound/pci/hda/tas2781_hda_i2c.c
> +++ b/sound/pci/hda/tas2781_hda_i2c.c
> @@ -160,7 +160,7 @@ static void tas2781_hda_playback_hook(struct device *dev, int action)
>  		mutex_unlock(&tas_hda->priv->codec_lock);
>  
>  		pm_runtime_mark_last_busy(dev);
> -		pm_runtime_put_autosuspend(dev);
> +		__pm_runtime_put_autosuspend(dev);
>  		break;
>  	default:
>  		break;
> @@ -698,7 +698,7 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
>  	if (fmw)
>  		release_firmware(fmw);
>  	pm_runtime_mark_last_busy(tas_hda->dev);
> -	pm_runtime_put_autosuspend(tas_hda->dev);
> +	__pm_runtime_put_autosuspend(tas_hda->dev);
>  }
>  
>  static int tas2781_hda_bind(struct device *dev, struct device *master,
> @@ -741,7 +741,7 @@ static int tas2781_hda_bind(struct device *dev, struct device *master,
>  		comp->playback_hook = tas2781_hda_playback_hook;
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> -- 
> 2.39.5
> 

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 20/51] Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
  2024-10-04 10:26     ` Sakari Ailus
  2024-10-04 10:54       ` Andreas Kemnade
@ 2024-10-04 11:08       ` Dmitry Torokhov
  1 sibling, 0 replies; 122+ messages in thread
From: Dmitry Torokhov @ 2024-10-04 11:08 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Andreas Kemnade, Tony Lindgren, linux-input, Ilpo Järvinen

Hi Sakari,

On Fri, Oct 04, 2024 at 10:26:42AM +0000, Sakari Ailus wrote:
> Hi Andreas,
> 
> On Fri, Oct 04, 2024 at 11:55:11AM +0200, Andreas Kemnade wrote:
> > Am Fri,  4 Oct 2024 12:41:23 +0300
> > schrieb Sakari Ailus <sakari.ailus@linux.intel.com>:
> > 
> > > pm_runtime_put_autosuspend() will soon be changed to include a call to
> > > pm_runtime_mark_last_busy(). This patch switches the current users to
> > > __pm_runtime_put_autosuspend() which will continue to have the
> > > functionality of old pm_runtime_put_autosuspend().
> > > 
> > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > > ---
> > >  drivers/input/keyboard/omap4-keypad.c | 8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/input/keyboard/omap4-keypad.c
> > > b/drivers/input/keyboard/omap4-keypad.c index
> > > 040b340995d8..cc8d77601fc7 100644 ---
> > > a/drivers/input/keyboard/omap4-keypad.c +++
> > > b/drivers/input/keyboard/omap4-keypad.c @@ -196,7 +196,7 @@ static
> > > irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
> > > kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)); 
> > >  	pm_runtime_mark_last_busy(dev);
> > > -	pm_runtime_put_autosuspend(dev);
> > > +	__pm_runtime_put_autosuspend(dev);
> > >  
> > >  	return IRQ_HANDLED;
> > >  }
> > > @@ -234,7 +234,7 @@ static int omap4_keypad_open(struct input_dev
> > > *input) 
> > >  out:
> > >  	pm_runtime_mark_last_busy(dev);
> > > -	pm_runtime_put_autosuspend(dev);
> > > +	__pm_runtime_put_autosuspend(dev);
> > >  
> > hmm, if pm_runtime_put_autosuspend() will include the call to
> > pm_runtime_mark_last_busy(), then why is this change needed?
> > After the change, the mark_last_busy could be removed.
> 
> It could, in which case we'd be living with pm_runtime_mark_last_busy()
> called twice, for some time, and for some code, possibly even in a release
> kernel, depending on how well the patches "stick". It likely wouldn't be
> harmful. Still, to avoid making functional changes to more than 350 files I
> know little about, I've instead posted this set to prepare for
> pm_runtime_put_autosuspend() functionality change while keeping the
> functionality of the code exactly the same.

pm_runtime_mark_last_busy() is pretty cheap (it fetches current time and
stores it in the device power-related structure), so doing it twice
back-to-back should not be a problem.

I would prefer what Andreas suggested in the first place: remove call to
pm_runtime_mark_last_busy() once pm_runtime_put_autosuspend() does it
for us. I'd be OK with such change being merged through the same tree
that changes to pm_runtime_put_autosuspend() will be merged through.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 21/51] Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 21/51] Input: cs40l50: " Sakari Ailus
@ 2024-10-04 11:09   ` Dmitry Torokhov
  0 siblings, 0 replies; 122+ messages in thread
From: Dmitry Torokhov @ 2024-10-04 11:09 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: James Ogletree, Fred Treven, Ben Bright, patches, linux-input

On Fri, Oct 04, 2024 at 12:41:23PM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/input/misc/cs40l50-vibra.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/misc/cs40l50-vibra.c b/drivers/input/misc/cs40l50-vibra.c
> index 03bdb7c26ec0..8555f0d93d3f 100644
> --- a/drivers/input/misc/cs40l50-vibra.c
> +++ b/drivers/input/misc/cs40l50-vibra.c
> @@ -307,7 +307,7 @@ static void cs40l50_add_worker(struct work_struct *work)
>  	}
>  err_pm:
>  	pm_runtime_mark_last_busy(vib->dev);
> -	pm_runtime_put_autosuspend(vib->dev);
> +	__pm_runtime_put_autosuspend(vib->dev);

Same comment as with omap4 keypad: prefer to simply remove
pm_runtime_mark_last_busy() once pm_runtime_put_autosuspend() does this
for us.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 29/51] mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 29/51] mtd: rawnand: gpmi: " Sakari Ailus
@ 2024-10-04 11:12   ` Miquel Raynal
  0 siblings, 0 replies; 122+ messages in thread
From: Miquel Raynal @ 2024-10-04 11:12 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: Han Xu, Richard Weinberger, Vignesh Raghavendra, linux-mtd

Hi Sakari,

sakari.ailus@linux.intel.com wrote on Fri,  4 Oct 2024 12:41:33 +0300:

> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Are you sure using a callback prefixed with '__' is relevant in normal
drivers? I'd expect something cleaner from a naming point of view.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 37/51] regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 37/51] regulator: stm32-vrefbuf: " Sakari Ailus
@ 2024-10-04 11:34   ` Mark Brown
  0 siblings, 0 replies; 122+ messages in thread
From: Mark Brown @ 2024-10-04 11:34 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Liam Girdwood, Maxime Coquelin, Alexandre Torgue, linux-stm32,
	linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

On Fri, Oct 04, 2024 at 12:41:34PM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().

You've not copied me on the rest of the series so I don't know what's
going on with dependencies.  When sending a patch series it is important
to ensure that all the various maintainers understand what the
relationship between the patches as the expecation is that there will be
interdependencies.  Either copy everyone on the whole series or at least
copy them on the cover letter and explain what's going on.  If there are
no strong interdependencies then it's generally simplest to just send
the patches separately to avoid any possible confusion.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 36/51] pwm: img: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 36/51] pwm: img: " Sakari Ailus
@ 2024-10-04 12:38   ` Uwe Kleine-König
  0 siblings, 0 replies; 122+ messages in thread
From: Uwe Kleine-König @ 2024-10-04 12:38 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-pwm, Rafael J. Wysocki, linux-pm

[-- Attachment #1: Type: text/plain, Size: 2332 bytes --]

Hello,

[Cc += Rafeel + linux-pm]

On Fri, Oct 04, 2024 at 12:41:34PM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/pwm/pwm-img.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-img.c b/drivers/pwm/pwm-img.c
> index 71542956feca..9bd177ebad0d 100644
> --- a/drivers/pwm/pwm-img.c
> +++ b/drivers/pwm/pwm-img.c
> @@ -140,7 +140,7 @@ static int img_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
>  	img_pwm_writel(imgchip, PWM_CH_CFG(pwm->hwpwm), val);
>  
>  	pm_runtime_mark_last_busy(pwmchip_parent(chip));
> -	pm_runtime_put_autosuspend(pwmchip_parent(chip));
> +	__pm_runtime_put_autosuspend(pwmchip_parent(chip));
>  
>  	return 0;
>  }
> @@ -176,7 +176,7 @@ static void img_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
>  	img_pwm_writel(imgchip, PWM_CTRL_CFG, val);
>  
>  	pm_runtime_mark_last_busy(pwmchip_parent(chip));
> -	pm_runtime_put_autosuspend(pwmchip_parent(chip));
> +	__pm_runtime_put_autosuspend(pwmchip_parent(chip));
>  }
>  
>  static int img_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,

OK, there will soon be a function that does

	pm_runtime_mark_last_busy(dev);
	pm_runtime_put_autosuspend(dev);

(in today's semantic). Your plan is to call that new function
pm_runtime_put_autosuspend().

I think the conversion would be simpler and maybe also semantically
clearer if you call the new function e.g.

	pm_runtime_mark_last_busy_put_autosuspend(...)

(ok, something shorter would be nice, too). Then you could add the
function already today and don't have to go through each driver twice
for the API change.

Alternatively only convert pm_runtime_put_autosuspend() calls that are
not immediately preceeded by pm_runtime_mark_last_busy() and drop the
mark bit after pm_runtime_put_autosuspend() was changed.
(Assuming that calling pm_runtime_mark_last_busy() twice while the API
conversion is ongoing doesn't hurt.)

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 19/51] iio: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 19/51] iio: " Sakari Ailus
@ 2024-10-04 13:45   ` Jonathan Cameron
  0 siblings, 0 replies; 122+ messages in thread
From: Jonathan Cameron @ 2024-10-04 13:45 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: Jonathan Cameron, Lars-Peter Clausen, linux-iio

On Fri,  4 Oct 2024 12:41:23 +0300
Sakari Ailus <sakari.ailus@linux.intel.com> wrote:

> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().

Similar to some of the other feedback you've had, there is no
obvious point in this churn.  Given mark_last_busy()
should be non destructive, just call it twice, then remove
the unnecessary calls after you have added on in autosuspend.

Jonathan

> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/iio/accel/bmc150-accel-core.c         |  2 +-
>  drivers/iio/accel/bmi088-accel-core.c         |  6 +++---
>  drivers/iio/accel/fxls8962af-core.c           |  2 +-
>  drivers/iio/accel/kxcjk-1013.c                |  2 +-
>  drivers/iio/accel/kxsd9.c                     |  6 +++---
>  drivers/iio/accel/mma8452.c                   |  2 +-
>  drivers/iio/accel/mma9551_core.c              |  2 +-
>  drivers/iio/accel/msa311.c                    | 12 +++++------
>  drivers/iio/adc/ab8500-gpadc.c                |  2 +-
>  drivers/iio/adc/at91-sama5d2_adc.c            | 20 +++++++++----------
>  drivers/iio/adc/rcar-gyroadc.c                |  2 +-
>  drivers/iio/adc/stm32-adc-core.c              |  2 +-
>  drivers/iio/adc/stm32-adc.c                   | 12 +++++------
>  drivers/iio/adc/sun4i-gpadc-iio.c             |  4 ++--
>  drivers/iio/adc/ti-ads1015.c                  |  2 +-
>  drivers/iio/adc/ti-ads1100.c                  |  2 +-
>  drivers/iio/adc/ti-ads1119.c                  |  4 ++--
>  drivers/iio/chemical/atlas-sensor.c           |  4 ++--
>  .../common/hid-sensors/hid-sensor-trigger.c   |  2 +-
>  drivers/iio/dac/stm32-dac.c                   |  6 +++---
>  drivers/iio/gyro/bmg160_core.c                |  2 +-
>  drivers/iio/gyro/fxas21002c_core.c            |  2 +-
>  drivers/iio/gyro/mpu3050-core.c               |  6 +++---
>  drivers/iio/gyro/mpu3050-i2c.c                |  2 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_accel.c | 10 +++++-----
>  .../imu/inv_icm42600/inv_icm42600_buffer.c    |  2 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  | 10 +++++-----
>  .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |  2 +-
>  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    | 14 ++++++-------
>  drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |  4 ++--
>  drivers/iio/imu/kmx61.c                       |  2 +-
>  drivers/iio/light/apds9306.c                  |  6 +++---
>  drivers/iio/light/apds9960.c                  |  4 ++--
>  drivers/iio/light/bh1780.c                    |  2 +-
>  drivers/iio/light/gp2ap002.c                  |  4 ++--
>  drivers/iio/light/isl29028.c                  |  2 +-
>  drivers/iio/light/ltrf216a.c                  |  2 +-
>  drivers/iio/light/pa12203001.c                |  2 +-
>  drivers/iio/light/rpr0521.c                   |  2 +-
>  drivers/iio/light/tsl2583.c                   |  2 +-
>  drivers/iio/light/tsl2591.c                   |  4 ++--
>  drivers/iio/light/us5182d.c                   |  2 +-
>  drivers/iio/light/vcnl4000.c                  |  2 +-
>  drivers/iio/light/vcnl4035.c                  |  2 +-
>  drivers/iio/magnetometer/af8133j.c            |  4 ++--
>  drivers/iio/magnetometer/ak8974.c             |  4 ++--
>  drivers/iio/magnetometer/ak8975.c             |  2 +-
>  drivers/iio/magnetometer/bmc150_magn.c        |  2 +-
>  drivers/iio/magnetometer/tmag5273.c           |  4 ++--
>  drivers/iio/magnetometer/yamaha-yas530.c      |  4 ++--
>  drivers/iio/pressure/bmp280-core.c            | 10 +++++-----
>  drivers/iio/pressure/icp10100.c               |  2 +-
>  drivers/iio/pressure/mpl115.c                 |  4 ++--
>  drivers/iio/pressure/zpa2326.c                |  4 ++--
>  .../iio/proximity/pulsedlight-lidar-lite-v2.c |  2 +-
>  drivers/iio/proximity/srf04.c                 |  2 +-
>  drivers/iio/temperature/mlx90614.c            |  4 ++--
>  drivers/iio/temperature/mlx90632.c            |  4 ++--
>  drivers/iio/temperature/mlx90635.c            |  4 ++--
>  59 files changed, 122 insertions(+), 122 deletions(-)
> 
> diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
> index 0f32c1e92b4d..da02727c8626 100644
> --- a/drivers/iio/accel/bmc150-accel-core.c
> +++ b/drivers/iio/accel/bmc150-accel-core.c
> @@ -339,7 +339,7 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
>  		ret = pm_runtime_resume_and_get(dev);
>  	} else {
>  		pm_runtime_mark_last_busy(dev);
> -		ret = pm_runtime_put_autosuspend(dev);
> +		ret = __pm_runtime_put_autosuspend(dev);
>  	}
>  
>  	if (ret < 0) {
> diff --git a/drivers/iio/accel/bmi088-accel-core.c b/drivers/iio/accel/bmi088-accel-core.c
> index fc1c1613d673..f57960509c7f 100644
> --- a/drivers/iio/accel/bmi088-accel-core.c
> +++ b/drivers/iio/accel/bmi088-accel-core.c
> @@ -375,7 +375,7 @@ static int bmi088_accel_read_raw(struct iio_dev *indio_dev,
>  
>  out_read_raw_pm_put:
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> @@ -419,7 +419,7 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
>  
>  		ret = bmi088_accel_set_scale(data, val, val2);
>  		pm_runtime_mark_last_busy(dev);
> -		pm_runtime_put_autosuspend(dev);
> +		__pm_runtime_put_autosuspend(dev);
>  		return ret;
>  	case IIO_CHAN_INFO_SAMP_FREQ:
>  		ret = pm_runtime_resume_and_get(dev);
> @@ -428,7 +428,7 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
>  
>  		ret = bmi088_accel_set_sample_freq(data, val);
>  		pm_runtime_mark_last_busy(dev);
> -		pm_runtime_put_autosuspend(dev);
> +		__pm_runtime_put_autosuspend(dev);
>  		return ret;
>  	default:
>  		return -EINVAL;
> diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c
> index 37f33c29fb4b..50e1b2575af0 100644
> --- a/drivers/iio/accel/fxls8962af-core.c
> +++ b/drivers/iio/accel/fxls8962af-core.c
> @@ -219,7 +219,7 @@ static int fxls8962af_power_off(struct fxls8962af_data *data)
>  	int ret;
>  
>  	pm_runtime_mark_last_busy(dev);
> -	ret = pm_runtime_put_autosuspend(dev);
> +	ret = __pm_runtime_put_autosuspend(dev);
>  	if (ret)
>  		dev_err(dev, "failed to power off\n");
>  
> diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
> index b76df8816323..01c6bc9b0f99 100644
> --- a/drivers/iio/accel/kxcjk-1013.c
> +++ b/drivers/iio/accel/kxcjk-1013.c
> @@ -625,7 +625,7 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
>  		ret = pm_runtime_resume_and_get(&data->client->dev);
>  	else {
>  		pm_runtime_mark_last_busy(&data->client->dev);
> -		ret = pm_runtime_put_autosuspend(&data->client->dev);
> +		ret = __pm_runtime_put_autosuspend(&data->client->dev);
>  	}
>  	if (ret < 0) {
>  		dev_err(&data->client->dev,
> diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c
> index 70dfd6e354db..41dcf80784f1 100644
> --- a/drivers/iio/accel/kxsd9.c
> +++ b/drivers/iio/accel/kxsd9.c
> @@ -151,7 +151,7 @@ static int kxsd9_write_raw(struct iio_dev *indio_dev,
>  	}
>  
>  	pm_runtime_mark_last_busy(st->dev);
> -	pm_runtime_put_autosuspend(st->dev);
> +	__pm_runtime_put_autosuspend(st->dev);
>  
>  	return ret;
>  }
> @@ -199,7 +199,7 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,
>  
>  error_ret:
>  	pm_runtime_mark_last_busy(st->dev);
> -	pm_runtime_put_autosuspend(st->dev);
> +	__pm_runtime_put_autosuspend(st->dev);
>  
>  	return ret;
>  };
> @@ -251,7 +251,7 @@ static int kxsd9_buffer_postdisable(struct iio_dev *indio_dev)
>  	struct kxsd9_state *st = iio_priv(indio_dev);
>  
>  	pm_runtime_mark_last_busy(st->dev);
> -	pm_runtime_put_autosuspend(st->dev);
> +	__pm_runtime_put_autosuspend(st->dev);
>  
>  	return 0;
>  }
> diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
> index 62e6369e2269..17786868855b 100644
> --- a/drivers/iio/accel/mma8452.c
> +++ b/drivers/iio/accel/mma8452.c
> @@ -227,7 +227,7 @@ static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on)
>  		ret = pm_runtime_resume_and_get(&client->dev);
>  	} else {
>  		pm_runtime_mark_last_busy(&client->dev);
> -		ret = pm_runtime_put_autosuspend(&client->dev);
> +		ret = __pm_runtime_put_autosuspend(&client->dev);
>  	}
>  
>  	if (ret < 0) {
> diff --git a/drivers/iio/accel/mma9551_core.c b/drivers/iio/accel/mma9551_core.c
> index b898f865fb87..d97cac6cc4da 100644
> --- a/drivers/iio/accel/mma9551_core.c
> +++ b/drivers/iio/accel/mma9551_core.c
> @@ -673,7 +673,7 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
>  		ret = pm_runtime_resume_and_get(&client->dev);
>  	else {
>  		pm_runtime_mark_last_busy(&client->dev);
> -		ret = pm_runtime_put_autosuspend(&client->dev);
> +		ret = __pm_runtime_put_autosuspend(&client->dev);
>  	}
>  
>  	if (ret < 0) {
> diff --git a/drivers/iio/accel/msa311.c b/drivers/iio/accel/msa311.c
> index 57025354c7cd..21ec55dc1c5a 100644
> --- a/drivers/iio/accel/msa311.c
> +++ b/drivers/iio/accel/msa311.c
> @@ -608,7 +608,7 @@ static int msa311_read_raw_data(struct iio_dev *indio_dev,
>  	iio_device_release_direct_mode(indio_dev);
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	if (err) {
>  		dev_err(dev, "can't get axis %s (%pe)\n",
> @@ -740,7 +740,7 @@ static int msa311_write_scale(struct iio_dev *indio_dev, int val, int val2)
>  		}
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	if (err)
>  		dev_err(dev, "can't update scale (%pe)\n", ERR_PTR(err));
> @@ -781,7 +781,7 @@ static int msa311_write_samp_freq(struct iio_dev *indio_dev, int val, int val2)
>  	iio_device_release_direct_mode(indio_dev);
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	if (err)
>  		dev_err(dev, "can't update frequency (%pe)\n", ERR_PTR(err));
> @@ -830,7 +830,7 @@ static int msa311_debugfs_reg_access(struct iio_dev *indio_dev,
>  	mutex_unlock(&msa311->lock);
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	if (err)
>  		dev_err(dev, "can't %s register %u from debugfs (%pe)\n",
> @@ -853,7 +853,7 @@ static int msa311_buffer_postdisable(struct iio_dev *indio_dev)
>  	struct device *dev = msa311->dev;
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
>  }
> @@ -1231,7 +1231,7 @@ static int msa311_probe(struct i2c_client *i2c)
>  		return err;
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	err = devm_iio_device_register(dev, indio_dev);
>  	if (err)
> diff --git a/drivers/iio/adc/ab8500-gpadc.c b/drivers/iio/adc/ab8500-gpadc.c
> index 59f66e9cb0e8..f2d1b06bac44 100644
> --- a/drivers/iio/adc/ab8500-gpadc.c
> +++ b/drivers/iio/adc/ab8500-gpadc.c
> @@ -608,7 +608,7 @@ static int ab8500_gpadc_read(struct ab8500_gpadc *gpadc,
>  
>  	/* This eventually drops the regulator */
>  	pm_runtime_mark_last_busy(gpadc->dev);
> -	pm_runtime_put_autosuspend(gpadc->dev);
> +	__pm_runtime_put_autosuspend(gpadc->dev);
>  
>  	return (high_data << 8) | low_data;
>  
> diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
> index d7fd21e7c6e2..628e6e3c667c 100644
> --- a/drivers/iio/adc/at91-sama5d2_adc.c
> +++ b/drivers/iio/adc/at91-sama5d2_adc.c
> @@ -893,7 +893,7 @@ static int at91_adc_config_emr(struct at91_adc_state *st,
>  	at91_adc_writel(st, EMR, emr);
>  
>  	pm_runtime_mark_last_busy(st->dev);
> -	pm_runtime_put_autosuspend(st->dev);
> +	__pm_runtime_put_autosuspend(st->dev);
>  
>  	st->oversampling_ratio = oversampling_ratio;
>  
> @@ -968,7 +968,7 @@ static int at91_adc_configure_touch(struct at91_adc_state *st, bool state)
>  		at91_adc_writel(st, TSMR, 0);
>  
>  		pm_runtime_mark_last_busy(st->dev);
> -		pm_runtime_put_autosuspend(st->dev);
> +		__pm_runtime_put_autosuspend(st->dev);
>  		return 0;
>  	}
>  	/*
> @@ -1140,7 +1140,7 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state)
>  
>  	if (!state) {
>  		pm_runtime_mark_last_busy(st->dev);
> -		pm_runtime_put_autosuspend(st->dev);
> +		__pm_runtime_put_autosuspend(st->dev);
>  	}
>  
>  	return 0;
> @@ -1333,7 +1333,7 @@ static int at91_adc_buffer_prepare(struct iio_dev *indio_dev)
>  
>  pm_runtime_put:
>  	pm_runtime_mark_last_busy(st->dev);
> -	pm_runtime_put_autosuspend(st->dev);
> +	__pm_runtime_put_autosuspend(st->dev);
>  	return ret;
>  }
>  
> @@ -1391,7 +1391,7 @@ static int at91_adc_buffer_postdisable(struct iio_dev *indio_dev)
>  		dmaengine_terminate_sync(st->dma_st.dma_chan);
>  
>  	pm_runtime_mark_last_busy(st->dev);
> -	pm_runtime_put_autosuspend(st->dev);
> +	__pm_runtime_put_autosuspend(st->dev);
>  
>  	return 0;
>  }
> @@ -1600,7 +1600,7 @@ static void at91_adc_setup_samp_freq(struct iio_dev *indio_dev, unsigned freq,
>  	at91_adc_writel(st, MR, mr);
>  
>  	pm_runtime_mark_last_busy(st->dev);
> -	pm_runtime_put_autosuspend(st->dev);
> +	__pm_runtime_put_autosuspend(st->dev);
>  
>  	dev_dbg(&indio_dev->dev, "freq: %u, startup: %u, prescal: %u, tracktim=%u\n",
>  		freq, startup, prescal, tracktim);
> @@ -1806,7 +1806,7 @@ static int at91_adc_read_info_raw(struct iio_dev *indio_dev,
>  
>  pm_runtime_put:
>  	pm_runtime_mark_last_busy(st->dev);
> -	pm_runtime_put_autosuspend(st->dev);
> +	__pm_runtime_put_autosuspend(st->dev);
>  	return ret;
>  }
>  
> @@ -1899,7 +1899,7 @@ static int at91_adc_read_temp(struct iio_dev *indio_dev,
>  	/* Revert previous settings. */
>  	at91_adc_temp_sensor_configure(st, false);
>  	pm_runtime_mark_last_busy(st->dev);
> -	pm_runtime_put_autosuspend(st->dev);
> +	__pm_runtime_put_autosuspend(st->dev);
>  unlock:
>  	mutex_unlock(&st->lock);
>  	iio_device_release_direct_mode(indio_dev);
> @@ -2467,7 +2467,7 @@ static int at91_adc_probe(struct platform_device *pdev)
>  		 readl_relaxed(st->base + st->soc_info.platform->layout->VERSION));
>  
>  	pm_runtime_mark_last_busy(st->dev);
> -	pm_runtime_put_autosuspend(st->dev);
> +	__pm_runtime_put_autosuspend(st->dev);
>  
>  	return 0;
>  
> @@ -2569,7 +2569,7 @@ static int at91_adc_resume(struct device *dev)
>  	}
>  
>  	pm_runtime_mark_last_busy(st->dev);
> -	pm_runtime_put_autosuspend(st->dev);
> +	__pm_runtime_put_autosuspend(st->dev);
>  
>  	return 0;
>  
> diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c
> index 15a21d2860e7..d2a4557a5c07 100644
> --- a/drivers/iio/adc/rcar-gyroadc.c
> +++ b/drivers/iio/adc/rcar-gyroadc.c
> @@ -167,7 +167,7 @@ static int rcar_gyroadc_set_power(struct rcar_gyroadc *priv, bool on)
>  		return pm_runtime_resume_and_get(dev);
>  	} else {
>  		pm_runtime_mark_last_busy(dev);
> -		return pm_runtime_put_autosuspend(dev);
> +		return __pm_runtime_put_autosuspend(dev);
>  	}
>  }
>  
> diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
> index 616dd729666a..a67e972bcc5d 100644
> --- a/drivers/iio/adc/stm32-adc-core.c
> +++ b/drivers/iio/adc/stm32-adc-core.c
> @@ -798,7 +798,7 @@ static int stm32_adc_probe(struct platform_device *pdev)
>  	}
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
>  
> diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
> index 32ca26ed59f7..50c3651413d2 100644
> --- a/drivers/iio/adc/stm32-adc.c
> +++ b/drivers/iio/adc/stm32-adc.c
> @@ -1456,7 +1456,7 @@ static int stm32_adc_single_conv(struct iio_dev *indio_dev,
>  	stm32_adc_conv_irq_disable(adc);
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> @@ -1623,7 +1623,7 @@ static int stm32_adc_update_scan_mode(struct iio_dev *indio_dev,
>  
>  	ret = stm32_adc_conf_scan_seq(indio_dev, scan_mask);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> @@ -1672,7 +1672,7 @@ static int stm32_adc_debugfs_reg_access(struct iio_dev *indio_dev,
>  		*readval = stm32_adc_readl(adc, reg);
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
>  }
> @@ -1816,7 +1816,7 @@ static int stm32_adc_buffer_postenable(struct iio_dev *indio_dev)
>  	stm32_adc_set_trig(indio_dev, NULL);
>  err_pm_put:
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> @@ -1839,7 +1839,7 @@ static int stm32_adc_buffer_predisable(struct iio_dev *indio_dev)
>  		dev_err(&indio_dev->dev, "Can't clear trigger\n");
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
>  }
> @@ -2473,7 +2473,7 @@ static int stm32_adc_probe(struct platform_device *pdev)
>  	}
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	if (IS_ENABLED(CONFIG_DEBUG_FS))
>  		stm32_adc_debugfs_init(indio_dev);
> diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
> index 00a3a4db0fe0..43746e026042 100644
> --- a/drivers/iio/adc/sun4i-gpadc-iio.c
> +++ b/drivers/iio/adc/sun4i-gpadc-iio.c
> @@ -248,7 +248,7 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  	pm_runtime_mark_last_busy(indio_dev->dev.parent);
>  
>  err:
> -	pm_runtime_put_autosuspend(indio_dev->dev.parent);
> +	__pm_runtime_put_autosuspend(indio_dev->dev.parent);
>  	disable_irq(irq);
>  	mutex_unlock(&info->mutex);
>  
> @@ -273,7 +273,7 @@ static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val)
>  		regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, val);
>  
>  		pm_runtime_mark_last_busy(indio_dev->dev.parent);
> -		pm_runtime_put_autosuspend(indio_dev->dev.parent);
> +		__pm_runtime_put_autosuspend(indio_dev->dev.parent);
>  
>  		return 0;
>  	}
> diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c
> index 052d2124b215..380aeabc8a72 100644
> --- a/drivers/iio/adc/ti-ads1015.c
> +++ b/drivers/iio/adc/ti-ads1015.c
> @@ -377,7 +377,7 @@ static int ads1015_set_power_state(struct ads1015_data *data, bool on)
>  		ret = pm_runtime_resume_and_get(dev);
>  	} else {
>  		pm_runtime_mark_last_busy(dev);
> -		ret = pm_runtime_put_autosuspend(dev);
> +		ret = __pm_runtime_put_autosuspend(dev);
>  	}
>  
>  	return ret < 0 ? ret : 0;
> diff --git a/drivers/iio/adc/ti-ads1100.c b/drivers/iio/adc/ti-ads1100.c
> index 1e46f07a9ca6..038901c93b7d 100644
> --- a/drivers/iio/adc/ti-ads1100.c
> +++ b/drivers/iio/adc/ti-ads1100.c
> @@ -105,7 +105,7 @@ static int ads1100_get_adc_result(struct ads1100_data *data, int chan, int *val)
>  	ret = i2c_master_recv(data->client, (char *)&buffer, sizeof(buffer));
>  
>  	pm_runtime_mark_last_busy(&data->client->dev);
> -	pm_runtime_put_autosuspend(&data->client->dev);
> +	__pm_runtime_put_autosuspend(&data->client->dev);
>  
>  	if (ret < 0) {
>  		dev_err(&data->client->dev, "I2C read fail: %d\n", ret);
> diff --git a/drivers/iio/adc/ti-ads1119.c b/drivers/iio/adc/ti-ads1119.c
> index 1c7606375149..52e20c4ed8bb 100644
> --- a/drivers/iio/adc/ti-ads1119.c
> +++ b/drivers/iio/adc/ti-ads1119.c
> @@ -292,7 +292,7 @@ static int ads1119_single_conversion(struct ads1119_state *st,
>  	ret = IIO_VAL_INT;
>  pdown:
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  	return ret;
>  }
>  
> @@ -466,7 +466,7 @@ static int ads1119_triggered_buffer_postdisable(struct iio_dev *indio_dev)
>  		return ret;
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
>  }
> diff --git a/drivers/iio/chemical/atlas-sensor.c b/drivers/iio/chemical/atlas-sensor.c
> index baf93e5e3ca7..d0ab2656919e 100644
> --- a/drivers/iio/chemical/atlas-sensor.c
> +++ b/drivers/iio/chemical/atlas-sensor.c
> @@ -427,7 +427,7 @@ static int atlas_buffer_predisable(struct iio_dev *indio_dev)
>  		return ret;
>  
>  	pm_runtime_mark_last_busy(&data->client->dev);
> -	ret = pm_runtime_put_autosuspend(&data->client->dev);
> +	ret = __pm_runtime_put_autosuspend(&data->client->dev);
>  	if (ret)
>  		return ret;
>  
> @@ -492,7 +492,7 @@ static int atlas_read_measurement(struct atlas_data *data, int reg, __be32 *val)
>  	ret = regmap_bulk_read(data->regmap, reg, val, sizeof(*val));
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
> index ad8910e6ad59..e6bf7eb4e23c 100644
> --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
> +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
> @@ -165,7 +165,7 @@ int hid_sensor_power_state(struct hid_sensor_common *st, bool state)
>  		atomic_dec(&st->user_requested_state);
>  		pm_runtime_mark_last_busy(&st->pdev->dev);
>  		pm_runtime_use_autosuspend(&st->pdev->dev);
> -		ret = pm_runtime_put_autosuspend(&st->pdev->dev);
> +		ret = __pm_runtime_put_autosuspend(&st->pdev->dev);
>  	}
>  	if (ret < 0)
>  		return ret;
> diff --git a/drivers/iio/dac/stm32-dac.c b/drivers/iio/dac/stm32-dac.c
> index 5a722f307e7e..8dadf90546b4 100644
> --- a/drivers/iio/dac/stm32-dac.c
> +++ b/drivers/iio/dac/stm32-dac.c
> @@ -97,7 +97,7 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
>  
>  	if (!enable) {
>  		pm_runtime_mark_last_busy(dev);
> -		pm_runtime_put_autosuspend(dev);
> +		__pm_runtime_put_autosuspend(dev);
>  	}
>  
>  	return 0;
> @@ -105,7 +105,7 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
>  err_put_pm:
>  	if (enable) {
>  		pm_runtime_mark_last_busy(dev);
> -		pm_runtime_put_autosuspend(dev);
> +		__pm_runtime_put_autosuspend(dev);
>  	}
>  
>  	return ret;
> @@ -350,7 +350,7 @@ static int stm32_dac_probe(struct platform_device *pdev)
>  		goto err_pm_put;
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
>  
> diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c
> index 10728d5ccae3..97f3045dc2a9 100644
> --- a/drivers/iio/gyro/bmg160_core.c
> +++ b/drivers/iio/gyro/bmg160_core.c
> @@ -314,7 +314,7 @@ static int bmg160_set_power_state(struct bmg160_data *data, bool on)
>  		ret = pm_runtime_get_sync(dev);
>  	else {
>  		pm_runtime_mark_last_busy(dev);
> -		ret = pm_runtime_put_autosuspend(dev);
> +		ret = __pm_runtime_put_autosuspend(dev);
>  	}
>  
>  	if (ret < 0) {
> diff --git a/drivers/iio/gyro/fxas21002c_core.c b/drivers/iio/gyro/fxas21002c_core.c
> index 688966129f70..f6263187f6c7 100644
> --- a/drivers/iio/gyro/fxas21002c_core.c
> +++ b/drivers/iio/gyro/fxas21002c_core.c
> @@ -375,7 +375,7 @@ static int  fxas21002c_pm_put(struct fxas21002c_data *data)
>  
>  	pm_runtime_mark_last_busy(dev);
>  
> -	return pm_runtime_put_autosuspend(dev);
> +	return __pm_runtime_put_autosuspend(dev);
>  }
>  
>  static int fxas21002c_temp_get(struct fxas21002c_data *data, int *val)
> diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c
> index b6883e8b2a8b..93d9d0e4626b 100644
> --- a/drivers/iio/gyro/mpu3050-core.c
> +++ b/drivers/iio/gyro/mpu3050-core.c
> @@ -371,7 +371,7 @@ static int mpu3050_read_raw(struct iio_dev *indio_dev,
>  out_read_raw_unlock:
>  	mutex_unlock(&mpu3050->lock);
>  	pm_runtime_mark_last_busy(mpu3050->dev);
> -	pm_runtime_put_autosuspend(mpu3050->dev);
> +	__pm_runtime_put_autosuspend(mpu3050->dev);
>  
>  	return ret;
>  }
> @@ -663,7 +663,7 @@ static int mpu3050_buffer_postdisable(struct iio_dev *indio_dev)
>  	struct mpu3050 *mpu3050 = iio_priv(indio_dev);
>  
>  	pm_runtime_mark_last_busy(mpu3050->dev);
> -	pm_runtime_put_autosuspend(mpu3050->dev);
> +	__pm_runtime_put_autosuspend(mpu3050->dev);
>  
>  	return 0;
>  }
> @@ -977,7 +977,7 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,
>  			dev_err(mpu3050->dev, "error resetting FIFO\n");
>  
>  		pm_runtime_mark_last_busy(mpu3050->dev);
> -		pm_runtime_put_autosuspend(mpu3050->dev);
> +		__pm_runtime_put_autosuspend(mpu3050->dev);
>  		mpu3050->hw_irq_trigger = false;
>  
>  		return 0;
> diff --git a/drivers/iio/gyro/mpu3050-i2c.c b/drivers/iio/gyro/mpu3050-i2c.c
> index 29ecfa6fd633..49256fc6c6ad 100644
> --- a/drivers/iio/gyro/mpu3050-i2c.c
> +++ b/drivers/iio/gyro/mpu3050-i2c.c
> @@ -28,7 +28,7 @@ static int mpu3050_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id)
>  	struct mpu3050 *mpu3050 = i2c_mux_priv(mux);
>  
>  	pm_runtime_mark_last_busy(mpu3050->dev);
> -	pm_runtime_put_autosuspend(mpu3050->dev);
> +	__pm_runtime_put_autosuspend(mpu3050->dev);
>  	return 0;
>  }
>  
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
> index 56ac19814250..4e43deadf02f 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
> @@ -292,7 +292,7 @@ static int inv_icm42600_accel_read_sensor(struct iio_dev *indio_dev,
>  exit:
>  	mutex_unlock(&st->lock);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  	return ret;
>  }
>  
> @@ -370,7 +370,7 @@ static int inv_icm42600_accel_write_scale(struct iio_dev *indio_dev,
>  
>  	mutex_unlock(&st->lock);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> @@ -474,7 +474,7 @@ static int inv_icm42600_accel_write_odr(struct iio_dev *indio_dev,
>  out_unlock:
>  	mutex_unlock(&st->lock);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> @@ -526,7 +526,7 @@ static int inv_icm42600_accel_read_offset(struct inv_icm42600_state *st,
>  
>  	mutex_unlock(&st->lock);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  	if (ret)
>  		return ret;
>  
> @@ -664,7 +664,7 @@ static int inv_icm42600_accel_write_offset(struct inv_icm42600_state *st,
>  out_unlock:
>  	mutex_unlock(&st->lock);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  	return ret;
>  }
>  
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
> index aae7c56481a3..acc141657d3f 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
> @@ -440,7 +440,7 @@ static int inv_icm42600_buffer_postdisable(struct iio_dev *indio_dev)
>  		msleep(sleep);
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
> index 938af5b640b0..3784b1719433 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
> @@ -188,7 +188,7 @@ static int inv_icm42600_gyro_read_sensor(struct inv_icm42600_state *st,
>  exit:
>  	mutex_unlock(&st->lock);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  	return ret;
>  }
>  
> @@ -287,7 +287,7 @@ static int inv_icm42600_gyro_write_scale(struct iio_dev *indio_dev,
>  
>  	mutex_unlock(&st->lock);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> @@ -382,7 +382,7 @@ static int inv_icm42600_gyro_write_odr(struct iio_dev *indio_dev,
>  out_unlock:
>  	mutex_unlock(&st->lock);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> @@ -434,7 +434,7 @@ static int inv_icm42600_gyro_read_offset(struct inv_icm42600_state *st,
>  
>  	mutex_unlock(&st->lock);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  	if (ret)
>  		return ret;
>  
> @@ -571,7 +571,7 @@ static int inv_icm42600_gyro_write_offset(struct inv_icm42600_state *st,
>  out_unlock:
>  	mutex_unlock(&st->lock);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  	return ret;
>  }
>  
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c
> index 213cce1c3111..4c2f2d6dfff9 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c
> @@ -38,7 +38,7 @@ static int inv_icm42600_temp_read(struct inv_icm42600_state *st, int16_t *temp)
>  exit:
>  	mutex_unlock(&st->lock);
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> index fdb48c5e5686..8fb35f37e5d2 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> @@ -708,12 +708,12 @@ static int inv_mpu6050_read_channel_data(struct iio_dev *indio_dev,
>  	}
>  
>  	pm_runtime_mark_last_busy(pdev);
> -	pm_runtime_put_autosuspend(pdev);
> +	__pm_runtime_put_autosuspend(pdev);
>  
>  	return ret;
>  
>  error_power_off:
> -	pm_runtime_put_autosuspend(pdev);
> +	__pm_runtime_put_autosuspend(pdev);
>  	return result;
>  }
>  
> @@ -913,7 +913,7 @@ static int inv_mpu6050_write_raw(struct iio_dev *indio_dev,
>  	}
>  
>  	pm_runtime_mark_last_busy(pdev);
> -	pm_runtime_put_autosuspend(pdev);
> +	__pm_runtime_put_autosuspend(pdev);
>  error_write_raw_unlock:
>  	mutex_unlock(&st->lock);
>  	iio_device_release_direct_mode(indio_dev);
> @@ -1121,14 +1121,14 @@ static int inv_mpu6050_enable_wom(struct inv_mpu6050_state *st, bool en)
>  		}
>  
>  		pm_runtime_mark_last_busy(pdev);
> -		pm_runtime_put_autosuspend(pdev);
> +		__pm_runtime_put_autosuspend(pdev);
>  	}
>  
>  	return result;
>  
>  error_suspend:
>  	pm_runtime_mark_last_busy(pdev);
> -	pm_runtime_put_autosuspend(pdev);
> +	__pm_runtime_put_autosuspend(pdev);
>  	return result;
>  }
>  
> @@ -1227,7 +1227,7 @@ static int inv_mpu6050_write_event_value(struct iio_dev *indio_dev,
>  	result = inv_mpu6050_set_wom_threshold(st, value, INV_MPU6050_FREQ_DIVIDER(st));
>  
>  	pm_runtime_mark_last_busy(pdev);
> -	pm_runtime_put_autosuspend(pdev);
> +	__pm_runtime_put_autosuspend(pdev);
>  
>  	return result;
>  }
> @@ -1336,7 +1336,7 @@ inv_mpu6050_fifo_rate_store(struct device *dev, struct device_attribute *attr,
>  
>  	pm_runtime_mark_last_busy(pdev);
>  fifo_rate_fail_power_off:
> -	pm_runtime_put_autosuspend(pdev);
> +	__pm_runtime_put_autosuspend(pdev);
>  fifo_rate_fail_unlock:
>  	mutex_unlock(&st->lock);
>  	if (result)
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
> index 3bfeabab0ec4..e501ac9276d4 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
> @@ -196,13 +196,13 @@ static int inv_mpu6050_set_enable(struct iio_dev *indio_dev, bool enable)
>  		if (result)
>  			goto error_power_off;
>  		pm_runtime_mark_last_busy(pdev);
> -		pm_runtime_put_autosuspend(pdev);
> +		__pm_runtime_put_autosuspend(pdev);
>  	}
>  
>  	return 0;
>  
>  error_power_off:
> -	pm_runtime_put_autosuspend(pdev);
> +	__pm_runtime_put_autosuspend(pdev);
>  	return result;
>  }
>  
> diff --git a/drivers/iio/imu/kmx61.c b/drivers/iio/imu/kmx61.c
> index c61c012e25bb..75942b0b95d7 100644
> --- a/drivers/iio/imu/kmx61.c
> +++ b/drivers/iio/imu/kmx61.c
> @@ -753,7 +753,7 @@ static int kmx61_set_power_state(struct kmx61_data *data, bool on, u8 device)
>  		ret = pm_runtime_resume_and_get(&data->client->dev);
>  	} else {
>  		pm_runtime_mark_last_busy(&data->client->dev);
> -		ret = pm_runtime_put_autosuspend(&data->client->dev);
> +		ret = __pm_runtime_put_autosuspend(&data->client->dev);
>  	}
>  	if (ret < 0) {
>  		dev_err(&data->client->dev,
> diff --git a/drivers/iio/light/apds9306.c b/drivers/iio/light/apds9306.c
> index 079e02be1005..ade25e461397 100644
> --- a/drivers/iio/light/apds9306.c
> +++ b/drivers/iio/light/apds9306.c
> @@ -538,7 +538,7 @@ static int apds9306_read_data(struct apds9306_data *data, int *val, int reg)
>  	*val = get_unaligned_le24(&buff);
>  
>  	pm_runtime_mark_last_busy(data->dev);
> -	pm_runtime_put_autosuspend(data->dev);
> +	__pm_runtime_put_autosuspend(data->dev);
>  
>  	return 0;
>  }
> @@ -1119,7 +1119,7 @@ static int apds9306_write_event_config(struct iio_dev *indio_dev,
>  				return ret;
>  
>  			pm_runtime_mark_last_busy(data->dev);
> -			pm_runtime_put_autosuspend(data->dev);
> +			__pm_runtime_put_autosuspend(data->dev);
>  
>  			return 0;
>  		}
> @@ -1315,7 +1315,7 @@ static int apds9306_probe(struct i2c_client *client)
>  	if (ret)
>  		return dev_err_probe(dev, ret, "failed iio device registration\n");
>  
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return 0;
>  }
> diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
> index 3c14e4c30805..13db160be094 100644
> --- a/drivers/iio/light/apds9960.c
> +++ b/drivers/iio/light/apds9960.c
> @@ -497,7 +497,7 @@ static int apds9960_set_power_state(struct apds9960_data *data, bool on)
>  				     APDS9960_MAX_INT_TIME_IN_US);
>  	} else {
>  		pm_runtime_mark_last_busy(dev);
> -		ret = pm_runtime_put_autosuspend(dev);
> +		ret = __pm_runtime_put_autosuspend(dev);
>  	}
>  
>  	mutex_unlock(&data->lock);
> @@ -910,7 +910,7 @@ static int apds9960_buffer_predisable(struct iio_dev *indio_dev)
>  	if (ret)
>  		return ret;
>  
> -	pm_runtime_put_autosuspend(&data->client->dev);
> +	__pm_runtime_put_autosuspend(&data->client->dev);
>  
>  	return 0;
>  }
> diff --git a/drivers/iio/light/bh1780.c b/drivers/iio/light/bh1780.c
> index 475f44954f61..d22bf5f684b1 100644
> --- a/drivers/iio/light/bh1780.c
> +++ b/drivers/iio/light/bh1780.c
> @@ -112,7 +112,7 @@ static int bh1780_read_raw(struct iio_dev *indio_dev,
>  			if (value < 0)
>  				return value;
>  			pm_runtime_mark_last_busy(&bh1780->client->dev);
> -			pm_runtime_put_autosuspend(&bh1780->client->dev);
> +			__pm_runtime_put_autosuspend(&bh1780->client->dev);
>  			*val = value;
>  
>  			return IIO_VAL_INT;
> diff --git a/drivers/iio/light/gp2ap002.c b/drivers/iio/light/gp2ap002.c
> index f8b1d7dd6f5f..aeaba841dbb4 100644
> --- a/drivers/iio/light/gp2ap002.c
> +++ b/drivers/iio/light/gp2ap002.c
> @@ -272,7 +272,7 @@ static int gp2ap002_read_raw(struct iio_dev *indio_dev,
>  
>  out:
>  	pm_runtime_mark_last_busy(gp2ap002->dev);
> -	pm_runtime_put_autosuspend(gp2ap002->dev);
> +	__pm_runtime_put_autosuspend(gp2ap002->dev);
>  
>  	return ret;
>  }
> @@ -354,7 +354,7 @@ static int gp2ap002_write_event_config(struct iio_dev *indio_dev,
>  		gp2ap002->enabled = true;
>  	} else {
>  		pm_runtime_mark_last_busy(gp2ap002->dev);
> -		pm_runtime_put_autosuspend(gp2ap002->dev);
> +		__pm_runtime_put_autosuspend(gp2ap002->dev);
>  		gp2ap002->enabled = false;
>  	}
>  
> diff --git a/drivers/iio/light/isl29028.c b/drivers/iio/light/isl29028.c
> index 95bfb3ffa519..63b6fdda25ed 100644
> --- a/drivers/iio/light/isl29028.c
> +++ b/drivers/iio/light/isl29028.c
> @@ -342,7 +342,7 @@ static int isl29028_set_pm_runtime_busy(struct isl29028_chip *chip, bool on)
>  		ret = pm_runtime_resume_and_get(dev);
>  	} else {
>  		pm_runtime_mark_last_busy(dev);
> -		ret = pm_runtime_put_autosuspend(dev);
> +		ret = __pm_runtime_put_autosuspend(dev);
>  	}
>  
>  	return ret;
> diff --git a/drivers/iio/light/ltrf216a.c b/drivers/iio/light/ltrf216a.c
> index 37eecff571b9..228f03c7f192 100644
> --- a/drivers/iio/light/ltrf216a.c
> +++ b/drivers/iio/light/ltrf216a.c
> @@ -209,7 +209,7 @@ static int ltrf216a_set_power_state(struct ltrf216a_data *data, bool on)
>  		}
>  	} else {
>  		pm_runtime_mark_last_busy(dev);
> -		pm_runtime_put_autosuspend(dev);
> +		__pm_runtime_put_autosuspend(dev);
>  	}
>  
>  	return ret;
> diff --git a/drivers/iio/light/pa12203001.c b/drivers/iio/light/pa12203001.c
> index b920bf82c102..38313e712e65 100644
> --- a/drivers/iio/light/pa12203001.c
> +++ b/drivers/iio/light/pa12203001.c
> @@ -190,7 +190,7 @@ static int pa12203001_set_power_state(struct pa12203001_data *data, bool on,
>  
>  	} else {
>  		pm_runtime_mark_last_busy(&data->client->dev);
> -		ret = pm_runtime_put_autosuspend(&data->client->dev);
> +		ret = __pm_runtime_put_autosuspend(&data->client->dev);
>  	}
>  
>  	return ret;
> diff --git a/drivers/iio/light/rpr0521.c b/drivers/iio/light/rpr0521.c
> index 78c08e0bd077..2010b6387be7 100644
> --- a/drivers/iio/light/rpr0521.c
> +++ b/drivers/iio/light/rpr0521.c
> @@ -363,7 +363,7 @@ static int rpr0521_set_power_state(struct rpr0521_data *data, bool on,
>  		ret = pm_runtime_resume_and_get(&data->client->dev);
>  	} else {
>  		pm_runtime_mark_last_busy(&data->client->dev);
> -		ret = pm_runtime_put_autosuspend(&data->client->dev);
> +		ret = __pm_runtime_put_autosuspend(&data->client->dev);
>  	}
>  	if (ret < 0) {
>  		dev_err(&data->client->dev,
> diff --git a/drivers/iio/light/tsl2583.c b/drivers/iio/light/tsl2583.c
> index 02ad11611b9c..d41fd79e724c 100644
> --- a/drivers/iio/light/tsl2583.c
> +++ b/drivers/iio/light/tsl2583.c
> @@ -647,7 +647,7 @@ static int tsl2583_set_pm_runtime_busy(struct tsl2583_chip *chip, bool on)
>  		ret = pm_runtime_resume_and_get(&chip->client->dev);
>  	} else {
>  		pm_runtime_mark_last_busy(&chip->client->dev);
> -		ret = pm_runtime_put_autosuspend(&chip->client->dev);
> +		ret = __pm_runtime_put_autosuspend(&chip->client->dev);
>  	}
>  
>  	return ret;
> diff --git a/drivers/iio/light/tsl2591.c b/drivers/iio/light/tsl2591.c
> index 850c2465992f..43adaffe1400 100644
> --- a/drivers/iio/light/tsl2591.c
> +++ b/drivers/iio/light/tsl2591.c
> @@ -773,7 +773,7 @@ static int tsl2591_read_raw(struct iio_dev *indio_dev,
>  	mutex_unlock(&chip->als_mutex);
>  
>  	pm_runtime_mark_last_busy(&client->dev);
> -	pm_runtime_put_autosuspend(&client->dev);
> +	__pm_runtime_put_autosuspend(&client->dev);
>  
>  	return ret;
>  }
> @@ -996,7 +996,7 @@ static int tsl2591_write_event_config(struct iio_dev *indio_dev,
>  	} else if (!state && chip->events_enabled) {
>  		chip->events_enabled = false;
>  		pm_runtime_mark_last_busy(&client->dev);
> -		pm_runtime_put_autosuspend(&client->dev);
> +		__pm_runtime_put_autosuspend(&client->dev);
>  	}
>  
>  	return 0;
> diff --git a/drivers/iio/light/us5182d.c b/drivers/iio/light/us5182d.c
> index de6967ac3b0b..901288236d38 100644
> --- a/drivers/iio/light/us5182d.c
> +++ b/drivers/iio/light/us5182d.c
> @@ -370,7 +370,7 @@ static int us5182d_set_power_state(struct us5182d_data *data, bool on)
>  		ret = pm_runtime_resume_and_get(&data->client->dev);
>  	} else {
>  		pm_runtime_mark_last_busy(&data->client->dev);
> -		ret = pm_runtime_put_autosuspend(&data->client->dev);
> +		ret = __pm_runtime_put_autosuspend(&data->client->dev);
>  	}
>  
>  	return ret;
> diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c
> index 4e3641ff2ed4..2877880897e4 100644
> --- a/drivers/iio/light/vcnl4000.c
> +++ b/drivers/iio/light/vcnl4000.c
> @@ -582,7 +582,7 @@ static int vcnl4000_set_pm_runtime_state(struct vcnl4000_data *data, bool on)
>  		ret = pm_runtime_resume_and_get(dev);
>  	} else {
>  		pm_runtime_mark_last_busy(dev);
> -		ret = pm_runtime_put_autosuspend(dev);
> +		ret = __pm_runtime_put_autosuspend(dev);
>  	}
>  
>  	return ret;
> diff --git a/drivers/iio/light/vcnl4035.c b/drivers/iio/light/vcnl4035.c
> index 337a1332c2c6..a7393255f6ac 100644
> --- a/drivers/iio/light/vcnl4035.c
> +++ b/drivers/iio/light/vcnl4035.c
> @@ -150,7 +150,7 @@ static int vcnl4035_set_pm_runtime_state(struct vcnl4035_data *data, bool on)
>  		ret = pm_runtime_resume_and_get(dev);
>  	} else {
>  		pm_runtime_mark_last_busy(dev);
> -		ret = pm_runtime_put_autosuspend(dev);
> +		ret = __pm_runtime_put_autosuspend(dev);
>  	}
>  
>  	return ret;
> diff --git a/drivers/iio/magnetometer/af8133j.c b/drivers/iio/magnetometer/af8133j.c
> index d81d89af6283..f0530854698d 100644
> --- a/drivers/iio/magnetometer/af8133j.c
> +++ b/drivers/iio/magnetometer/af8133j.c
> @@ -235,7 +235,7 @@ static int af8133j_read_measurement(struct af8133j_data *data, __le16 buf[3])
>  
>  out_rpm_put:
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	return ret;
>  }
> @@ -454,7 +454,7 @@ static int af8133j_probe(struct i2c_client *client)
>  	if (ret)
>  		return ret;
>  
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	indio_dev->info = &af8133j_info;
>  	indio_dev->name = "af8133j";
> diff --git a/drivers/iio/magnetometer/ak8974.c b/drivers/iio/magnetometer/ak8974.c
> index 8306a18706ac..eed25cd701f0 100644
> --- a/drivers/iio/magnetometer/ak8974.c
> +++ b/drivers/iio/magnetometer/ak8974.c
> @@ -584,7 +584,7 @@ static int ak8974_measure_channel(struct ak8974 *ak8974, unsigned long address,
>  out_unlock:
>  	mutex_unlock(&ak8974->lock);
>  	pm_runtime_mark_last_busy(&ak8974->i2c->dev);
> -	pm_runtime_put_autosuspend(&ak8974->i2c->dev);
> +	__pm_runtime_put_autosuspend(&ak8974->i2c->dev);
>  
>  	return ret;
>  }
> @@ -679,7 +679,7 @@ static void ak8974_fill_buffer(struct iio_dev *indio_dev)
>   out_unlock:
>  	mutex_unlock(&ak8974->lock);
>  	pm_runtime_mark_last_busy(&ak8974->i2c->dev);
> -	pm_runtime_put_autosuspend(&ak8974->i2c->dev);
> +	__pm_runtime_put_autosuspend(&ak8974->i2c->dev);
>  }
>  
>  static irqreturn_t ak8974_handle_trigger(int irq, void *p)
> diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
> index 18077fb463a9..b637385f9d26 100644
> --- a/drivers/iio/magnetometer/ak8975.c
> +++ b/drivers/iio/magnetometer/ak8975.c
> @@ -776,7 +776,7 @@ static int ak8975_read_axis(struct iio_dev *indio_dev, int index, int *val)
>  	mutex_unlock(&data->lock);
>  
>  	pm_runtime_mark_last_busy(&data->client->dev);
> -	pm_runtime_put_autosuspend(&data->client->dev);
> +	__pm_runtime_put_autosuspend(&data->client->dev);
>  
>  	/* Swap bytes and convert to valid range. */
>  	buff = le16_to_cpu(rval);
> diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c
> index 06d5a1ef1fbd..26dc68e4270d 100644
> --- a/drivers/iio/magnetometer/bmc150_magn.c
> +++ b/drivers/iio/magnetometer/bmc150_magn.c
> @@ -268,7 +268,7 @@ static int bmc150_magn_set_power_state(struct bmc150_magn_data *data, bool on)
>  		ret = pm_runtime_resume_and_get(data->dev);
>  	} else {
>  		pm_runtime_mark_last_busy(data->dev);
> -		ret = pm_runtime_put_autosuspend(data->dev);
> +		ret = __pm_runtime_put_autosuspend(data->dev);
>  	}
>  
>  	if (ret < 0) {
> diff --git a/drivers/iio/magnetometer/tmag5273.c b/drivers/iio/magnetometer/tmag5273.c
> index 4187abe12784..bec579b7c6c6 100644
> --- a/drivers/iio/magnetometer/tmag5273.c
> +++ b/drivers/iio/magnetometer/tmag5273.c
> @@ -296,7 +296,7 @@ static int tmag5273_read_raw(struct iio_dev *indio_dev,
>  		ret = tmag5273_get_measure(data, &t, &x, &y, &z, &angle, &magnitude);
>  
>  		pm_runtime_mark_last_busy(data->dev);
> -		pm_runtime_put_autosuspend(data->dev);
> +		__pm_runtime_put_autosuspend(data->dev);
>  
>  		if (ret)
>  			return ret;
> @@ -669,7 +669,7 @@ static int tmag5273_probe(struct i2c_client *i2c)
>  	indio_dev->num_channels = ARRAY_SIZE(tmag5273_channels);
>  
>  	pm_runtime_mark_last_busy(dev);
> -	pm_runtime_put_autosuspend(dev);
> +	__pm_runtime_put_autosuspend(dev);
>  
>  	ret = devm_iio_device_register(dev, indio_dev);
>  	if (ret)
> diff --git a/drivers/iio/magnetometer/yamaha-yas530.c b/drivers/iio/magnetometer/yamaha-yas530.c
> index 65011a8598d3..62df8b91df3a 100644
> --- a/drivers/iio/magnetometer/yamaha-yas530.c
> +++ b/drivers/iio/magnetometer/yamaha-yas530.c
> @@ -623,7 +623,7 @@ static int yas5xx_read_raw(struct iio_dev *indio_dev,
>  		pm_runtime_get_sync(yas5xx->dev);
>  		ret = ci->get_measure(yas5xx, &t, &x, &y, &z);
>  		pm_runtime_mark_last_busy(yas5xx->dev);
> -		pm_runtime_put_autosuspend(yas5xx->dev);
> +		__pm_runtime_put_autosuspend(yas5xx->dev);
>  		if (ret)
>  			return ret;
>  		switch (chan->address) {
> @@ -664,7 +664,7 @@ static void yas5xx_fill_buffer(struct iio_dev *indio_dev)
>  	pm_runtime_get_sync(yas5xx->dev);
>  	ret = ci->get_measure(yas5xx, &t, &x, &y, &z);
>  	pm_runtime_mark_last_busy(yas5xx->dev);
> -	pm_runtime_put_autosuspend(yas5xx->dev);
> +	__pm_runtime_put_autosuspend(yas5xx->dev);
>  	if (ret) {
>  		dev_err(yas5xx->dev, "error refilling buffer\n");
>  		return;
> diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c
> index ca4915c9a394..806933baeffd 100644
> --- a/drivers/iio/pressure/bmp280-core.c
> +++ b/drivers/iio/pressure/bmp280-core.c
> @@ -729,7 +729,7 @@ static int bmp280_read_raw(struct iio_dev *indio_dev,
>  	pm_runtime_get_sync(data->dev);
>  	ret = bmp280_read_raw_impl(indio_dev, chan, val, val2, mask);
>  	pm_runtime_mark_last_busy(data->dev);
> -	pm_runtime_put_autosuspend(data->dev);
> +	__pm_runtime_put_autosuspend(data->dev);
>  
>  	return ret;
>  }
> @@ -904,7 +904,7 @@ static int bmp280_write_raw(struct iio_dev *indio_dev,
>  	pm_runtime_get_sync(data->dev);
>  	ret = bmp280_write_raw_impl(indio_dev, chan, val, val2, mask);
>  	pm_runtime_mark_last_busy(data->dev);
> -	pm_runtime_put_autosuspend(data->dev);
> +	__pm_runtime_put_autosuspend(data->dev);
>  
>  	return ret;
>  }
> @@ -1960,7 +1960,7 @@ static int bmp580_nvmem_read(void *priv, unsigned int offset, void *val,
>  	pm_runtime_get_sync(data->dev);
>  	ret = bmp580_nvmem_read_impl(priv, offset, val, bytes);
>  	pm_runtime_mark_last_busy(data->dev);
> -	pm_runtime_put_autosuspend(data->dev);
> +	__pm_runtime_put_autosuspend(data->dev);
>  
>  	return ret;
>  }
> @@ -2035,7 +2035,7 @@ static int bmp580_nvmem_write(void *priv, unsigned int offset, void *val,
>  	pm_runtime_get_sync(data->dev);
>  	ret = bmp580_nvmem_write_impl(priv, offset, val, bytes);
>  	pm_runtime_mark_last_busy(data->dev);
> -	pm_runtime_put_autosuspend(data->dev);
> +	__pm_runtime_put_autosuspend(data->dev);
>  
>  	return ret;
>  }
> @@ -2641,7 +2641,7 @@ static int bmp280_buffer_postdisable(struct iio_dev *indio_dev)
>  	struct bmp280_data *data = iio_priv(indio_dev);
>  
>  	pm_runtime_mark_last_busy(data->dev);
> -	pm_runtime_put_autosuspend(data->dev);
> +	__pm_runtime_put_autosuspend(data->dev);
>  
>  	return 0;
>  }
> diff --git a/drivers/iio/pressure/icp10100.c b/drivers/iio/pressure/icp10100.c
> index 3e0bf5d31ad7..866381bb1452 100644
> --- a/drivers/iio/pressure/icp10100.c
> +++ b/drivers/iio/pressure/icp10100.c
> @@ -267,7 +267,7 @@ static int icp10100_get_measures(struct icp10100_state *st,
>  
>  	pm_runtime_mark_last_busy(&st->client->dev);
>  error_measure:
> -	pm_runtime_put_autosuspend(&st->client->dev);
> +	__pm_runtime_put_autosuspend(&st->client->dev);
>  	return ret;
>  }
>  
> diff --git a/drivers/iio/pressure/mpl115.c b/drivers/iio/pressure/mpl115.c
> index 02ea38c8a3e4..70b711b16e52 100644
> --- a/drivers/iio/pressure/mpl115.c
> +++ b/drivers/iio/pressure/mpl115.c
> @@ -109,7 +109,7 @@ static int mpl115_read_raw(struct iio_dev *indio_dev,
>  		if (ret < 0)
>  			return ret;
>  		pm_runtime_mark_last_busy(data->dev);
> -		pm_runtime_put_autosuspend(data->dev);
> +		__pm_runtime_put_autosuspend(data->dev);
>  
>  		return IIO_VAL_INT_PLUS_MICRO;
>  	case IIO_CHAN_INFO_RAW:
> @@ -119,7 +119,7 @@ static int mpl115_read_raw(struct iio_dev *indio_dev,
>  		if (ret < 0)
>  			return ret;
>  		pm_runtime_mark_last_busy(data->dev);
> -		pm_runtime_put_autosuspend(data->dev);
> +		__pm_runtime_put_autosuspend(data->dev);
>  		*val = ret >> 6;
>  
>  		return IIO_VAL_INT;
> diff --git a/drivers/iio/pressure/zpa2326.c b/drivers/iio/pressure/zpa2326.c
> index 950f8dee2b26..7274855d0297 100644
> --- a/drivers/iio/pressure/zpa2326.c
> +++ b/drivers/iio/pressure/zpa2326.c
> @@ -698,7 +698,7 @@ static void zpa2326_suspend(struct iio_dev *indio_dev)
>  	zpa2326_sleep(indio_dev);
>  
>  	pm_runtime_mark_last_busy(parent);
> -	pm_runtime_put_autosuspend(parent);
> +	__pm_runtime_put_autosuspend(parent);
>  }
>  
>  static void zpa2326_init_runtime(struct device *parent)
> @@ -709,7 +709,7 @@ static void zpa2326_init_runtime(struct device *parent)
>  	pm_runtime_set_autosuspend_delay(parent, 1000);
>  	pm_runtime_use_autosuspend(parent);
>  	pm_runtime_mark_last_busy(parent);
> -	pm_runtime_put_autosuspend(parent);
> +	__pm_runtime_put_autosuspend(parent);
>  }
>  
>  static void zpa2326_fini_runtime(struct device *parent)
> diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> index 5c959730aecd..6be27497d6e3 100644
> --- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> +++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> @@ -192,7 +192,7 @@ static int lidar_get_measurement(struct lidar_data *data, u16 *reg)
>  		ret = -EIO;
>  	}
>  	pm_runtime_mark_last_busy(&client->dev);
> -	pm_runtime_put_autosuspend(&client->dev);
> +	__pm_runtime_put_autosuspend(&client->dev);
>  
>  	return ret;
>  }
> diff --git a/drivers/iio/proximity/srf04.c b/drivers/iio/proximity/srf04.c
> index 86c57672fc7e..ecea2671ce62 100644
> --- a/drivers/iio/proximity/srf04.c
> +++ b/drivers/iio/proximity/srf04.c
> @@ -119,7 +119,7 @@ static int srf04_read(struct srf04_data *data)
>  
>  	if (data->gpiod_power) {
>  		pm_runtime_mark_last_busy(data->dev);
> -		pm_runtime_put_autosuspend(data->dev);
> +		__pm_runtime_put_autosuspend(data->dev);
>  	}
>  
>  	/* it should not take more than 20 ms until echo is rising */
> diff --git a/drivers/iio/temperature/mlx90614.c b/drivers/iio/temperature/mlx90614.c
> index 740018d4b3df..22bed79589d1 100644
> --- a/drivers/iio/temperature/mlx90614.c
> +++ b/drivers/iio/temperature/mlx90614.c
> @@ -212,7 +212,7 @@ static int mlx90614_power_get(struct mlx90614_data *data, bool startup)
>  		if (time_before(now, data->ready_timestamp) &&
>  		    msleep_interruptible(jiffies_to_msecs(
>  				data->ready_timestamp - now)) != 0) {
> -			pm_runtime_put_autosuspend(&data->client->dev);
> +			__pm_runtime_put_autosuspend(&data->client->dev);
>  			return -EINTR;
>  		}
>  	}
> @@ -226,7 +226,7 @@ static void mlx90614_power_put(struct mlx90614_data *data)
>  		return;
>  
>  	pm_runtime_mark_last_busy(&data->client->dev);
> -	pm_runtime_put_autosuspend(&data->client->dev);
> +	__pm_runtime_put_autosuspend(&data->client->dev);
>  }
>  #else
>  static inline int mlx90614_power_get(struct mlx90614_data *data, bool startup)
> diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
> index ae4ea587e7f9..c8cea6a4f390 100644
> --- a/drivers/iio/temperature/mlx90632.c
> +++ b/drivers/iio/temperature/mlx90632.c
> @@ -1044,7 +1044,7 @@ static int mlx90632_read_raw(struct iio_dev *indio_dev,
>  
>  mlx90632_read_raw_pm:
>  	pm_runtime_mark_last_busy(&data->client->dev);
> -	pm_runtime_put_autosuspend(&data->client->dev);
> +	__pm_runtime_put_autosuspend(&data->client->dev);
>  	return ret;
>  }
>  
> @@ -1273,7 +1273,7 @@ static int mlx90632_probe(struct i2c_client *client)
>  
>  	pm_runtime_set_autosuspend_delay(&client->dev, MLX90632_SLEEP_DELAY_MS);
>  	pm_runtime_use_autosuspend(&client->dev);
> -	pm_runtime_put_autosuspend(&client->dev);
> +	__pm_runtime_put_autosuspend(&client->dev);
>  
>  	return devm_iio_device_register(&client->dev, indio_dev);
>  }
> diff --git a/drivers/iio/temperature/mlx90635.c b/drivers/iio/temperature/mlx90635.c
> index f7f88498ba0e..77ea81aa5c9e 100644
> --- a/drivers/iio/temperature/mlx90635.c
> +++ b/drivers/iio/temperature/mlx90635.c
> @@ -750,7 +750,7 @@ static int mlx90635_read_raw(struct iio_dev *indio_dev,
>  
>  mlx90635_read_raw_pm:
>  	pm_runtime_mark_last_busy(&data->client->dev);
> -	pm_runtime_put_autosuspend(&data->client->dev);
> +	__pm_runtime_put_autosuspend(&data->client->dev);
>  	return ret;
>  }
>  
> @@ -1023,7 +1023,7 @@ static int mlx90635_probe(struct i2c_client *client)
>  
>  	pm_runtime_set_autosuspend_delay(&client->dev, MLX90635_SLEEP_DELAY_MS);
>  	pm_runtime_use_autosuspend(&client->dev);
> -	pm_runtime_put_autosuspend(&client->dev);
> +	__pm_runtime_put_autosuspend(&client->dev);
>  
>  	return devm_iio_device_register(&client->dev, indio_dev);
>  }


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 31/51] nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 31/51] nfc: trf7970a: " Sakari Ailus
@ 2024-10-04 14:05   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 122+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-04 14:05 UTC (permalink / raw)
  To: Sakari Ailus, Mark Greer; +Cc: linux-wireless, netdev

On 04/10/2024 11:41, Sakari Ailus wrote:
> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to

Please do not use "This commit/patch/change", but imperative mood. See
longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/nfc/trf7970a.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
> index 9e1a34e23af2..4549f1960a27 100644
> --- a/drivers/nfc/trf7970a.c
> +++ b/drivers/nfc/trf7970a.c
> @@ -1093,7 +1093,7 @@ static void trf7970a_switch_rf_off(struct trf7970a *trf)
>  	trf->state = TRF7970A_ST_RF_OFF;
>  
>  	pm_runtime_mark_last_busy(trf->dev);
> -	pm_runtime_put_autosuspend(trf->dev);
> +	__pm_runtime_put_autosuspend(trf->dev);

But why? Nothing in commit msg explains why you cannot use the new API here.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 46/51] w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 46/51] w1: omap-hdq: " Sakari Ailus
@ 2024-10-04 14:05   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 122+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-04 14:05 UTC (permalink / raw)
  To: Sakari Ailus, Uwe Kleine-König; +Cc: linux-kernel

On 04/10/2024 11:41, Sakari Ailus wrote:
> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/w1/masters/omap_hdq.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
> index d1cb5190445a..b7e87a3ef62d 100644
> --- a/drivers/w1/masters/omap_hdq.c
> +++ b/drivers/w1/masters/omap_hdq.c
> @@ -446,7 +446,7 @@ static u8 omap_w1_triplet(void *_hdq, u8 bdir)
>  	mutex_unlock(&hdq_data->hdq_mutex);
>  rtn:
>  	pm_runtime_mark_last_busy(hdq_data->dev);
> -	pm_runtime_put_autosuspend(hdq_data->dev);
> +	__pm_runtime_put_autosuspend(hdq_data->dev);

So just make the switch by dropping pm_runtime_mark_last_busy(). This is
unnecessary churn.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` Sakari Ailus
  (?)
  (?)
@ 2024-10-04 14:38   ` Ulf Hansson
  -1 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-04 14:38 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	laurent.pinchart, rafael, Andy Shevchenko

On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
>
> Hello everyone,
>
> This set will switch the users of pm_runtime_put_autosuspend() to
> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> to include a call to pm_runtime_mark_last_busy(). The two are almost
> always used together, apart from bugs which are likely common. Going
> forward, most new users should be using pm_runtime_put_autosuspend().
>
> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> and pm_runtime_mark_last_busy().

That sounds like it could cause a lot of churns.

Why not add a new helper function that does the
pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
things? Then we can start moving users over to this new interface,
rather than having this intermediate step?

Kind regards
Uffe

>
> The diff in these patches have been generated using the following
> Coccinelle script (besides a manual change in
> drivers/iio/magnetometer/af8133j.c):
>
> ----------8<-------------------
> @@
> expression E1;
>
> @@
>
> - pm_runtime_put_autosuspend(E1)
> + __pm_runtime_put_autosuspend(E1)
> ----------8<-------------------
>
> These patches are on top of today's linux-next (i.e. next-20241004).
>
> Sakari Ailus (51):
>   accel/ivpu: Switch to __pm_runtime_put_autosuspend()
>   bluetooth: Switch to __pm_runtime_put_autosuspend()
>   bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
>   hwrng: Switch to __pm_runtime_put_autosuspend()
>   clk: Switch to __pm_runtime_put_autosuspend()
>   crypto: Switch to __pm_runtime_put_autosuspend()
>   dmaengine: Switch to __pm_runtime_put_autosuspend()
>   gpio: Switch to __pm_runtime_put_autosuspend()
>   drm/amd: Switch to __pm_runtime_put_autosuspend()
>   drm/nouveau: Switch to __pm_runtime_put_autosuspend()
>   drm/radeon: Switch to __pm_runtime_put_autosuspend()
>   drm/panfrost: Switch to __pm_runtime_put_autosuspend()
>   drivers: drm: Switch to __pm_runtime_put_autosuspend()
>   HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
>   stm class: Switch to __pm_runtime_put_autosuspend()
>   i2c: Switch to __pm_runtime_put_autosuspend()
>   i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
>   i3c: dw: Switch to __pm_runtime_put_autosuspend()
>   iio: Switch to __pm_runtime_put_autosuspend()
>   Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
>   Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
>   iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
>   irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
>   mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
>   media: Switch to __pm_runtime_put_autosuspend()
>   mfd: Switch to __pm_runtime_put_autosuspend()
>   mei: Switch to __pm_runtime_put_autosuspend()
>   mmc: Switch to __pm_runtime_put_autosuspend()
>   mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
>   net: Switch to __pm_runtime_put_autosuspend()
>   nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
>   PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
>   phy: motorola: phy-mapphone-mdm6600: Switch to
>     __pm_runtime_put_autosuspend()
>   phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
>   power: Switch to __pm_runtime_put_autosuspend()
>   pwm: img: Switch to __pm_runtime_put_autosuspend()
>   regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
>   remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
>   slimbus: Switch to __pm_runtime_put_autosuspend()
>   soundwire: Switch to __pm_runtime_put_autosuspend()
>   spi: Switch to __pm_runtime_put_autosuspend()
>   staging: Switch to __pm_runtime_put_autosuspend()
>   thunderbolt: Switch to __pm_runtime_put_autosuspend()
>   serial: Switch to __pm_runtime_put_autosuspend()
>   usb: Switch to __pm_runtime_put_autosuspend()
>   w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
>   staging: greybus: Switch to __pm_runtime_put_autosuspend()
>   ALSA: hda: Switch to __pm_runtime_put_autosuspend()
>   ASoC: Switch to __pm_runtime_put_autosuspend()
>   ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
>   soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()
>
>  drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
>  drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
>  drivers/bluetooth/btmtksdio.c                 |   2 +-
>  drivers/bluetooth/hci_bcm.c                   |   6 +-
>  drivers/bluetooth/hci_h5.c                    |   4 +-
>  drivers/bluetooth/hci_intel.c                 |   6 +-
>  drivers/bus/sunxi-rsb.c                       |   4 +-
>  drivers/char/hw_random/cctrng.c               |   2 +-
>  drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
>  drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
>  drivers/clk/imx/clk-scu.c                     |   2 +-
>  drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
>  drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
>  drivers/crypto/ccree/cc_pm.c                  |   2 +-
>  drivers/crypto/hisilicon/qm.c                 |   2 +-
>  drivers/crypto/omap-aes-gcm.c                 |   2 +-
>  drivers/crypto/omap-aes.c                     |   2 +-
>  drivers/crypto/omap-des.c                     |   2 +-
>  drivers/crypto/omap-sham.c                    |   2 +-
>  drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
>  .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
>  drivers/crypto/stm32/stm32-crc32.c            |   4 +-
>  drivers/crypto/stm32/stm32-cryp.c             |   2 +-
>  drivers/crypto/stm32/stm32-hash.c             |   2 +-
>  drivers/dma/at_xdmac.c                        |  24 +--
>  drivers/dma/pl330.c                           |  14 +-
>  drivers/dma/qcom/bam_dma.c                    |  10 +-
>  drivers/dma/qcom/hidma.c                      |  18 +-
>  drivers/dma/qcom/hidma_dbg.c                  |   2 +-
>  drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
>  drivers/dma/ste_dma40.c                       |  16 +-
>  drivers/dma/ti/cppi41.c                       |  10 +-
>  drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
>  drivers/gpio/gpio-arizona.c                   |  10 +-
>  drivers/gpio/gpio-mxc.c                       |   2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
>  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
>  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
>  .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
>  drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
>  .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
>  drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
>  drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
>  drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
>  drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
>  drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
>  drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
>  drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
>  drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
>  drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
>  drivers/gpu/drm/lima/lima_sched.c             |   2 +-
>  drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
>  drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
>  drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
>  drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
>  drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
>  drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
>  drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
>  drivers/gpu/drm/panel/panel-edp.c             |   8 +-
>  .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
>  drivers/gpu/drm/panel/panel-simple.c          |   6 +-
>  drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
>  drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
>  drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
>  drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
>  drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
>  drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
>  drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
>  drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
>  drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
>  drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
>  drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
>  drivers/gpu/drm/tegra/submit.c                |   2 +-
>  drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
>  drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
>  drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
>  drivers/hwtracing/stm/core.c                  |   8 +-
>  drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
>  drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
>  drivers/i2c/busses/i2c-at91-master.c          |   2 +-
>  drivers/i2c/busses/i2c-cadence.c              |   2 +-
>  drivers/i2c/busses/i2c-davinci.c              |   4 +-
>  drivers/i2c/busses/i2c-designware-master.c    |   2 +-
>  drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
>  drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
>  drivers/i2c/busses/i2c-i801.c                 |   4 +-
>  drivers/i2c/busses/i2c-img-scb.c              |   6 +-
>  drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
>  drivers/i2c/busses/i2c-imx.c                  |   4 +-
>  drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
>  drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
>  drivers/i2c/busses/i2c-omap.c                 |   6 +-
>  drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
>  drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
>  drivers/i2c/busses/i2c-qup.c                  |   4 +-
>  drivers/i2c/busses/i2c-riic.c                 |   4 +-
>  drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
>  drivers/i2c/busses/i2c-sprd.c                 |   4 +-
>  drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
>  drivers/i2c/busses/i2c-xiic.c                 |   2 +-
>  drivers/i3c/master/dw-i3c-master.c            |  16 +-
>  drivers/i3c/master/svc-i3c-master.c           |  16 +-
>  drivers/iio/accel/bmc150-accel-core.c         |   2 +-
>  drivers/iio/accel/bmi088-accel-core.c         |   6 +-
>  drivers/iio/accel/fxls8962af-core.c           |   2 +-
>  drivers/iio/accel/kxcjk-1013.c                |   2 +-
>  drivers/iio/accel/kxsd9.c                     |   6 +-
>  drivers/iio/accel/mma8452.c                   |   2 +-
>  drivers/iio/accel/mma9551_core.c              |   2 +-
>  drivers/iio/accel/msa311.c                    |  12 +-
>  drivers/iio/adc/ab8500-gpadc.c                |   2 +-
>  drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
>  drivers/iio/adc/rcar-gyroadc.c                |   2 +-
>  drivers/iio/adc/stm32-adc-core.c              |   2 +-
>  drivers/iio/adc/stm32-adc.c                   |  12 +-
>  drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
>  drivers/iio/adc/ti-ads1015.c                  |   2 +-
>  drivers/iio/adc/ti-ads1100.c                  |   2 +-
>  drivers/iio/adc/ti-ads1119.c                  |   4 +-
>  drivers/iio/chemical/atlas-sensor.c           |   4 +-
>  .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
>  drivers/iio/dac/stm32-dac.c                   |   6 +-
>  drivers/iio/gyro/bmg160_core.c                |   2 +-
>  drivers/iio/gyro/fxas21002c_core.c            |   2 +-
>  drivers/iio/gyro/mpu3050-core.c               |   6 +-
>  drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
>  .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
>  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
>  drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
>  drivers/iio/imu/kmx61.c                       |   2 +-
>  drivers/iio/light/apds9306.c                  |   6 +-
>  drivers/iio/light/apds9960.c                  |   4 +-
>  drivers/iio/light/bh1780.c                    |   2 +-
>  drivers/iio/light/gp2ap002.c                  |   4 +-
>  drivers/iio/light/isl29028.c                  |   2 +-
>  drivers/iio/light/ltrf216a.c                  |   2 +-
>  drivers/iio/light/pa12203001.c                |   2 +-
>  drivers/iio/light/rpr0521.c                   |   2 +-
>  drivers/iio/light/tsl2583.c                   |   2 +-
>  drivers/iio/light/tsl2591.c                   |   4 +-
>  drivers/iio/light/us5182d.c                   |   2 +-
>  drivers/iio/light/vcnl4000.c                  |   2 +-
>  drivers/iio/light/vcnl4035.c                  |   2 +-
>  drivers/iio/magnetometer/af8133j.c            |   4 +-
>  drivers/iio/magnetometer/ak8974.c             |   4 +-
>  drivers/iio/magnetometer/ak8975.c             |   2 +-
>  drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
>  drivers/iio/magnetometer/tmag5273.c           |   4 +-
>  drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
>  drivers/iio/pressure/bmp280-core.c            |  10 +-
>  drivers/iio/pressure/icp10100.c               |   2 +-
>  drivers/iio/pressure/mpl115.c                 |   4 +-
>  drivers/iio/pressure/zpa2326.c                |   4 +-
>  .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
>  drivers/iio/proximity/srf04.c                 |   2 +-
>  drivers/iio/temperature/mlx90614.c            |   4 +-
>  drivers/iio/temperature/mlx90632.c            |   4 +-
>  drivers/iio/temperature/mlx90635.c            |   4 +-
>  drivers/input/keyboard/omap4-keypad.c         |   8 +-
>  drivers/input/misc/cs40l50-vibra.c            |   8 +-
>  drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
>  drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
>  drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
>  drivers/media/i2c/alvium-csi2.c               |   2 +-
>  drivers/media/i2c/ccs/ccs-core.c              |  10 +-
>  drivers/media/i2c/dw9719.c                    |   2 +-
>  drivers/media/i2c/gc0308.c                    |   6 +-
>  drivers/media/i2c/gc2145.c                    |   8 +-
>  drivers/media/i2c/imx283.c                    |   6 +-
>  drivers/media/i2c/imx290.c                    |   6 +-
>  drivers/media/i2c/imx296.c                    |   4 +-
>  drivers/media/i2c/imx415.c                    |   4 +-
>  drivers/media/i2c/mt9m114.c                   |  12 +-
>  drivers/media/i2c/ov2680.c                    |   2 +-
>  drivers/media/i2c/ov4689.c                    |   6 +-
>  drivers/media/i2c/ov5640.c                    |   8 +-
>  drivers/media/i2c/ov5645.c                    |   6 +-
>  drivers/media/i2c/ov5693.c                    |   2 +-
>  drivers/media/i2c/ov64a40.c                   |   8 +-
>  drivers/media/i2c/ov7251.c                    |   2 +-
>  drivers/media/i2c/ov8858.c                    |   4 +-
>  drivers/media/i2c/thp7312.c                   |   8 +-
>  drivers/media/i2c/video-i2c.c                 |   8 +-
>  .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
>  drivers/media/platform/qcom/venus/vdec.c      |   4 +-
>  drivers/media/platform/qcom/venus/venc.c      |   4 +-
>  .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
>  .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
>  drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
>  .../media/platform/verisilicon/hantro_drv.c   |   2 +-
>  drivers/media/rc/gpio-ir-recv.c               |   2 +-
>  drivers/mfd/arizona-irq.c                     |   2 +-
>  drivers/mfd/cs40l50-core.c                    |   2 +-
>  drivers/mfd/cs42l43.c                         |   2 +-
>  drivers/misc/mei/client.c                     |  14 +-
>  drivers/mmc/core/core.c                       |   4 +-
>  drivers/mmc/host/atmel-mci.c                  |   4 +-
>  drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
>  drivers/mmc/host/dw_mmc.c                     |   2 +-
>  drivers/mmc/host/mmci.c                       |   2 +-
>  drivers/mmc/host/omap_hsmmc.c                 |   6 +-
>  drivers/mmc/host/sdhci-msm.c                  |   2 +-
>  drivers/mmc/host/sdhci-of-at91.c              |   2 +-
>  drivers/mmc/host/sdhci-omap.c                 |   4 +-
>  drivers/mmc/host/sdhci-pci-core.c             |   2 +-
>  drivers/mmc/host/sdhci-pxav3.c                |   6 +-
>  drivers/mmc/host/sdhci-sprd.c                 |   2 +-
>  drivers/mmc/host/sdhci-xenon.c                |   2 +-
>  drivers/mmc/host/sdhci_am654.c                |   2 +-
>  drivers/mmc/host/tmio_mmc_core.c              |   2 +-
>  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
>  drivers/net/ethernet/cadence/macb_main.c      |  10 +-
>  drivers/net/ethernet/freescale/fec_main.c     |  16 +-
>  drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
>  drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
>  drivers/net/ipa/ipa_interrupt.c               |   2 +-
>  drivers/net/ipa/ipa_main.c                    |   2 +-
>  drivers/net/ipa/ipa_modem.c                   |   8 +-
>  drivers/net/ipa/ipa_smp2p.c                   |   4 +-
>  drivers/net/ipa/ipa_uc.c                      |   4 +-
>  drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
>  drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
>  drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
>  drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
>  drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
>  drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
>  drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
>  drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
>  drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
>  drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
>  drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
>  drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
>  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
>  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
>  drivers/nfc/trf7970a.c                        |   2 +-
>  drivers/pci/pcie/portdrv.c                    |   2 +-
>  drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
>  drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
>  drivers/power/supply/bq24190_charger.c        |  28 +--
>  drivers/power/supply/twl4030_charger.c        |   2 +-
>  drivers/pwm/pwm-img.c                         |   4 +-
>  drivers/regulator/stm32-vrefbuf.c             |  12 +-
>  drivers/remoteproc/omap_remoteproc.c          |   6 +-
>  drivers/slimbus/core.c                        |   2 +-
>  drivers/slimbus/messaging.c                   |   4 +-
>  drivers/soc/apple/mailbox.c                   |   2 +-
>  drivers/soundwire/bus.c                       |   2 +-
>  drivers/soundwire/cadence_master.c            |   2 +-
>  drivers/soundwire/qcom.c                      |   6 +-
>  drivers/spi/atmel-quadspi.c                   |  10 +-
>  drivers/spi/spi-cadence-quadspi.c             |   4 +-
>  drivers/spi/spi-cadence.c                     |   2 +-
>  drivers/spi/spi-dw-pci.c                      |   2 +-
>  drivers/spi/spi-fsl-espi.c                    |   4 +-
>  drivers/spi/spi-fsl-lpspi.c                   |   4 +-
>  drivers/spi/spi-imx.c                         |   6 +-
>  drivers/spi/spi-mtk-nor.c                     |   2 +-
>  drivers/spi/spi-omap2-mcspi.c                 |   6 +-
>  drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
>  drivers/spi/spi-s3c64xx.c                     |   6 +-
>  drivers/spi/spi-sprd.c                        |   2 +-
>  drivers/spi/spi-stm32-qspi.c                  |  14 +-
>  drivers/spi/spi-stm32.c                       |   4 +-
>  drivers/spi/spi-ti-qspi.c                     |   4 +-
>  drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
>  drivers/spi/spi.c                             |   6 +-
>  drivers/staging/greybus/gbphy.h               |   2 +-
>  drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
>  drivers/thunderbolt/debugfs.c                 |  22 +--
>  drivers/thunderbolt/domain.c                  |   4 +-
>  drivers/thunderbolt/icm.c                     |  14 +-
>  drivers/thunderbolt/nhi.c                     |   2 +-
>  drivers/thunderbolt/retimer.c                 |   4 +-
>  drivers/thunderbolt/switch.c                  |   6 +-
>  drivers/thunderbolt/tb.c                      |  18 +-
>  drivers/thunderbolt/usb4_port.c               |   4 +-
>  drivers/tty/serial/8250/8250_omap.c           |  18 +-
>  drivers/tty/serial/8250/8250_port.c           |   4 +-
>  drivers/tty/serial/fsl_lpuart.c               |   2 +-
>  drivers/tty/serial/serial_core.c              |   2 +-
>  drivers/tty/serial/uartlite.c                 |   4 +-
>  drivers/tty/serial/xilinx_uartps.c            |   2 +-
>  drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
>  drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
>  drivers/usb/chipidea/core.c                   |   2 +-
>  drivers/usb/chipidea/otg_fsm.c                |   2 +-
>  drivers/usb/dwc3/core.c                       |   2 +-
>  drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
>  drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
>  drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
>  drivers/usb/host/xhci-mtk.c                   |   2 +-
>  drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
>  drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
>  drivers/usb/musb/musb_core.c                  |  10 +-
>  drivers/usb/musb/musb_debugfs.c               |  10 +-
>  drivers/usb/musb/musb_dsps.c                  |   2 +-
>  drivers/usb/musb/musb_gadget.c                |   8 +-
>  drivers/usb/musb/omap2430.c                   |   2 +-
>  drivers/w1/masters/omap_hdq.c                 |  10 +-
>  include/linux/greybus/bundle.h                |   2 +-
>  sound/hda/hdac_device.c                       |   2 +-
>  sound/pci/hda/cs35l41_hda.c                   |   8 +-
>  sound/pci/hda/cs35l56_hda.c                   |   2 +-
>  sound/pci/hda/hda_intel.c                     |   2 +-
>  sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
>  sound/soc/atmel/mchp-spdifrx.c                |  12 +-
>  sound/soc/codecs/arizona-jack.c               |  12 +-
>  sound/soc/codecs/arizona.c                    |   2 +-
>  sound/soc/codecs/cs35l41.c                    |   4 +-
>  sound/soc/codecs/cs35l45.c                    |   2 +-
>  sound/soc/codecs/cs35l56-sdw.c                |   4 +-
>  sound/soc/codecs/cs35l56-shared.c             |   2 +-
>  sound/soc/codecs/cs35l56.c                    |   2 +-
>  sound/soc/codecs/cs42l42-sdw.c                |   2 +-
>  sound/soc/codecs/cs42l42.c                    |   4 +-
>  sound/soc/codecs/cs42l43-jack.c               |  10 +-
>  sound/soc/codecs/cs42l43.c                    |   4 +-
>  sound/soc/codecs/hda.c                        |   6 +-
>  sound/soc/codecs/madera.c                     |   6 +-
>  sound/soc/codecs/max98363.c                   |   2 +-
>  sound/soc/codecs/max98373-sdw.c               |   2 +-
>  sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
>  sound/soc/codecs/rt1308-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1316-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1318-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1320-sdw.c                 |   2 +-
>  sound/soc/codecs/rt5682-sdw.c                 |   2 +-
>  sound/soc/codecs/rt700.c                      |   4 +-
>  sound/soc/codecs/rt711-sdca.c                 |   4 +-
>  sound/soc/codecs/rt711.c                      |   4 +-
>  sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
>  sound/soc/codecs/rt712-sdca.c                 |   4 +-
>  sound/soc/codecs/rt715-sdca.c                 |   2 +-
>  sound/soc/codecs/rt715.c                      |   2 +-
>  sound/soc/codecs/rt722-sdca.c                 |   4 +-
>  sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
>  sound/soc/codecs/wsa881x.c                    |   2 +-
>  sound/soc/codecs/wsa884x.c                    |   2 +-
>  sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
>  sound/soc/intel/avs/core.c                    |   2 +-
>  sound/soc/intel/avs/debugfs.c                 |   4 +-
>  sound/soc/intel/avs/pcm.c                     |   2 +-
>  sound/soc/intel/catpt/pcm.c                   |  12 +-
>  sound/soc/intel/catpt/sysfs.c                 |   2 +-
>  sound/soc/soc-component.c                     |   2 +-
>  sound/soc/sof/control.c                       |   2 +-
>  sound/soc/sof/debug.c                         |   2 +-
>  sound/soc/sof/ipc3-dtrace.c                   |   2 +-
>  sound/soc/sof/ipc4-loader.c                   |   2 +-
>  sound/soc/sof/pcm.c                           |   2 +-
>  sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
>  .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
>  sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
>  sound/soc/sof/sof-client-probes.c             |   6 +-
>  sound/x86/intel_hdmi_audio.c                  |   6 +-
>  373 files changed, 1076 insertions(+), 1076 deletions(-)
>
> --
> 2.39.5
>
>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-04 14:38   ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-04 14:38 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	laurent.pinchart, rafael, Andy Shevchenko

On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
>
> Hello everyone,
>
> This set will switch the users of pm_runtime_put_autosuspend() to
> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> to include a call to pm_runtime_mark_last_busy(). The two are almost
> always used together, apart from bugs which are likely common. Going
> forward, most new users should be using pm_runtime_put_autosuspend().
>
> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> and pm_runtime_mark_last_busy().

That sounds like it could cause a lot of churns.

Why not add a new helper function that does the
pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
things? Then we can start moving users over to this new interface,
rather than having this intermediate step?

Kind regards
Uffe

>
> The diff in these patches have been generated using the following
> Coccinelle script (besides a manual change in
> drivers/iio/magnetometer/af8133j.c):
>
> ----------8<-------------------
> @@
> expression E1;
>
> @@
>
> - pm_runtime_put_autosuspend(E1)
> + __pm_runtime_put_autosuspend(E1)
> ----------8<-------------------
>
> These patches are on top of today's linux-next (i.e. next-20241004).
>
> Sakari Ailus (51):
>   accel/ivpu: Switch to __pm_runtime_put_autosuspend()
>   bluetooth: Switch to __pm_runtime_put_autosuspend()
>   bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
>   hwrng: Switch to __pm_runtime_put_autosuspend()
>   clk: Switch to __pm_runtime_put_autosuspend()
>   crypto: Switch to __pm_runtime_put_autosuspend()
>   dmaengine: Switch to __pm_runtime_put_autosuspend()
>   gpio: Switch to __pm_runtime_put_autosuspend()
>   drm/amd: Switch to __pm_runtime_put_autosuspend()
>   drm/nouveau: Switch to __pm_runtime_put_autosuspend()
>   drm/radeon: Switch to __pm_runtime_put_autosuspend()
>   drm/panfrost: Switch to __pm_runtime_put_autosuspend()
>   drivers: drm: Switch to __pm_runtime_put_autosuspend()
>   HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
>   stm class: Switch to __pm_runtime_put_autosuspend()
>   i2c: Switch to __pm_runtime_put_autosuspend()
>   i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
>   i3c: dw: Switch to __pm_runtime_put_autosuspend()
>   iio: Switch to __pm_runtime_put_autosuspend()
>   Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
>   Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
>   iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
>   irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
>   mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
>   media: Switch to __pm_runtime_put_autosuspend()
>   mfd: Switch to __pm_runtime_put_autosuspend()
>   mei: Switch to __pm_runtime_put_autosuspend()
>   mmc: Switch to __pm_runtime_put_autosuspend()
>   mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
>   net: Switch to __pm_runtime_put_autosuspend()
>   nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
>   PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
>   phy: motorola: phy-mapphone-mdm6600: Switch to
>     __pm_runtime_put_autosuspend()
>   phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
>   power: Switch to __pm_runtime_put_autosuspend()
>   pwm: img: Switch to __pm_runtime_put_autosuspend()
>   regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
>   remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
>   slimbus: Switch to __pm_runtime_put_autosuspend()
>   soundwire: Switch to __pm_runtime_put_autosuspend()
>   spi: Switch to __pm_runtime_put_autosuspend()
>   staging: Switch to __pm_runtime_put_autosuspend()
>   thunderbolt: Switch to __pm_runtime_put_autosuspend()
>   serial: Switch to __pm_runtime_put_autosuspend()
>   usb: Switch to __pm_runtime_put_autosuspend()
>   w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
>   staging: greybus: Switch to __pm_runtime_put_autosuspend()
>   ALSA: hda: Switch to __pm_runtime_put_autosuspend()
>   ASoC: Switch to __pm_runtime_put_autosuspend()
>   ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
>   soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()
>
>  drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
>  drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
>  drivers/bluetooth/btmtksdio.c                 |   2 +-
>  drivers/bluetooth/hci_bcm.c                   |   6 +-
>  drivers/bluetooth/hci_h5.c                    |   4 +-
>  drivers/bluetooth/hci_intel.c                 |   6 +-
>  drivers/bus/sunxi-rsb.c                       |   4 +-
>  drivers/char/hw_random/cctrng.c               |   2 +-
>  drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
>  drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
>  drivers/clk/imx/clk-scu.c                     |   2 +-
>  drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
>  drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
>  drivers/crypto/ccree/cc_pm.c                  |   2 +-
>  drivers/crypto/hisilicon/qm.c                 |   2 +-
>  drivers/crypto/omap-aes-gcm.c                 |   2 +-
>  drivers/crypto/omap-aes.c                     |   2 +-
>  drivers/crypto/omap-des.c                     |   2 +-
>  drivers/crypto/omap-sham.c                    |   2 +-
>  drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
>  .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
>  drivers/crypto/stm32/stm32-crc32.c            |   4 +-
>  drivers/crypto/stm32/stm32-cryp.c             |   2 +-
>  drivers/crypto/stm32/stm32-hash.c             |   2 +-
>  drivers/dma/at_xdmac.c                        |  24 +--
>  drivers/dma/pl330.c                           |  14 +-
>  drivers/dma/qcom/bam_dma.c                    |  10 +-
>  drivers/dma/qcom/hidma.c                      |  18 +-
>  drivers/dma/qcom/hidma_dbg.c                  |   2 +-
>  drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
>  drivers/dma/ste_dma40.c                       |  16 +-
>  drivers/dma/ti/cppi41.c                       |  10 +-
>  drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
>  drivers/gpio/gpio-arizona.c                   |  10 +-
>  drivers/gpio/gpio-mxc.c                       |   2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
>  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
>  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
>  .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
>  drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
>  .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
>  drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
>  drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
>  drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
>  drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
>  drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
>  drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
>  drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
>  drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
>  drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
>  drivers/gpu/drm/lima/lima_sched.c             |   2 +-
>  drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
>  drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
>  drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
>  drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
>  drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
>  drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
>  drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
>  drivers/gpu/drm/panel/panel-edp.c             |   8 +-
>  .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
>  drivers/gpu/drm/panel/panel-simple.c          |   6 +-
>  drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
>  drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
>  drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
>  drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
>  drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
>  drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
>  drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
>  drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
>  drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
>  drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
>  drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
>  drivers/gpu/drm/tegra/submit.c                |   2 +-
>  drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
>  drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
>  drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
>  drivers/hwtracing/stm/core.c                  |   8 +-
>  drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
>  drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
>  drivers/i2c/busses/i2c-at91-master.c          |   2 +-
>  drivers/i2c/busses/i2c-cadence.c              |   2 +-
>  drivers/i2c/busses/i2c-davinci.c              |   4 +-
>  drivers/i2c/busses/i2c-designware-master.c    |   2 +-
>  drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
>  drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
>  drivers/i2c/busses/i2c-i801.c                 |   4 +-
>  drivers/i2c/busses/i2c-img-scb.c              |   6 +-
>  drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
>  drivers/i2c/busses/i2c-imx.c                  |   4 +-
>  drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
>  drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
>  drivers/i2c/busses/i2c-omap.c                 |   6 +-
>  drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
>  drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
>  drivers/i2c/busses/i2c-qup.c                  |   4 +-
>  drivers/i2c/busses/i2c-riic.c                 |   4 +-
>  drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
>  drivers/i2c/busses/i2c-sprd.c                 |   4 +-
>  drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
>  drivers/i2c/busses/i2c-xiic.c                 |   2 +-
>  drivers/i3c/master/dw-i3c-master.c            |  16 +-
>  drivers/i3c/master/svc-i3c-master.c           |  16 +-
>  drivers/iio/accel/bmc150-accel-core.c         |   2 +-
>  drivers/iio/accel/bmi088-accel-core.c         |   6 +-
>  drivers/iio/accel/fxls8962af-core.c           |   2 +-
>  drivers/iio/accel/kxcjk-1013.c                |   2 +-
>  drivers/iio/accel/kxsd9.c                     |   6 +-
>  drivers/iio/accel/mma8452.c                   |   2 +-
>  drivers/iio/accel/mma9551_core.c              |   2 +-
>  drivers/iio/accel/msa311.c                    |  12 +-
>  drivers/iio/adc/ab8500-gpadc.c                |   2 +-
>  drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
>  drivers/iio/adc/rcar-gyroadc.c                |   2 +-
>  drivers/iio/adc/stm32-adc-core.c              |   2 +-
>  drivers/iio/adc/stm32-adc.c                   |  12 +-
>  drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
>  drivers/iio/adc/ti-ads1015.c                  |   2 +-
>  drivers/iio/adc/ti-ads1100.c                  |   2 +-
>  drivers/iio/adc/ti-ads1119.c                  |   4 +-
>  drivers/iio/chemical/atlas-sensor.c           |   4 +-
>  .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
>  drivers/iio/dac/stm32-dac.c                   |   6 +-
>  drivers/iio/gyro/bmg160_core.c                |   2 +-
>  drivers/iio/gyro/fxas21002c_core.c            |   2 +-
>  drivers/iio/gyro/mpu3050-core.c               |   6 +-
>  drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
>  .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
>  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
>  drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
>  drivers/iio/imu/kmx61.c                       |   2 +-
>  drivers/iio/light/apds9306.c                  |   6 +-
>  drivers/iio/light/apds9960.c                  |   4 +-
>  drivers/iio/light/bh1780.c                    |   2 +-
>  drivers/iio/light/gp2ap002.c                  |   4 +-
>  drivers/iio/light/isl29028.c                  |   2 +-
>  drivers/iio/light/ltrf216a.c                  |   2 +-
>  drivers/iio/light/pa12203001.c                |   2 +-
>  drivers/iio/light/rpr0521.c                   |   2 +-
>  drivers/iio/light/tsl2583.c                   |   2 +-
>  drivers/iio/light/tsl2591.c                   |   4 +-
>  drivers/iio/light/us5182d.c                   |   2 +-
>  drivers/iio/light/vcnl4000.c                  |   2 +-
>  drivers/iio/light/vcnl4035.c                  |   2 +-
>  drivers/iio/magnetometer/af8133j.c            |   4 +-
>  drivers/iio/magnetometer/ak8974.c             |   4 +-
>  drivers/iio/magnetometer/ak8975.c             |   2 +-
>  drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
>  drivers/iio/magnetometer/tmag5273.c           |   4 +-
>  drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
>  drivers/iio/pressure/bmp280-core.c            |  10 +-
>  drivers/iio/pressure/icp10100.c               |   2 +-
>  drivers/iio/pressure/mpl115.c                 |   4 +-
>  drivers/iio/pressure/zpa2326.c                |   4 +-
>  .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
>  drivers/iio/proximity/srf04.c                 |   2 +-
>  drivers/iio/temperature/mlx90614.c            |   4 +-
>  drivers/iio/temperature/mlx90632.c            |   4 +-
>  drivers/iio/temperature/mlx90635.c            |   4 +-
>  drivers/input/keyboard/omap4-keypad.c         |   8 +-
>  drivers/input/misc/cs40l50-vibra.c            |   8 +-
>  drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
>  drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
>  drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
>  drivers/media/i2c/alvium-csi2.c               |   2 +-
>  drivers/media/i2c/ccs/ccs-core.c              |  10 +-
>  drivers/media/i2c/dw9719.c                    |   2 +-
>  drivers/media/i2c/gc0308.c                    |   6 +-
>  drivers/media/i2c/gc2145.c                    |   8 +-
>  drivers/media/i2c/imx283.c                    |   6 +-
>  drivers/media/i2c/imx290.c                    |   6 +-
>  drivers/media/i2c/imx296.c                    |   4 +-
>  drivers/media/i2c/imx415.c                    |   4 +-
>  drivers/media/i2c/mt9m114.c                   |  12 +-
>  drivers/media/i2c/ov2680.c                    |   2 +-
>  drivers/media/i2c/ov4689.c                    |   6 +-
>  drivers/media/i2c/ov5640.c                    |   8 +-
>  drivers/media/i2c/ov5645.c                    |   6 +-
>  drivers/media/i2c/ov5693.c                    |   2 +-
>  drivers/media/i2c/ov64a40.c                   |   8 +-
>  drivers/media/i2c/ov7251.c                    |   2 +-
>  drivers/media/i2c/ov8858.c                    |   4 +-
>  drivers/media/i2c/thp7312.c                   |   8 +-
>  drivers/media/i2c/video-i2c.c                 |   8 +-
>  .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
>  drivers/media/platform/qcom/venus/vdec.c      |   4 +-
>  drivers/media/platform/qcom/venus/venc.c      |   4 +-
>  .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
>  .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
>  drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
>  .../media/platform/verisilicon/hantro_drv.c   |   2 +-
>  drivers/media/rc/gpio-ir-recv.c               |   2 +-
>  drivers/mfd/arizona-irq.c                     |   2 +-
>  drivers/mfd/cs40l50-core.c                    |   2 +-
>  drivers/mfd/cs42l43.c                         |   2 +-
>  drivers/misc/mei/client.c                     |  14 +-
>  drivers/mmc/core/core.c                       |   4 +-
>  drivers/mmc/host/atmel-mci.c                  |   4 +-
>  drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
>  drivers/mmc/host/dw_mmc.c                     |   2 +-
>  drivers/mmc/host/mmci.c                       |   2 +-
>  drivers/mmc/host/omap_hsmmc.c                 |   6 +-
>  drivers/mmc/host/sdhci-msm.c                  |   2 +-
>  drivers/mmc/host/sdhci-of-at91.c              |   2 +-
>  drivers/mmc/host/sdhci-omap.c                 |   4 +-
>  drivers/mmc/host/sdhci-pci-core.c             |   2 +-
>  drivers/mmc/host/sdhci-pxav3.c                |   6 +-
>  drivers/mmc/host/sdhci-sprd.c                 |   2 +-
>  drivers/mmc/host/sdhci-xenon.c                |   2 +-
>  drivers/mmc/host/sdhci_am654.c                |   2 +-
>  drivers/mmc/host/tmio_mmc_core.c              |   2 +-
>  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
>  drivers/net/ethernet/cadence/macb_main.c      |  10 +-
>  drivers/net/ethernet/freescale/fec_main.c     |  16 +-
>  drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
>  drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
>  drivers/net/ipa/ipa_interrupt.c               |   2 +-
>  drivers/net/ipa/ipa_main.c                    |   2 +-
>  drivers/net/ipa/ipa_modem.c                   |   8 +-
>  drivers/net/ipa/ipa_smp2p.c                   |   4 +-
>  drivers/net/ipa/ipa_uc.c                      |   4 +-
>  drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
>  drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
>  drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
>  drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
>  drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
>  drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
>  drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
>  drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
>  drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
>  drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
>  drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
>  drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
>  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
>  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
>  drivers/nfc/trf7970a.c                        |   2 +-
>  drivers/pci/pcie/portdrv.c                    |   2 +-
>  drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
>  drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
>  drivers/power/supply/bq24190_charger.c        |  28 +--
>  drivers/power/supply/twl4030_charger.c        |   2 +-
>  drivers/pwm/pwm-img.c                         |   4 +-
>  drivers/regulator/stm32-vrefbuf.c             |  12 +-
>  drivers/remoteproc/omap_remoteproc.c          |   6 +-
>  drivers/slimbus/core.c                        |   2 +-
>  drivers/slimbus/messaging.c                   |   4 +-
>  drivers/soc/apple/mailbox.c                   |   2 +-
>  drivers/soundwire/bus.c                       |   2 +-
>  drivers/soundwire/cadence_master.c            |   2 +-
>  drivers/soundwire/qcom.c                      |   6 +-
>  drivers/spi/atmel-quadspi.c                   |  10 +-
>  drivers/spi/spi-cadence-quadspi.c             |   4 +-
>  drivers/spi/spi-cadence.c                     |   2 +-
>  drivers/spi/spi-dw-pci.c                      |   2 +-
>  drivers/spi/spi-fsl-espi.c                    |   4 +-
>  drivers/spi/spi-fsl-lpspi.c                   |   4 +-
>  drivers/spi/spi-imx.c                         |   6 +-
>  drivers/spi/spi-mtk-nor.c                     |   2 +-
>  drivers/spi/spi-omap2-mcspi.c                 |   6 +-
>  drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
>  drivers/spi/spi-s3c64xx.c                     |   6 +-
>  drivers/spi/spi-sprd.c                        |   2 +-
>  drivers/spi/spi-stm32-qspi.c                  |  14 +-
>  drivers/spi/spi-stm32.c                       |   4 +-
>  drivers/spi/spi-ti-qspi.c                     |   4 +-
>  drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
>  drivers/spi/spi.c                             |   6 +-
>  drivers/staging/greybus/gbphy.h               |   2 +-
>  drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
>  drivers/thunderbolt/debugfs.c                 |  22 +--
>  drivers/thunderbolt/domain.c                  |   4 +-
>  drivers/thunderbolt/icm.c                     |  14 +-
>  drivers/thunderbolt/nhi.c                     |   2 +-
>  drivers/thunderbolt/retimer.c                 |   4 +-
>  drivers/thunderbolt/switch.c                  |   6 +-
>  drivers/thunderbolt/tb.c                      |  18 +-
>  drivers/thunderbolt/usb4_port.c               |   4 +-
>  drivers/tty/serial/8250/8250_omap.c           |  18 +-
>  drivers/tty/serial/8250/8250_port.c           |   4 +-
>  drivers/tty/serial/fsl_lpuart.c               |   2 +-
>  drivers/tty/serial/serial_core.c              |   2 +-
>  drivers/tty/serial/uartlite.c                 |   4 +-
>  drivers/tty/serial/xilinx_uartps.c            |   2 +-
>  drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
>  drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
>  drivers/usb/chipidea/core.c                   |   2 +-
>  drivers/usb/chipidea/otg_fsm.c                |   2 +-
>  drivers/usb/dwc3/core.c                       |   2 +-
>  drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
>  drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
>  drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
>  drivers/usb/host/xhci-mtk.c                   |   2 +-
>  drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
>  drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
>  drivers/usb/musb/musb_core.c                  |  10 +-
>  drivers/usb/musb/musb_debugfs.c               |  10 +-
>  drivers/usb/musb/musb_dsps.c                  |   2 +-
>  drivers/usb/musb/musb_gadget.c                |   8 +-
>  drivers/usb/musb/omap2430.c                   |   2 +-
>  drivers/w1/masters/omap_hdq.c                 |  10 +-
>  include/linux/greybus/bundle.h                |   2 +-
>  sound/hda/hdac_device.c                       |   2 +-
>  sound/pci/hda/cs35l41_hda.c                   |   8 +-
>  sound/pci/hda/cs35l56_hda.c                   |   2 +-
>  sound/pci/hda/hda_intel.c                     |   2 +-
>  sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
>  sound/soc/atmel/mchp-spdifrx.c                |  12 +-
>  sound/soc/codecs/arizona-jack.c               |  12 +-
>  sound/soc/codecs/arizona.c                    |   2 +-
>  sound/soc/codecs/cs35l41.c                    |   4 +-
>  sound/soc/codecs/cs35l45.c                    |   2 +-
>  sound/soc/codecs/cs35l56-sdw.c                |   4 +-
>  sound/soc/codecs/cs35l56-shared.c             |   2 +-
>  sound/soc/codecs/cs35l56.c                    |   2 +-
>  sound/soc/codecs/cs42l42-sdw.c                |   2 +-
>  sound/soc/codecs/cs42l42.c                    |   4 +-
>  sound/soc/codecs/cs42l43-jack.c               |  10 +-
>  sound/soc/codecs/cs42l43.c                    |   4 +-
>  sound/soc/codecs/hda.c                        |   6 +-
>  sound/soc/codecs/madera.c                     |   6 +-
>  sound/soc/codecs/max98363.c                   |   2 +-
>  sound/soc/codecs/max98373-sdw.c               |   2 +-
>  sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
>  sound/soc/codecs/rt1308-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1316-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1318-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1320-sdw.c                 |   2 +-
>  sound/soc/codecs/rt5682-sdw.c                 |   2 +-
>  sound/soc/codecs/rt700.c                      |   4 +-
>  sound/soc/codecs/rt711-sdca.c                 |   4 +-
>  sound/soc/codecs/rt711.c                      |   4 +-
>  sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
>  sound/soc/codecs/rt712-sdca.c                 |   4 +-
>  sound/soc/codecs/rt715-sdca.c                 |   2 +-
>  sound/soc/codecs/rt715.c                      |   2 +-
>  sound/soc/codecs/rt722-sdca.c                 |   4 +-
>  sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
>  sound/soc/codecs/wsa881x.c                    |   2 +-
>  sound/soc/codecs/wsa884x.c                    |   2 +-
>  sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
>  sound/soc/intel/avs/core.c                    |   2 +-
>  sound/soc/intel/avs/debugfs.c                 |   4 +-
>  sound/soc/intel/avs/pcm.c                     |   2 +-
>  sound/soc/intel/catpt/pcm.c                   |  12 +-
>  sound/soc/intel/catpt/sysfs.c                 |   2 +-
>  sound/soc/soc-component.c                     |   2 +-
>  sound/soc/sof/control.c                       |   2 +-
>  sound/soc/sof/debug.c                         |   2 +-
>  sound/soc/sof/ipc3-dtrace.c                   |   2 +-
>  sound/soc/sof/ipc4-loader.c                   |   2 +-
>  sound/soc/sof/pcm.c                           |   2 +-
>  sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
>  .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
>  sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
>  sound/soc/sof/sof-client-probes.c             |   6 +-
>  sound/x86/intel_hdmi_audio.c                  |   6 +-
>  373 files changed, 1076 insertions(+), 1076 deletions(-)
>
> --
> 2.39.5
>
>

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-04 14:38   ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-04 14:38 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	laurent.pinchart, rafael, Andy Shevchenko

On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
>
> Hello everyone,
>
> This set will switch the users of pm_runtime_put_autosuspend() to
> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> to include a call to pm_runtime_mark_last_busy(). The two are almost
> always used together, apart from bugs which are likely common. Going
> forward, most new users should be using pm_runtime_put_autosuspend().
>
> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> and pm_runtime_mark_last_busy().

That sounds like it could cause a lot of churns.

Why not add a new helper function that does the
pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
things? Then we can start moving users over to this new interface,
rather than having this intermediate step?

Kind regards
Uffe

>
> The diff in these patches have been generated using the following
> Coccinelle script (besides a manual change in
> drivers/iio/magnetometer/af8133j.c):
>
> ----------8<-------------------
> @@
> expression E1;
>
> @@
>
> - pm_runtime_put_autosuspend(E1)
> + __pm_runtime_put_autosuspend(E1)
> ----------8<-------------------
>
> These patches are on top of today's linux-next (i.e. next-20241004).
>
> Sakari Ailus (51):
>   accel/ivpu: Switch to __pm_runtime_put_autosuspend()
>   bluetooth: Switch to __pm_runtime_put_autosuspend()
>   bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
>   hwrng: Switch to __pm_runtime_put_autosuspend()
>   clk: Switch to __pm_runtime_put_autosuspend()
>   crypto: Switch to __pm_runtime_put_autosuspend()
>   dmaengine: Switch to __pm_runtime_put_autosuspend()
>   gpio: Switch to __pm_runtime_put_autosuspend()
>   drm/amd: Switch to __pm_runtime_put_autosuspend()
>   drm/nouveau: Switch to __pm_runtime_put_autosuspend()
>   drm/radeon: Switch to __pm_runtime_put_autosuspend()
>   drm/panfrost: Switch to __pm_runtime_put_autosuspend()
>   drivers: drm: Switch to __pm_runtime_put_autosuspend()
>   HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
>   stm class: Switch to __pm_runtime_put_autosuspend()
>   i2c: Switch to __pm_runtime_put_autosuspend()
>   i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
>   i3c: dw: Switch to __pm_runtime_put_autosuspend()
>   iio: Switch to __pm_runtime_put_autosuspend()
>   Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
>   Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
>   iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
>   irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
>   mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
>   media: Switch to __pm_runtime_put_autosuspend()
>   mfd: Switch to __pm_runtime_put_autosuspend()
>   mei: Switch to __pm_runtime_put_autosuspend()
>   mmc: Switch to __pm_runtime_put_autosuspend()
>   mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
>   net: Switch to __pm_runtime_put_autosuspend()
>   nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
>   PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
>   phy: motorola: phy-mapphone-mdm6600: Switch to
>     __pm_runtime_put_autosuspend()
>   phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
>   power: Switch to __pm_runtime_put_autosuspend()
>   pwm: img: Switch to __pm_runtime_put_autosuspend()
>   regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
>   remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
>   slimbus: Switch to __pm_runtime_put_autosuspend()
>   soundwire: Switch to __pm_runtime_put_autosuspend()
>   spi: Switch to __pm_runtime_put_autosuspend()
>   staging: Switch to __pm_runtime_put_autosuspend()
>   thunderbolt: Switch to __pm_runtime_put_autosuspend()
>   serial: Switch to __pm_runtime_put_autosuspend()
>   usb: Switch to __pm_runtime_put_autosuspend()
>   w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
>   staging: greybus: Switch to __pm_runtime_put_autosuspend()
>   ALSA: hda: Switch to __pm_runtime_put_autosuspend()
>   ASoC: Switch to __pm_runtime_put_autosuspend()
>   ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
>   soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()
>
>  drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
>  drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
>  drivers/bluetooth/btmtksdio.c                 |   2 +-
>  drivers/bluetooth/hci_bcm.c                   |   6 +-
>  drivers/bluetooth/hci_h5.c                    |   4 +-
>  drivers/bluetooth/hci_intel.c                 |   6 +-
>  drivers/bus/sunxi-rsb.c                       |   4 +-
>  drivers/char/hw_random/cctrng.c               |   2 +-
>  drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
>  drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
>  drivers/clk/imx/clk-scu.c                     |   2 +-
>  drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
>  drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
>  drivers/crypto/ccree/cc_pm.c                  |   2 +-
>  drivers/crypto/hisilicon/qm.c                 |   2 +-
>  drivers/crypto/omap-aes-gcm.c                 |   2 +-
>  drivers/crypto/omap-aes.c                     |   2 +-
>  drivers/crypto/omap-des.c                     |   2 +-
>  drivers/crypto/omap-sham.c                    |   2 +-
>  drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
>  .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
>  drivers/crypto/stm32/stm32-crc32.c            |   4 +-
>  drivers/crypto/stm32/stm32-cryp.c             |   2 +-
>  drivers/crypto/stm32/stm32-hash.c             |   2 +-
>  drivers/dma/at_xdmac.c                        |  24 +--
>  drivers/dma/pl330.c                           |  14 +-
>  drivers/dma/qcom/bam_dma.c                    |  10 +-
>  drivers/dma/qcom/hidma.c                      |  18 +-
>  drivers/dma/qcom/hidma_dbg.c                  |   2 +-
>  drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
>  drivers/dma/ste_dma40.c                       |  16 +-
>  drivers/dma/ti/cppi41.c                       |  10 +-
>  drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
>  drivers/gpio/gpio-arizona.c                   |  10 +-
>  drivers/gpio/gpio-mxc.c                       |   2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
>  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
>  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
>  .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
>  drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
>  .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
>  drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
>  drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
>  drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
>  drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
>  drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
>  drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
>  drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
>  drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
>  drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
>  drivers/gpu/drm/lima/lima_sched.c             |   2 +-
>  drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
>  drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
>  drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
>  drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
>  drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
>  drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
>  drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
>  drivers/gpu/drm/panel/panel-edp.c             |   8 +-
>  .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
>  drivers/gpu/drm/panel/panel-simple.c          |   6 +-
>  drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
>  drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
>  drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
>  drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
>  drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
>  drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
>  drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
>  drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
>  drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
>  drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
>  drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
>  drivers/gpu/drm/tegra/submit.c                |   2 +-
>  drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
>  drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
>  drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
>  drivers/hwtracing/stm/core.c                  |   8 +-
>  drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
>  drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
>  drivers/i2c/busses/i2c-at91-master.c          |   2 +-
>  drivers/i2c/busses/i2c-cadence.c              |   2 +-
>  drivers/i2c/busses/i2c-davinci.c              |   4 +-
>  drivers/i2c/busses/i2c-designware-master.c    |   2 +-
>  drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
>  drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
>  drivers/i2c/busses/i2c-i801.c                 |   4 +-
>  drivers/i2c/busses/i2c-img-scb.c              |   6 +-
>  drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
>  drivers/i2c/busses/i2c-imx.c                  |   4 +-
>  drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
>  drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
>  drivers/i2c/busses/i2c-omap.c                 |   6 +-
>  drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
>  drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
>  drivers/i2c/busses/i2c-qup.c                  |   4 +-
>  drivers/i2c/busses/i2c-riic.c                 |   4 +-
>  drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
>  drivers/i2c/busses/i2c-sprd.c                 |   4 +-
>  drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
>  drivers/i2c/busses/i2c-xiic.c                 |   2 +-
>  drivers/i3c/master/dw-i3c-master.c            |  16 +-
>  drivers/i3c/master/svc-i3c-master.c           |  16 +-
>  drivers/iio/accel/bmc150-accel-core.c         |   2 +-
>  drivers/iio/accel/bmi088-accel-core.c         |   6 +-
>  drivers/iio/accel/fxls8962af-core.c           |   2 +-
>  drivers/iio/accel/kxcjk-1013.c                |   2 +-
>  drivers/iio/accel/kxsd9.c                     |   6 +-
>  drivers/iio/accel/mma8452.c                   |   2 +-
>  drivers/iio/accel/mma9551_core.c              |   2 +-
>  drivers/iio/accel/msa311.c                    |  12 +-
>  drivers/iio/adc/ab8500-gpadc.c                |   2 +-
>  drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
>  drivers/iio/adc/rcar-gyroadc.c                |   2 +-
>  drivers/iio/adc/stm32-adc-core.c              |   2 +-
>  drivers/iio/adc/stm32-adc.c                   |  12 +-
>  drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
>  drivers/iio/adc/ti-ads1015.c                  |   2 +-
>  drivers/iio/adc/ti-ads1100.c                  |   2 +-
>  drivers/iio/adc/ti-ads1119.c                  |   4 +-
>  drivers/iio/chemical/atlas-sensor.c           |   4 +-
>  .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
>  drivers/iio/dac/stm32-dac.c                   |   6 +-
>  drivers/iio/gyro/bmg160_core.c                |   2 +-
>  drivers/iio/gyro/fxas21002c_core.c            |   2 +-
>  drivers/iio/gyro/mpu3050-core.c               |   6 +-
>  drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
>  .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
>  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
>  drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
>  drivers/iio/imu/kmx61.c                       |   2 +-
>  drivers/iio/light/apds9306.c                  |   6 +-
>  drivers/iio/light/apds9960.c                  |   4 +-
>  drivers/iio/light/bh1780.c                    |   2 +-
>  drivers/iio/light/gp2ap002.c                  |   4 +-
>  drivers/iio/light/isl29028.c                  |   2 +-
>  drivers/iio/light/ltrf216a.c                  |   2 +-
>  drivers/iio/light/pa12203001.c                |   2 +-
>  drivers/iio/light/rpr0521.c                   |   2 +-
>  drivers/iio/light/tsl2583.c                   |   2 +-
>  drivers/iio/light/tsl2591.c                   |   4 +-
>  drivers/iio/light/us5182d.c                   |   2 +-
>  drivers/iio/light/vcnl4000.c                  |   2 +-
>  drivers/iio/light/vcnl4035.c                  |   2 +-
>  drivers/iio/magnetometer/af8133j.c            |   4 +-
>  drivers/iio/magnetometer/ak8974.c             |   4 +-
>  drivers/iio/magnetometer/ak8975.c             |   2 +-
>  drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
>  drivers/iio/magnetometer/tmag5273.c           |   4 +-
>  drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
>  drivers/iio/pressure/bmp280-core.c            |  10 +-
>  drivers/iio/pressure/icp10100.c               |   2 +-
>  drivers/iio/pressure/mpl115.c                 |   4 +-
>  drivers/iio/pressure/zpa2326.c                |   4 +-
>  .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
>  drivers/iio/proximity/srf04.c                 |   2 +-
>  drivers/iio/temperature/mlx90614.c            |   4 +-
>  drivers/iio/temperature/mlx90632.c            |   4 +-
>  drivers/iio/temperature/mlx90635.c            |   4 +-
>  drivers/input/keyboard/omap4-keypad.c         |   8 +-
>  drivers/input/misc/cs40l50-vibra.c            |   8 +-
>  drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
>  drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
>  drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
>  drivers/media/i2c/alvium-csi2.c               |   2 +-
>  drivers/media/i2c/ccs/ccs-core.c              |  10 +-
>  drivers/media/i2c/dw9719.c                    |   2 +-
>  drivers/media/i2c/gc0308.c                    |   6 +-
>  drivers/media/i2c/gc2145.c                    |   8 +-
>  drivers/media/i2c/imx283.c                    |   6 +-
>  drivers/media/i2c/imx290.c                    |   6 +-
>  drivers/media/i2c/imx296.c                    |   4 +-
>  drivers/media/i2c/imx415.c                    |   4 +-
>  drivers/media/i2c/mt9m114.c                   |  12 +-
>  drivers/media/i2c/ov2680.c                    |   2 +-
>  drivers/media/i2c/ov4689.c                    |   6 +-
>  drivers/media/i2c/ov5640.c                    |   8 +-
>  drivers/media/i2c/ov5645.c                    |   6 +-
>  drivers/media/i2c/ov5693.c                    |   2 +-
>  drivers/media/i2c/ov64a40.c                   |   8 +-
>  drivers/media/i2c/ov7251.c                    |   2 +-
>  drivers/media/i2c/ov8858.c                    |   4 +-
>  drivers/media/i2c/thp7312.c                   |   8 +-
>  drivers/media/i2c/video-i2c.c                 |   8 +-
>  .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
>  drivers/media/platform/qcom/venus/vdec.c      |   4 +-
>  drivers/media/platform/qcom/venus/venc.c      |   4 +-
>  .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
>  .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
>  drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
>  .../media/platform/verisilicon/hantro_drv.c   |   2 +-
>  drivers/media/rc/gpio-ir-recv.c               |   2 +-
>  drivers/mfd/arizona-irq.c                     |   2 +-
>  drivers/mfd/cs40l50-core.c                    |   2 +-
>  drivers/mfd/cs42l43.c                         |   2 +-
>  drivers/misc/mei/client.c                     |  14 +-
>  drivers/mmc/core/core.c                       |   4 +-
>  drivers/mmc/host/atmel-mci.c                  |   4 +-
>  drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
>  drivers/mmc/host/dw_mmc.c                     |   2 +-
>  drivers/mmc/host/mmci.c                       |   2 +-
>  drivers/mmc/host/omap_hsmmc.c                 |   6 +-
>  drivers/mmc/host/sdhci-msm.c                  |   2 +-
>  drivers/mmc/host/sdhci-of-at91.c              |   2 +-
>  drivers/mmc/host/sdhci-omap.c                 |   4 +-
>  drivers/mmc/host/sdhci-pci-core.c             |   2 +-
>  drivers/mmc/host/sdhci-pxav3.c                |   6 +-
>  drivers/mmc/host/sdhci-sprd.c                 |   2 +-
>  drivers/mmc/host/sdhci-xenon.c                |   2 +-
>  drivers/mmc/host/sdhci_am654.c                |   2 +-
>  drivers/mmc/host/tmio_mmc_core.c              |   2 +-
>  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
>  drivers/net/ethernet/cadence/macb_main.c      |  10 +-
>  drivers/net/ethernet/freescale/fec_main.c     |  16 +-
>  drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
>  drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
>  drivers/net/ipa/ipa_interrupt.c               |   2 +-
>  drivers/net/ipa/ipa_main.c                    |   2 +-
>  drivers/net/ipa/ipa_modem.c                   |   8 +-
>  drivers/net/ipa/ipa_smp2p.c                   |   4 +-
>  drivers/net/ipa/ipa_uc.c                      |   4 +-
>  drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
>  drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
>  drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
>  drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
>  drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
>  drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
>  drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
>  drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
>  drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
>  drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
>  drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
>  drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
>  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
>  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
>  drivers/nfc/trf7970a.c                        |   2 +-
>  drivers/pci/pcie/portdrv.c                    |   2 +-
>  drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
>  drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
>  drivers/power/supply/bq24190_charger.c        |  28 +--
>  drivers/power/supply/twl4030_charger.c        |   2 +-
>  drivers/pwm/pwm-img.c                         |   4 +-
>  drivers/regulator/stm32-vrefbuf.c             |  12 +-
>  drivers/remoteproc/omap_remoteproc.c          |   6 +-
>  drivers/slimbus/core.c                        |   2 +-
>  drivers/slimbus/messaging.c                   |   4 +-
>  drivers/soc/apple/mailbox.c                   |   2 +-
>  drivers/soundwire/bus.c                       |   2 +-
>  drivers/soundwire/cadence_master.c            |   2 +-
>  drivers/soundwire/qcom.c                      |   6 +-
>  drivers/spi/atmel-quadspi.c                   |  10 +-
>  drivers/spi/spi-cadence-quadspi.c             |   4 +-
>  drivers/spi/spi-cadence.c                     |   2 +-
>  drivers/spi/spi-dw-pci.c                      |   2 +-
>  drivers/spi/spi-fsl-espi.c                    |   4 +-
>  drivers/spi/spi-fsl-lpspi.c                   |   4 +-
>  drivers/spi/spi-imx.c                         |   6 +-
>  drivers/spi/spi-mtk-nor.c                     |   2 +-
>  drivers/spi/spi-omap2-mcspi.c                 |   6 +-
>  drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
>  drivers/spi/spi-s3c64xx.c                     |   6 +-
>  drivers/spi/spi-sprd.c                        |   2 +-
>  drivers/spi/spi-stm32-qspi.c                  |  14 +-
>  drivers/spi/spi-stm32.c                       |   4 +-
>  drivers/spi/spi-ti-qspi.c                     |   4 +-
>  drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
>  drivers/spi/spi.c                             |   6 +-
>  drivers/staging/greybus/gbphy.h               |   2 +-
>  drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
>  drivers/thunderbolt/debugfs.c                 |  22 +--
>  drivers/thunderbolt/domain.c                  |   4 +-
>  drivers/thunderbolt/icm.c                     |  14 +-
>  drivers/thunderbolt/nhi.c                     |   2 +-
>  drivers/thunderbolt/retimer.c                 |   4 +-
>  drivers/thunderbolt/switch.c                  |   6 +-
>  drivers/thunderbolt/tb.c                      |  18 +-
>  drivers/thunderbolt/usb4_port.c               |   4 +-
>  drivers/tty/serial/8250/8250_omap.c           |  18 +-
>  drivers/tty/serial/8250/8250_port.c           |   4 +-
>  drivers/tty/serial/fsl_lpuart.c               |   2 +-
>  drivers/tty/serial/serial_core.c              |   2 +-
>  drivers/tty/serial/uartlite.c                 |   4 +-
>  drivers/tty/serial/xilinx_uartps.c            |   2 +-
>  drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
>  drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
>  drivers/usb/chipidea/core.c                   |   2 +-
>  drivers/usb/chipidea/otg_fsm.c                |   2 +-
>  drivers/usb/dwc3/core.c                       |   2 +-
>  drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
>  drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
>  drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
>  drivers/usb/host/xhci-mtk.c                   |   2 +-
>  drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
>  drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
>  drivers/usb/musb/musb_core.c                  |  10 +-
>  drivers/usb/musb/musb_debugfs.c               |  10 +-
>  drivers/usb/musb/musb_dsps.c                  |   2 +-
>  drivers/usb/musb/musb_gadget.c                |   8 +-
>  drivers/usb/musb/omap2430.c                   |   2 +-
>  drivers/w1/masters/omap_hdq.c                 |  10 +-
>  include/linux/greybus/bundle.h                |   2 +-
>  sound/hda/hdac_device.c                       |   2 +-
>  sound/pci/hda/cs35l41_hda.c                   |   8 +-
>  sound/pci/hda/cs35l56_hda.c                   |   2 +-
>  sound/pci/hda/hda_intel.c                     |   2 +-
>  sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
>  sound/soc/atmel/mchp-spdifrx.c                |  12 +-
>  sound/soc/codecs/arizona-jack.c               |  12 +-
>  sound/soc/codecs/arizona.c                    |   2 +-
>  sound/soc/codecs/cs35l41.c                    |   4 +-
>  sound/soc/codecs/cs35l45.c                    |   2 +-
>  sound/soc/codecs/cs35l56-sdw.c                |   4 +-
>  sound/soc/codecs/cs35l56-shared.c             |   2 +-
>  sound/soc/codecs/cs35l56.c                    |   2 +-
>  sound/soc/codecs/cs42l42-sdw.c                |   2 +-
>  sound/soc/codecs/cs42l42.c                    |   4 +-
>  sound/soc/codecs/cs42l43-jack.c               |  10 +-
>  sound/soc/codecs/cs42l43.c                    |   4 +-
>  sound/soc/codecs/hda.c                        |   6 +-
>  sound/soc/codecs/madera.c                     |   6 +-
>  sound/soc/codecs/max98363.c                   |   2 +-
>  sound/soc/codecs/max98373-sdw.c               |   2 +-
>  sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
>  sound/soc/codecs/rt1308-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1316-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1318-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1320-sdw.c                 |   2 +-
>  sound/soc/codecs/rt5682-sdw.c                 |   2 +-
>  sound/soc/codecs/rt700.c                      |   4 +-
>  sound/soc/codecs/rt711-sdca.c                 |   4 +-
>  sound/soc/codecs/rt711.c                      |   4 +-
>  sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
>  sound/soc/codecs/rt712-sdca.c                 |   4 +-
>  sound/soc/codecs/rt715-sdca.c                 |   2 +-
>  sound/soc/codecs/rt715.c                      |   2 +-
>  sound/soc/codecs/rt722-sdca.c                 |   4 +-
>  sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
>  sound/soc/codecs/wsa881x.c                    |   2 +-
>  sound/soc/codecs/wsa884x.c                    |   2 +-
>  sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
>  sound/soc/intel/avs/core.c                    |   2 +-
>  sound/soc/intel/avs/debugfs.c                 |   4 +-
>  sound/soc/intel/avs/pcm.c                     |   2 +-
>  sound/soc/intel/catpt/pcm.c                   |  12 +-
>  sound/soc/intel/catpt/sysfs.c                 |   2 +-
>  sound/soc/soc-component.c                     |   2 +-
>  sound/soc/sof/control.c                       |   2 +-
>  sound/soc/sof/debug.c                         |   2 +-
>  sound/soc/sof/ipc3-dtrace.c                   |   2 +-
>  sound/soc/sof/ipc4-loader.c                   |   2 +-
>  sound/soc/sof/pcm.c                           |   2 +-
>  sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
>  .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
>  sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
>  sound/soc/sof/sof-client-probes.c             |   6 +-
>  sound/x86/intel_hdmi_audio.c                  |   6 +-
>  373 files changed, 1076 insertions(+), 1076 deletions(-)
>
> --
> 2.39.5
>
>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-04 14:38   ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-04 14:38 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	laurent.pinchart, rafael, Andy Shevchenko

On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
>
> Hello everyone,
>
> This set will switch the users of pm_runtime_put_autosuspend() to
> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> to include a call to pm_runtime_mark_last_busy(). The two are almost
> always used together, apart from bugs which are likely common. Going
> forward, most new users should be using pm_runtime_put_autosuspend().
>
> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> and pm_runtime_mark_last_busy().

That sounds like it could cause a lot of churns.

Why not add a new helper function that does the
pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
things? Then we can start moving users over to this new interface,
rather than having this intermediate step?

Kind regards
Uffe

>
> The diff in these patches have been generated using the following
> Coccinelle script (besides a manual change in
> drivers/iio/magnetometer/af8133j.c):
>
> ----------8<-------------------
> @@
> expression E1;
>
> @@
>
> - pm_runtime_put_autosuspend(E1)
> + __pm_runtime_put_autosuspend(E1)
> ----------8<-------------------
>
> These patches are on top of today's linux-next (i.e. next-20241004).
>
> Sakari Ailus (51):
>   accel/ivpu: Switch to __pm_runtime_put_autosuspend()
>   bluetooth: Switch to __pm_runtime_put_autosuspend()
>   bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
>   hwrng: Switch to __pm_runtime_put_autosuspend()
>   clk: Switch to __pm_runtime_put_autosuspend()
>   crypto: Switch to __pm_runtime_put_autosuspend()
>   dmaengine: Switch to __pm_runtime_put_autosuspend()
>   gpio: Switch to __pm_runtime_put_autosuspend()
>   drm/amd: Switch to __pm_runtime_put_autosuspend()
>   drm/nouveau: Switch to __pm_runtime_put_autosuspend()
>   drm/radeon: Switch to __pm_runtime_put_autosuspend()
>   drm/panfrost: Switch to __pm_runtime_put_autosuspend()
>   drivers: drm: Switch to __pm_runtime_put_autosuspend()
>   HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
>   stm class: Switch to __pm_runtime_put_autosuspend()
>   i2c: Switch to __pm_runtime_put_autosuspend()
>   i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
>   i3c: dw: Switch to __pm_runtime_put_autosuspend()
>   iio: Switch to __pm_runtime_put_autosuspend()
>   Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
>   Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
>   iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
>   irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
>   mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
>   media: Switch to __pm_runtime_put_autosuspend()
>   mfd: Switch to __pm_runtime_put_autosuspend()
>   mei: Switch to __pm_runtime_put_autosuspend()
>   mmc: Switch to __pm_runtime_put_autosuspend()
>   mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
>   net: Switch to __pm_runtime_put_autosuspend()
>   nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
>   PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
>   phy: motorola: phy-mapphone-mdm6600: Switch to
>     __pm_runtime_put_autosuspend()
>   phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
>   power: Switch to __pm_runtime_put_autosuspend()
>   pwm: img: Switch to __pm_runtime_put_autosuspend()
>   regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
>   remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
>   slimbus: Switch to __pm_runtime_put_autosuspend()
>   soundwire: Switch to __pm_runtime_put_autosuspend()
>   spi: Switch to __pm_runtime_put_autosuspend()
>   staging: Switch to __pm_runtime_put_autosuspend()
>   thunderbolt: Switch to __pm_runtime_put_autosuspend()
>   serial: Switch to __pm_runtime_put_autosuspend()
>   usb: Switch to __pm_runtime_put_autosuspend()
>   w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
>   staging: greybus: Switch to __pm_runtime_put_autosuspend()
>   ALSA: hda: Switch to __pm_runtime_put_autosuspend()
>   ASoC: Switch to __pm_runtime_put_autosuspend()
>   ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
>   soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()
>
>  drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
>  drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
>  drivers/bluetooth/btmtksdio.c                 |   2 +-
>  drivers/bluetooth/hci_bcm.c                   |   6 +-
>  drivers/bluetooth/hci_h5.c                    |   4 +-
>  drivers/bluetooth/hci_intel.c                 |   6 +-
>  drivers/bus/sunxi-rsb.c                       |   4 +-
>  drivers/char/hw_random/cctrng.c               |   2 +-
>  drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
>  drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
>  drivers/clk/imx/clk-scu.c                     |   2 +-
>  drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
>  drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
>  drivers/crypto/ccree/cc_pm.c                  |   2 +-
>  drivers/crypto/hisilicon/qm.c                 |   2 +-
>  drivers/crypto/omap-aes-gcm.c                 |   2 +-
>  drivers/crypto/omap-aes.c                     |   2 +-
>  drivers/crypto/omap-des.c                     |   2 +-
>  drivers/crypto/omap-sham.c                    |   2 +-
>  drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
>  .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
>  drivers/crypto/stm32/stm32-crc32.c            |   4 +-
>  drivers/crypto/stm32/stm32-cryp.c             |   2 +-
>  drivers/crypto/stm32/stm32-hash.c             |   2 +-
>  drivers/dma/at_xdmac.c                        |  24 +--
>  drivers/dma/pl330.c                           |  14 +-
>  drivers/dma/qcom/bam_dma.c                    |  10 +-
>  drivers/dma/qcom/hidma.c                      |  18 +-
>  drivers/dma/qcom/hidma_dbg.c                  |   2 +-
>  drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
>  drivers/dma/ste_dma40.c                       |  16 +-
>  drivers/dma/ti/cppi41.c                       |  10 +-
>  drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
>  drivers/gpio/gpio-arizona.c                   |  10 +-
>  drivers/gpio/gpio-mxc.c                       |   2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
>  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
>  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
>  .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
>  drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
>  .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
>  drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
>  drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
>  drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
>  drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
>  drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
>  drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
>  drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
>  drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
>  drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
>  drivers/gpu/drm/lima/lima_sched.c             |   2 +-
>  drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
>  drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
>  drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
>  drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
>  drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
>  drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
>  drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
>  drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
>  drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
>  drivers/gpu/drm/panel/panel-edp.c             |   8 +-
>  .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
>  drivers/gpu/drm/panel/panel-simple.c          |   6 +-
>  drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
>  drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
>  drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
>  drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
>  drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
>  drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
>  drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
>  drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
>  drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
>  drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
>  drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
>  drivers/gpu/drm/tegra/submit.c                |   2 +-
>  drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
>  drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
>  drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
>  drivers/hwtracing/stm/core.c                  |   8 +-
>  drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
>  drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
>  drivers/i2c/busses/i2c-at91-master.c          |   2 +-
>  drivers/i2c/busses/i2c-cadence.c              |   2 +-
>  drivers/i2c/busses/i2c-davinci.c              |   4 +-
>  drivers/i2c/busses/i2c-designware-master.c    |   2 +-
>  drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
>  drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
>  drivers/i2c/busses/i2c-i801.c                 |   4 +-
>  drivers/i2c/busses/i2c-img-scb.c              |   6 +-
>  drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
>  drivers/i2c/busses/i2c-imx.c                  |   4 +-
>  drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
>  drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
>  drivers/i2c/busses/i2c-omap.c                 |   6 +-
>  drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
>  drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
>  drivers/i2c/busses/i2c-qup.c                  |   4 +-
>  drivers/i2c/busses/i2c-riic.c                 |   4 +-
>  drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
>  drivers/i2c/busses/i2c-sprd.c                 |   4 +-
>  drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
>  drivers/i2c/busses/i2c-xiic.c                 |   2 +-
>  drivers/i3c/master/dw-i3c-master.c            |  16 +-
>  drivers/i3c/master/svc-i3c-master.c           |  16 +-
>  drivers/iio/accel/bmc150-accel-core.c         |   2 +-
>  drivers/iio/accel/bmi088-accel-core.c         |   6 +-
>  drivers/iio/accel/fxls8962af-core.c           |   2 +-
>  drivers/iio/accel/kxcjk-1013.c                |   2 +-
>  drivers/iio/accel/kxsd9.c                     |   6 +-
>  drivers/iio/accel/mma8452.c                   |   2 +-
>  drivers/iio/accel/mma9551_core.c              |   2 +-
>  drivers/iio/accel/msa311.c                    |  12 +-
>  drivers/iio/adc/ab8500-gpadc.c                |   2 +-
>  drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
>  drivers/iio/adc/rcar-gyroadc.c                |   2 +-
>  drivers/iio/adc/stm32-adc-core.c              |   2 +-
>  drivers/iio/adc/stm32-adc.c                   |  12 +-
>  drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
>  drivers/iio/adc/ti-ads1015.c                  |   2 +-
>  drivers/iio/adc/ti-ads1100.c                  |   2 +-
>  drivers/iio/adc/ti-ads1119.c                  |   4 +-
>  drivers/iio/chemical/atlas-sensor.c           |   4 +-
>  .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
>  drivers/iio/dac/stm32-dac.c                   |   6 +-
>  drivers/iio/gyro/bmg160_core.c                |   2 +-
>  drivers/iio/gyro/fxas21002c_core.c            |   2 +-
>  drivers/iio/gyro/mpu3050-core.c               |   6 +-
>  drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
>  .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
>  .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
>  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
>  drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
>  drivers/iio/imu/kmx61.c                       |   2 +-
>  drivers/iio/light/apds9306.c                  |   6 +-
>  drivers/iio/light/apds9960.c                  |   4 +-
>  drivers/iio/light/bh1780.c                    |   2 +-
>  drivers/iio/light/gp2ap002.c                  |   4 +-
>  drivers/iio/light/isl29028.c                  |   2 +-
>  drivers/iio/light/ltrf216a.c                  |   2 +-
>  drivers/iio/light/pa12203001.c                |   2 +-
>  drivers/iio/light/rpr0521.c                   |   2 +-
>  drivers/iio/light/tsl2583.c                   |   2 +-
>  drivers/iio/light/tsl2591.c                   |   4 +-
>  drivers/iio/light/us5182d.c                   |   2 +-
>  drivers/iio/light/vcnl4000.c                  |   2 +-
>  drivers/iio/light/vcnl4035.c                  |   2 +-
>  drivers/iio/magnetometer/af8133j.c            |   4 +-
>  drivers/iio/magnetometer/ak8974.c             |   4 +-
>  drivers/iio/magnetometer/ak8975.c             |   2 +-
>  drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
>  drivers/iio/magnetometer/tmag5273.c           |   4 +-
>  drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
>  drivers/iio/pressure/bmp280-core.c            |  10 +-
>  drivers/iio/pressure/icp10100.c               |   2 +-
>  drivers/iio/pressure/mpl115.c                 |   4 +-
>  drivers/iio/pressure/zpa2326.c                |   4 +-
>  .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
>  drivers/iio/proximity/srf04.c                 |   2 +-
>  drivers/iio/temperature/mlx90614.c            |   4 +-
>  drivers/iio/temperature/mlx90632.c            |   4 +-
>  drivers/iio/temperature/mlx90635.c            |   4 +-
>  drivers/input/keyboard/omap4-keypad.c         |   8 +-
>  drivers/input/misc/cs40l50-vibra.c            |   8 +-
>  drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
>  drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
>  drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
>  drivers/media/i2c/alvium-csi2.c               |   2 +-
>  drivers/media/i2c/ccs/ccs-core.c              |  10 +-
>  drivers/media/i2c/dw9719.c                    |   2 +-
>  drivers/media/i2c/gc0308.c                    |   6 +-
>  drivers/media/i2c/gc2145.c                    |   8 +-
>  drivers/media/i2c/imx283.c                    |   6 +-
>  drivers/media/i2c/imx290.c                    |   6 +-
>  drivers/media/i2c/imx296.c                    |   4 +-
>  drivers/media/i2c/imx415.c                    |   4 +-
>  drivers/media/i2c/mt9m114.c                   |  12 +-
>  drivers/media/i2c/ov2680.c                    |   2 +-
>  drivers/media/i2c/ov4689.c                    |   6 +-
>  drivers/media/i2c/ov5640.c                    |   8 +-
>  drivers/media/i2c/ov5645.c                    |   6 +-
>  drivers/media/i2c/ov5693.c                    |   2 +-
>  drivers/media/i2c/ov64a40.c                   |   8 +-
>  drivers/media/i2c/ov7251.c                    |   2 +-
>  drivers/media/i2c/ov8858.c                    |   4 +-
>  drivers/media/i2c/thp7312.c                   |   8 +-
>  drivers/media/i2c/video-i2c.c                 |   8 +-
>  .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
>  drivers/media/platform/qcom/venus/vdec.c      |   4 +-
>  drivers/media/platform/qcom/venus/venc.c      |   4 +-
>  .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
>  .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
>  drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
>  .../media/platform/verisilicon/hantro_drv.c   |   2 +-
>  drivers/media/rc/gpio-ir-recv.c               |   2 +-
>  drivers/mfd/arizona-irq.c                     |   2 +-
>  drivers/mfd/cs40l50-core.c                    |   2 +-
>  drivers/mfd/cs42l43.c                         |   2 +-
>  drivers/misc/mei/client.c                     |  14 +-
>  drivers/mmc/core/core.c                       |   4 +-
>  drivers/mmc/host/atmel-mci.c                  |   4 +-
>  drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
>  drivers/mmc/host/dw_mmc.c                     |   2 +-
>  drivers/mmc/host/mmci.c                       |   2 +-
>  drivers/mmc/host/omap_hsmmc.c                 |   6 +-
>  drivers/mmc/host/sdhci-msm.c                  |   2 +-
>  drivers/mmc/host/sdhci-of-at91.c              |   2 +-
>  drivers/mmc/host/sdhci-omap.c                 |   4 +-
>  drivers/mmc/host/sdhci-pci-core.c             |   2 +-
>  drivers/mmc/host/sdhci-pxav3.c                |   6 +-
>  drivers/mmc/host/sdhci-sprd.c                 |   2 +-
>  drivers/mmc/host/sdhci-xenon.c                |   2 +-
>  drivers/mmc/host/sdhci_am654.c                |   2 +-
>  drivers/mmc/host/tmio_mmc_core.c              |   2 +-
>  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
>  drivers/net/ethernet/cadence/macb_main.c      |  10 +-
>  drivers/net/ethernet/freescale/fec_main.c     |  16 +-
>  drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
>  drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
>  drivers/net/ipa/ipa_interrupt.c               |   2 +-
>  drivers/net/ipa/ipa_main.c                    |   2 +-
>  drivers/net/ipa/ipa_modem.c                   |   8 +-
>  drivers/net/ipa/ipa_smp2p.c                   |   4 +-
>  drivers/net/ipa/ipa_uc.c                      |   4 +-
>  drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
>  drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
>  drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
>  drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
>  drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
>  drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
>  drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
>  drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
>  drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
>  drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
>  drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
>  drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
>  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
>  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
>  drivers/nfc/trf7970a.c                        |   2 +-
>  drivers/pci/pcie/portdrv.c                    |   2 +-
>  drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
>  drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
>  drivers/power/supply/bq24190_charger.c        |  28 +--
>  drivers/power/supply/twl4030_charger.c        |   2 +-
>  drivers/pwm/pwm-img.c                         |   4 +-
>  drivers/regulator/stm32-vrefbuf.c             |  12 +-
>  drivers/remoteproc/omap_remoteproc.c          |   6 +-
>  drivers/slimbus/core.c                        |   2 +-
>  drivers/slimbus/messaging.c                   |   4 +-
>  drivers/soc/apple/mailbox.c                   |   2 +-
>  drivers/soundwire/bus.c                       |   2 +-
>  drivers/soundwire/cadence_master.c            |   2 +-
>  drivers/soundwire/qcom.c                      |   6 +-
>  drivers/spi/atmel-quadspi.c                   |  10 +-
>  drivers/spi/spi-cadence-quadspi.c             |   4 +-
>  drivers/spi/spi-cadence.c                     |   2 +-
>  drivers/spi/spi-dw-pci.c                      |   2 +-
>  drivers/spi/spi-fsl-espi.c                    |   4 +-
>  drivers/spi/spi-fsl-lpspi.c                   |   4 +-
>  drivers/spi/spi-imx.c                         |   6 +-
>  drivers/spi/spi-mtk-nor.c                     |   2 +-
>  drivers/spi/spi-omap2-mcspi.c                 |   6 +-
>  drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
>  drivers/spi/spi-s3c64xx.c                     |   6 +-
>  drivers/spi/spi-sprd.c                        |   2 +-
>  drivers/spi/spi-stm32-qspi.c                  |  14 +-
>  drivers/spi/spi-stm32.c                       |   4 +-
>  drivers/spi/spi-ti-qspi.c                     |   4 +-
>  drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
>  drivers/spi/spi.c                             |   6 +-
>  drivers/staging/greybus/gbphy.h               |   2 +-
>  drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
>  drivers/thunderbolt/debugfs.c                 |  22 +--
>  drivers/thunderbolt/domain.c                  |   4 +-
>  drivers/thunderbolt/icm.c                     |  14 +-
>  drivers/thunderbolt/nhi.c                     |   2 +-
>  drivers/thunderbolt/retimer.c                 |   4 +-
>  drivers/thunderbolt/switch.c                  |   6 +-
>  drivers/thunderbolt/tb.c                      |  18 +-
>  drivers/thunderbolt/usb4_port.c               |   4 +-
>  drivers/tty/serial/8250/8250_omap.c           |  18 +-
>  drivers/tty/serial/8250/8250_port.c           |   4 +-
>  drivers/tty/serial/fsl_lpuart.c               |   2 +-
>  drivers/tty/serial/serial_core.c              |   2 +-
>  drivers/tty/serial/uartlite.c                 |   4 +-
>  drivers/tty/serial/xilinx_uartps.c            |   2 +-
>  drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
>  drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
>  drivers/usb/chipidea/core.c                   |   2 +-
>  drivers/usb/chipidea/otg_fsm.c                |   2 +-
>  drivers/usb/dwc3/core.c                       |   2 +-
>  drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
>  drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
>  drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
>  drivers/usb/host/xhci-mtk.c                   |   2 +-
>  drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
>  drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
>  drivers/usb/musb/musb_core.c                  |  10 +-
>  drivers/usb/musb/musb_debugfs.c               |  10 +-
>  drivers/usb/musb/musb_dsps.c                  |   2 +-
>  drivers/usb/musb/musb_gadget.c                |   8 +-
>  drivers/usb/musb/omap2430.c                   |   2 +-
>  drivers/w1/masters/omap_hdq.c                 |  10 +-
>  include/linux/greybus/bundle.h                |   2 +-
>  sound/hda/hdac_device.c                       |   2 +-
>  sound/pci/hda/cs35l41_hda.c                   |   8 +-
>  sound/pci/hda/cs35l56_hda.c                   |   2 +-
>  sound/pci/hda/hda_intel.c                     |   2 +-
>  sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
>  sound/soc/atmel/mchp-spdifrx.c                |  12 +-
>  sound/soc/codecs/arizona-jack.c               |  12 +-
>  sound/soc/codecs/arizona.c                    |   2 +-
>  sound/soc/codecs/cs35l41.c                    |   4 +-
>  sound/soc/codecs/cs35l45.c                    |   2 +-
>  sound/soc/codecs/cs35l56-sdw.c                |   4 +-
>  sound/soc/codecs/cs35l56-shared.c             |   2 +-
>  sound/soc/codecs/cs35l56.c                    |   2 +-
>  sound/soc/codecs/cs42l42-sdw.c                |   2 +-
>  sound/soc/codecs/cs42l42.c                    |   4 +-
>  sound/soc/codecs/cs42l43-jack.c               |  10 +-
>  sound/soc/codecs/cs42l43.c                    |   4 +-
>  sound/soc/codecs/hda.c                        |   6 +-
>  sound/soc/codecs/madera.c                     |   6 +-
>  sound/soc/codecs/max98363.c                   |   2 +-
>  sound/soc/codecs/max98373-sdw.c               |   2 +-
>  sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
>  sound/soc/codecs/rt1308-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1316-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1318-sdw.c                 |   2 +-
>  sound/soc/codecs/rt1320-sdw.c                 |   2 +-
>  sound/soc/codecs/rt5682-sdw.c                 |   2 +-
>  sound/soc/codecs/rt700.c                      |   4 +-
>  sound/soc/codecs/rt711-sdca.c                 |   4 +-
>  sound/soc/codecs/rt711.c                      |   4 +-
>  sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
>  sound/soc/codecs/rt712-sdca.c                 |   4 +-
>  sound/soc/codecs/rt715-sdca.c                 |   2 +-
>  sound/soc/codecs/rt715.c                      |   2 +-
>  sound/soc/codecs/rt722-sdca.c                 |   4 +-
>  sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
>  sound/soc/codecs/wsa881x.c                    |   2 +-
>  sound/soc/codecs/wsa884x.c                    |   2 +-
>  sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
>  sound/soc/intel/avs/core.c                    |   2 +-
>  sound/soc/intel/avs/debugfs.c                 |   4 +-
>  sound/soc/intel/avs/pcm.c                     |   2 +-
>  sound/soc/intel/catpt/pcm.c                   |  12 +-
>  sound/soc/intel/catpt/sysfs.c                 |   2 +-
>  sound/soc/soc-component.c                     |   2 +-
>  sound/soc/sof/control.c                       |   2 +-
>  sound/soc/sof/debug.c                         |   2 +-
>  sound/soc/sof/ipc3-dtrace.c                   |   2 +-
>  sound/soc/sof/ipc4-loader.c                   |   2 +-
>  sound/soc/sof/pcm.c                           |   2 +-
>  sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
>  .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
>  sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
>  sound/soc/sof/sof-client-probes.c             |   6 +-
>  sound/x86/intel_hdmi_audio.c                  |   6 +-
>  373 files changed, 1076 insertions(+), 1076 deletions(-)
>
> --
> 2.39.5
>
>

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 48/51] ALSA: hda: Switch to __pm_runtime_put_autosuspend()
  2024-10-04 10:56   ` Takashi Iwai
@ 2024-10-04 23:57     ` Mark Brown
  0 siblings, 0 replies; 122+ messages in thread
From: Mark Brown @ 2024-10-04 23:57 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Sakari Ailus, Jaroslav Kysela, Takashi Iwai, Cezary Rojewski,
	Rodrigo Vivi, bo liu, Stefan Binding, Gergo Koteles,
	Richard Fitzgerald, Simon Trimmer, linux-sound

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

On Fri, Oct 04, 2024 at 12:56:17PM +0200, Takashi Iwai wrote:
> Sakari Ailus wrote:

> > pm_runtime_put_autosuspend() will soon be changed to include a call to
> > pm_runtime_mark_last_busy(). This patch switches the current users to
> > __pm_runtime_put_autosuspend() which will continue to have the
> > functionality of old pm_runtime_put_autosuspend().

> Many of those calls are with pm_runtime_mark_last_busy().
> (Actually the only one without it can be an oversight, it's better to
> be with *_mark_last_busy(), too).

> Wouldn't it be better to keep without converting and rather drop the
> superfluous *_mark_last_busy()?

Indeed, the same is true for the majority of cases in other patches.
These changes seem counterproductive.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 23/51] irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 23/51] irqchip/imx-irqsteer: " Sakari Ailus
@ 2024-10-06 19:52   ` Thomas Gleixner
  0 siblings, 0 replies; 122+ messages in thread
From: Thomas Gleixner @ 2024-10-06 19:52 UTC (permalink / raw)
  To: Sakari Ailus, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam
  Cc: imx, linux-arm-kernel

On Fri, Oct 04 2024 at 12:41, Sakari Ailus wrote:

> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to

git grep 'This patch' Documentation/process

> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().

Thanks,

        tglx

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 24/51] mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 24/51] mailbox: mtk-cmdq-mailbox: " Sakari Ailus
@ 2024-10-07 14:27   ` Matthias Brugger
  0 siblings, 0 replies; 122+ messages in thread
From: Matthias Brugger @ 2024-10-07 14:27 UTC (permalink / raw)
  To: Sakari Ailus, Jassi Brar, AngeloGioacchino Del Regno
  Cc: linux-arm-kernel, linux-mediatek



On 04/10/2024 11:41, Sakari Ailus wrote:
> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

> ---
>   drivers/mailbox/mtk-cmdq-mailbox.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 4bff73532085..180906761eda 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -397,7 +397,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
>   
>   	task = kzalloc(sizeof(*task), GFP_ATOMIC);
>   	if (!task) {
> -		pm_runtime_put_autosuspend(cmdq->mbox.dev);
> +		__pm_runtime_put_autosuspend(cmdq->mbox.dev);
>   		return -ENOMEM;
>   	}
>   
> @@ -447,7 +447,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
>   	list_move_tail(&task->list_entry, &thread->task_busy_list);
>   
>   	pm_runtime_mark_last_busy(cmdq->mbox.dev);
> -	pm_runtime_put_autosuspend(cmdq->mbox.dev);
> +	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
>   
>   	return 0;
>   }
> @@ -495,7 +495,7 @@ static void cmdq_mbox_shutdown(struct mbox_chan *chan)
>   	spin_unlock_irqrestore(&thread->chan->lock, flags);
>   
>   	pm_runtime_mark_last_busy(cmdq->mbox.dev);
> -	pm_runtime_put_autosuspend(cmdq->mbox.dev);
> +	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
>   }
>   
>   static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
> @@ -535,7 +535,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
>   out:
>   	spin_unlock_irqrestore(&thread->chan->lock, flags);
>   	pm_runtime_mark_last_busy(cmdq->mbox.dev);
> -	pm_runtime_put_autosuspend(cmdq->mbox.dev);
> +	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
>   
>   	return 0;
>   
> @@ -550,7 +550,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
>   		return -EFAULT;
>   	}
>   	pm_runtime_mark_last_busy(cmdq->mbox.dev);
> -	pm_runtime_put_autosuspend(cmdq->mbox.dev);
> +	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
>   	return 0;
>   }
>   


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-04 14:38   ` Ulf Hansson
  (?)
  (?)
@ 2024-10-07 18:49     ` Laurent Pinchart
  -1 siblings, 0 replies; 122+ messages in thread
From: Laurent Pinchart @ 2024-10-07 18:49 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

Hi Ulf,

On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> >
> > Hello everyone,
> >
> > This set will switch the users of pm_runtime_put_autosuspend() to
> > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > always used together, apart from bugs which are likely common. Going
> > forward, most new users should be using pm_runtime_put_autosuspend().
> >
> > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > and pm_runtime_mark_last_busy().
> 
> That sounds like it could cause a lot of churns.
> 
> Why not add a new helper function that does the
> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> things? Then we can start moving users over to this new interface,
> rather than having this intermediate step?

I think the API would be nicer if we used the shortest and simplest
function names for the most common use cases. Following
pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
most common use case. That's why I like Sakari's approach of repurposing
pm_runtime_put_autosuspend(), and introducing
__pm_runtime_put_autosuspend() for the odd cases where
pm_runtime_mark_last_busy() shouldn't be called.

> > The diff in these patches have been generated using the following
> > Coccinelle script (besides a manual change in
> > drivers/iio/magnetometer/af8133j.c):
> >
> > ----------8<-------------------
> > @@
> > expression E1;
> >
> > @@
> >
> > - pm_runtime_put_autosuspend(E1)
> > + __pm_runtime_put_autosuspend(E1)
> > ----------8<-------------------
> >
> > These patches are on top of today's linux-next (i.e. next-20241004).
> >
> > Sakari Ailus (51):
> >   accel/ivpu: Switch to __pm_runtime_put_autosuspend()
> >   bluetooth: Switch to __pm_runtime_put_autosuspend()
> >   bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
> >   hwrng: Switch to __pm_runtime_put_autosuspend()
> >   clk: Switch to __pm_runtime_put_autosuspend()
> >   crypto: Switch to __pm_runtime_put_autosuspend()
> >   dmaengine: Switch to __pm_runtime_put_autosuspend()
> >   gpio: Switch to __pm_runtime_put_autosuspend()
> >   drm/amd: Switch to __pm_runtime_put_autosuspend()
> >   drm/nouveau: Switch to __pm_runtime_put_autosuspend()
> >   drm/radeon: Switch to __pm_runtime_put_autosuspend()
> >   drm/panfrost: Switch to __pm_runtime_put_autosuspend()
> >   drivers: drm: Switch to __pm_runtime_put_autosuspend()
> >   HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
> >   stm class: Switch to __pm_runtime_put_autosuspend()
> >   i2c: Switch to __pm_runtime_put_autosuspend()
> >   i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
> >   i3c: dw: Switch to __pm_runtime_put_autosuspend()
> >   iio: Switch to __pm_runtime_put_autosuspend()
> >   Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
> >   Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
> >   iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
> >   irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
> >   mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
> >   media: Switch to __pm_runtime_put_autosuspend()
> >   mfd: Switch to __pm_runtime_put_autosuspend()
> >   mei: Switch to __pm_runtime_put_autosuspend()
> >   mmc: Switch to __pm_runtime_put_autosuspend()
> >   mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
> >   net: Switch to __pm_runtime_put_autosuspend()
> >   nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
> >   PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
> >   phy: motorola: phy-mapphone-mdm6600: Switch to
> >     __pm_runtime_put_autosuspend()
> >   phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
> >   power: Switch to __pm_runtime_put_autosuspend()
> >   pwm: img: Switch to __pm_runtime_put_autosuspend()
> >   regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
> >   remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
> >   slimbus: Switch to __pm_runtime_put_autosuspend()
> >   soundwire: Switch to __pm_runtime_put_autosuspend()
> >   spi: Switch to __pm_runtime_put_autosuspend()
> >   staging: Switch to __pm_runtime_put_autosuspend()
> >   thunderbolt: Switch to __pm_runtime_put_autosuspend()
> >   serial: Switch to __pm_runtime_put_autosuspend()
> >   usb: Switch to __pm_runtime_put_autosuspend()
> >   w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
> >   staging: greybus: Switch to __pm_runtime_put_autosuspend()
> >   ALSA: hda: Switch to __pm_runtime_put_autosuspend()
> >   ASoC: Switch to __pm_runtime_put_autosuspend()
> >   ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
> >   soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()
> >
> >  drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
> >  drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
> >  drivers/bluetooth/btmtksdio.c                 |   2 +-
> >  drivers/bluetooth/hci_bcm.c                   |   6 +-
> >  drivers/bluetooth/hci_h5.c                    |   4 +-
> >  drivers/bluetooth/hci_intel.c                 |   6 +-
> >  drivers/bus/sunxi-rsb.c                       |   4 +-
> >  drivers/char/hw_random/cctrng.c               |   2 +-
> >  drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
> >  drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
> >  drivers/clk/imx/clk-scu.c                     |   2 +-
> >  drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
> >  drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
> >  drivers/crypto/ccree/cc_pm.c                  |   2 +-
> >  drivers/crypto/hisilicon/qm.c                 |   2 +-
> >  drivers/crypto/omap-aes-gcm.c                 |   2 +-
> >  drivers/crypto/omap-aes.c                     |   2 +-
> >  drivers/crypto/omap-des.c                     |   2 +-
> >  drivers/crypto/omap-sham.c                    |   2 +-
> >  drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
> >  .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
> >  drivers/crypto/stm32/stm32-crc32.c            |   4 +-
> >  drivers/crypto/stm32/stm32-cryp.c             |   2 +-
> >  drivers/crypto/stm32/stm32-hash.c             |   2 +-
> >  drivers/dma/at_xdmac.c                        |  24 +--
> >  drivers/dma/pl330.c                           |  14 +-
> >  drivers/dma/qcom/bam_dma.c                    |  10 +-
> >  drivers/dma/qcom/hidma.c                      |  18 +-
> >  drivers/dma/qcom/hidma_dbg.c                  |   2 +-
> >  drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
> >  drivers/dma/ste_dma40.c                       |  16 +-
> >  drivers/dma/ti/cppi41.c                       |  10 +-
> >  drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
> >  drivers/gpio/gpio-arizona.c                   |  10 +-
> >  drivers/gpio/gpio-mxc.c                       |   2 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
> >  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
> >  .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
> >  drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
> >  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
> >  drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
> >  .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
> >  drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
> >  drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
> >  drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
> >  drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
> >  drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
> >  drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
> >  drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
> >  drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
> >  drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
> >  drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
> >  drivers/gpu/drm/lima/lima_sched.c             |   2 +-
> >  drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
> >  drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
> >  drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
> >  drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
> >  drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
> >  drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
> >  drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
> >  drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
> >  drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
> >  drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
> >  drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
> >  drivers/gpu/drm/panel/panel-edp.c             |   8 +-
> >  .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
> >  drivers/gpu/drm/panel/panel-simple.c          |   6 +-
> >  drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
> >  drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
> >  drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
> >  drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
> >  drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
> >  drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
> >  drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
> >  drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
> >  drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
> >  drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
> >  drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
> >  drivers/gpu/drm/tegra/submit.c                |   2 +-
> >  drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
> >  drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
> >  drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
> >  drivers/hwtracing/stm/core.c                  |   8 +-
> >  drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
> >  drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
> >  drivers/i2c/busses/i2c-at91-master.c          |   2 +-
> >  drivers/i2c/busses/i2c-cadence.c              |   2 +-
> >  drivers/i2c/busses/i2c-davinci.c              |   4 +-
> >  drivers/i2c/busses/i2c-designware-master.c    |   2 +-
> >  drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
> >  drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
> >  drivers/i2c/busses/i2c-i801.c                 |   4 +-
> >  drivers/i2c/busses/i2c-img-scb.c              |   6 +-
> >  drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
> >  drivers/i2c/busses/i2c-imx.c                  |   4 +-
> >  drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
> >  drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
> >  drivers/i2c/busses/i2c-omap.c                 |   6 +-
> >  drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
> >  drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
> >  drivers/i2c/busses/i2c-qup.c                  |   4 +-
> >  drivers/i2c/busses/i2c-riic.c                 |   4 +-
> >  drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
> >  drivers/i2c/busses/i2c-sprd.c                 |   4 +-
> >  drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
> >  drivers/i2c/busses/i2c-xiic.c                 |   2 +-
> >  drivers/i3c/master/dw-i3c-master.c            |  16 +-
> >  drivers/i3c/master/svc-i3c-master.c           |  16 +-
> >  drivers/iio/accel/bmc150-accel-core.c         |   2 +-
> >  drivers/iio/accel/bmi088-accel-core.c         |   6 +-
> >  drivers/iio/accel/fxls8962af-core.c           |   2 +-
> >  drivers/iio/accel/kxcjk-1013.c                |   2 +-
> >  drivers/iio/accel/kxsd9.c                     |   6 +-
> >  drivers/iio/accel/mma8452.c                   |   2 +-
> >  drivers/iio/accel/mma9551_core.c              |   2 +-
> >  drivers/iio/accel/msa311.c                    |  12 +-
> >  drivers/iio/adc/ab8500-gpadc.c                |   2 +-
> >  drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
> >  drivers/iio/adc/rcar-gyroadc.c                |   2 +-
> >  drivers/iio/adc/stm32-adc-core.c              |   2 +-
> >  drivers/iio/adc/stm32-adc.c                   |  12 +-
> >  drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
> >  drivers/iio/adc/ti-ads1015.c                  |   2 +-
> >  drivers/iio/adc/ti-ads1100.c                  |   2 +-
> >  drivers/iio/adc/ti-ads1119.c                  |   4 +-
> >  drivers/iio/chemical/atlas-sensor.c           |   4 +-
> >  .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
> >  drivers/iio/dac/stm32-dac.c                   |   6 +-
> >  drivers/iio/gyro/bmg160_core.c                |   2 +-
> >  drivers/iio/gyro/fxas21002c_core.c            |   2 +-
> >  drivers/iio/gyro/mpu3050-core.c               |   6 +-
> >  drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
> >  .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
> >  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
> >  drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
> >  drivers/iio/imu/kmx61.c                       |   2 +-
> >  drivers/iio/light/apds9306.c                  |   6 +-
> >  drivers/iio/light/apds9960.c                  |   4 +-
> >  drivers/iio/light/bh1780.c                    |   2 +-
> >  drivers/iio/light/gp2ap002.c                  |   4 +-
> >  drivers/iio/light/isl29028.c                  |   2 +-
> >  drivers/iio/light/ltrf216a.c                  |   2 +-
> >  drivers/iio/light/pa12203001.c                |   2 +-
> >  drivers/iio/light/rpr0521.c                   |   2 +-
> >  drivers/iio/light/tsl2583.c                   |   2 +-
> >  drivers/iio/light/tsl2591.c                   |   4 +-
> >  drivers/iio/light/us5182d.c                   |   2 +-
> >  drivers/iio/light/vcnl4000.c                  |   2 +-
> >  drivers/iio/light/vcnl4035.c                  |   2 +-
> >  drivers/iio/magnetometer/af8133j.c            |   4 +-
> >  drivers/iio/magnetometer/ak8974.c             |   4 +-
> >  drivers/iio/magnetometer/ak8975.c             |   2 +-
> >  drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
> >  drivers/iio/magnetometer/tmag5273.c           |   4 +-
> >  drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
> >  drivers/iio/pressure/bmp280-core.c            |  10 +-
> >  drivers/iio/pressure/icp10100.c               |   2 +-
> >  drivers/iio/pressure/mpl115.c                 |   4 +-
> >  drivers/iio/pressure/zpa2326.c                |   4 +-
> >  .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
> >  drivers/iio/proximity/srf04.c                 |   2 +-
> >  drivers/iio/temperature/mlx90614.c            |   4 +-
> >  drivers/iio/temperature/mlx90632.c            |   4 +-
> >  drivers/iio/temperature/mlx90635.c            |   4 +-
> >  drivers/input/keyboard/omap4-keypad.c         |   8 +-
> >  drivers/input/misc/cs40l50-vibra.c            |   8 +-
> >  drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
> >  drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
> >  drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
> >  drivers/media/i2c/alvium-csi2.c               |   2 +-
> >  drivers/media/i2c/ccs/ccs-core.c              |  10 +-
> >  drivers/media/i2c/dw9719.c                    |   2 +-
> >  drivers/media/i2c/gc0308.c                    |   6 +-
> >  drivers/media/i2c/gc2145.c                    |   8 +-
> >  drivers/media/i2c/imx283.c                    |   6 +-
> >  drivers/media/i2c/imx290.c                    |   6 +-
> >  drivers/media/i2c/imx296.c                    |   4 +-
> >  drivers/media/i2c/imx415.c                    |   4 +-
> >  drivers/media/i2c/mt9m114.c                   |  12 +-
> >  drivers/media/i2c/ov2680.c                    |   2 +-
> >  drivers/media/i2c/ov4689.c                    |   6 +-
> >  drivers/media/i2c/ov5640.c                    |   8 +-
> >  drivers/media/i2c/ov5645.c                    |   6 +-
> >  drivers/media/i2c/ov5693.c                    |   2 +-
> >  drivers/media/i2c/ov64a40.c                   |   8 +-
> >  drivers/media/i2c/ov7251.c                    |   2 +-
> >  drivers/media/i2c/ov8858.c                    |   4 +-
> >  drivers/media/i2c/thp7312.c                   |   8 +-
> >  drivers/media/i2c/video-i2c.c                 |   8 +-
> >  .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
> >  drivers/media/platform/qcom/venus/vdec.c      |   4 +-
> >  drivers/media/platform/qcom/venus/venc.c      |   4 +-
> >  .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
> >  .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
> >  drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
> >  .../media/platform/verisilicon/hantro_drv.c   |   2 +-
> >  drivers/media/rc/gpio-ir-recv.c               |   2 +-
> >  drivers/mfd/arizona-irq.c                     |   2 +-
> >  drivers/mfd/cs40l50-core.c                    |   2 +-
> >  drivers/mfd/cs42l43.c                         |   2 +-
> >  drivers/misc/mei/client.c                     |  14 +-
> >  drivers/mmc/core/core.c                       |   4 +-
> >  drivers/mmc/host/atmel-mci.c                  |   4 +-
> >  drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
> >  drivers/mmc/host/dw_mmc.c                     |   2 +-
> >  drivers/mmc/host/mmci.c                       |   2 +-
> >  drivers/mmc/host/omap_hsmmc.c                 |   6 +-
> >  drivers/mmc/host/sdhci-msm.c                  |   2 +-
> >  drivers/mmc/host/sdhci-of-at91.c              |   2 +-
> >  drivers/mmc/host/sdhci-omap.c                 |   4 +-
> >  drivers/mmc/host/sdhci-pci-core.c             |   2 +-
> >  drivers/mmc/host/sdhci-pxav3.c                |   6 +-
> >  drivers/mmc/host/sdhci-sprd.c                 |   2 +-
> >  drivers/mmc/host/sdhci-xenon.c                |   2 +-
> >  drivers/mmc/host/sdhci_am654.c                |   2 +-
> >  drivers/mmc/host/tmio_mmc_core.c              |   2 +-
> >  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
> >  drivers/net/ethernet/cadence/macb_main.c      |  10 +-
> >  drivers/net/ethernet/freescale/fec_main.c     |  16 +-
> >  drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
> >  drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
> >  drivers/net/ipa/ipa_interrupt.c               |   2 +-
> >  drivers/net/ipa/ipa_main.c                    |   2 +-
> >  drivers/net/ipa/ipa_modem.c                   |   8 +-
> >  drivers/net/ipa/ipa_smp2p.c                   |   4 +-
> >  drivers/net/ipa/ipa_uc.c                      |   4 +-
> >  drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
> >  drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
> >  drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
> >  drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
> >  drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
> >  drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
> >  drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
> >  drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
> >  drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
> >  drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
> >  drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
> >  drivers/nfc/trf7970a.c                        |   2 +-
> >  drivers/pci/pcie/portdrv.c                    |   2 +-
> >  drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
> >  drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
> >  drivers/power/supply/bq24190_charger.c        |  28 +--
> >  drivers/power/supply/twl4030_charger.c        |   2 +-
> >  drivers/pwm/pwm-img.c                         |   4 +-
> >  drivers/regulator/stm32-vrefbuf.c             |  12 +-
> >  drivers/remoteproc/omap_remoteproc.c          |   6 +-
> >  drivers/slimbus/core.c                        |   2 +-
> >  drivers/slimbus/messaging.c                   |   4 +-
> >  drivers/soc/apple/mailbox.c                   |   2 +-
> >  drivers/soundwire/bus.c                       |   2 +-
> >  drivers/soundwire/cadence_master.c            |   2 +-
> >  drivers/soundwire/qcom.c                      |   6 +-
> >  drivers/spi/atmel-quadspi.c                   |  10 +-
> >  drivers/spi/spi-cadence-quadspi.c             |   4 +-
> >  drivers/spi/spi-cadence.c                     |   2 +-
> >  drivers/spi/spi-dw-pci.c                      |   2 +-
> >  drivers/spi/spi-fsl-espi.c                    |   4 +-
> >  drivers/spi/spi-fsl-lpspi.c                   |   4 +-
> >  drivers/spi/spi-imx.c                         |   6 +-
> >  drivers/spi/spi-mtk-nor.c                     |   2 +-
> >  drivers/spi/spi-omap2-mcspi.c                 |   6 +-
> >  drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
> >  drivers/spi/spi-s3c64xx.c                     |   6 +-
> >  drivers/spi/spi-sprd.c                        |   2 +-
> >  drivers/spi/spi-stm32-qspi.c                  |  14 +-
> >  drivers/spi/spi-stm32.c                       |   4 +-
> >  drivers/spi/spi-ti-qspi.c                     |   4 +-
> >  drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
> >  drivers/spi/spi.c                             |   6 +-
> >  drivers/staging/greybus/gbphy.h               |   2 +-
> >  drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
> >  drivers/thunderbolt/debugfs.c                 |  22 +--
> >  drivers/thunderbolt/domain.c                  |   4 +-
> >  drivers/thunderbolt/icm.c                     |  14 +-
> >  drivers/thunderbolt/nhi.c                     |   2 +-
> >  drivers/thunderbolt/retimer.c                 |   4 +-
> >  drivers/thunderbolt/switch.c                  |   6 +-
> >  drivers/thunderbolt/tb.c                      |  18 +-
> >  drivers/thunderbolt/usb4_port.c               |   4 +-
> >  drivers/tty/serial/8250/8250_omap.c           |  18 +-
> >  drivers/tty/serial/8250/8250_port.c           |   4 +-
> >  drivers/tty/serial/fsl_lpuart.c               |   2 +-
> >  drivers/tty/serial/serial_core.c              |   2 +-
> >  drivers/tty/serial/uartlite.c                 |   4 +-
> >  drivers/tty/serial/xilinx_uartps.c            |   2 +-
> >  drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
> >  drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
> >  drivers/usb/chipidea/core.c                   |   2 +-
> >  drivers/usb/chipidea/otg_fsm.c                |   2 +-
> >  drivers/usb/dwc3/core.c                       |   2 +-
> >  drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
> >  drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
> >  drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
> >  drivers/usb/host/xhci-mtk.c                   |   2 +-
> >  drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
> >  drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
> >  drivers/usb/musb/musb_core.c                  |  10 +-
> >  drivers/usb/musb/musb_debugfs.c               |  10 +-
> >  drivers/usb/musb/musb_dsps.c                  |   2 +-
> >  drivers/usb/musb/musb_gadget.c                |   8 +-
> >  drivers/usb/musb/omap2430.c                   |   2 +-
> >  drivers/w1/masters/omap_hdq.c                 |  10 +-
> >  include/linux/greybus/bundle.h                |   2 +-
> >  sound/hda/hdac_device.c                       |   2 +-
> >  sound/pci/hda/cs35l41_hda.c                   |   8 +-
> >  sound/pci/hda/cs35l56_hda.c                   |   2 +-
> >  sound/pci/hda/hda_intel.c                     |   2 +-
> >  sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
> >  sound/soc/atmel/mchp-spdifrx.c                |  12 +-
> >  sound/soc/codecs/arizona-jack.c               |  12 +-
> >  sound/soc/codecs/arizona.c                    |   2 +-
> >  sound/soc/codecs/cs35l41.c                    |   4 +-
> >  sound/soc/codecs/cs35l45.c                    |   2 +-
> >  sound/soc/codecs/cs35l56-sdw.c                |   4 +-
> >  sound/soc/codecs/cs35l56-shared.c             |   2 +-
> >  sound/soc/codecs/cs35l56.c                    |   2 +-
> >  sound/soc/codecs/cs42l42-sdw.c                |   2 +-
> >  sound/soc/codecs/cs42l42.c                    |   4 +-
> >  sound/soc/codecs/cs42l43-jack.c               |  10 +-
> >  sound/soc/codecs/cs42l43.c                    |   4 +-
> >  sound/soc/codecs/hda.c                        |   6 +-
> >  sound/soc/codecs/madera.c                     |   6 +-
> >  sound/soc/codecs/max98363.c                   |   2 +-
> >  sound/soc/codecs/max98373-sdw.c               |   2 +-
> >  sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
> >  sound/soc/codecs/rt1308-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1316-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1318-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1320-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt5682-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt700.c                      |   4 +-
> >  sound/soc/codecs/rt711-sdca.c                 |   4 +-
> >  sound/soc/codecs/rt711.c                      |   4 +-
> >  sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
> >  sound/soc/codecs/rt712-sdca.c                 |   4 +-
> >  sound/soc/codecs/rt715-sdca.c                 |   2 +-
> >  sound/soc/codecs/rt715.c                      |   2 +-
> >  sound/soc/codecs/rt722-sdca.c                 |   4 +-
> >  sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
> >  sound/soc/codecs/wsa881x.c                    |   2 +-
> >  sound/soc/codecs/wsa884x.c                    |   2 +-
> >  sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
> >  sound/soc/intel/avs/core.c                    |   2 +-
> >  sound/soc/intel/avs/debugfs.c                 |   4 +-
> >  sound/soc/intel/avs/pcm.c                     |   2 +-
> >  sound/soc/intel/catpt/pcm.c                   |  12 +-
> >  sound/soc/intel/catpt/sysfs.c                 |   2 +-
> >  sound/soc/soc-component.c                     |   2 +-
> >  sound/soc/sof/control.c                       |   2 +-
> >  sound/soc/sof/debug.c                         |   2 +-
> >  sound/soc/sof/ipc3-dtrace.c                   |   2 +-
> >  sound/soc/sof/ipc4-loader.c                   |   2 +-
> >  sound/soc/sof/pcm.c                           |   2 +-
> >  sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
> >  .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
> >  sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
> >  sound/soc/sof/sof-client-probes.c             |   6 +-
> >  sound/x86/intel_hdmi_audio.c                  |   6 +-
> >  373 files changed, 1076 insertions(+), 1076 deletions(-)

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 18:49     ` Laurent Pinchart
  0 siblings, 0 replies; 122+ messages in thread
From: Laurent Pinchart @ 2024-10-07 18:49 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

Hi Ulf,

On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> >
> > Hello everyone,
> >
> > This set will switch the users of pm_runtime_put_autosuspend() to
> > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > always used together, apart from bugs which are likely common. Going
> > forward, most new users should be using pm_runtime_put_autosuspend().
> >
> > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > and pm_runtime_mark_last_busy().
> 
> That sounds like it could cause a lot of churns.
> 
> Why not add a new helper function that does the
> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> things? Then we can start moving users over to this new interface,
> rather than having this intermediate step?

I think the API would be nicer if we used the shortest and simplest
function names for the most common use cases. Following
pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
most common use case. That's why I like Sakari's approach of repurposing
pm_runtime_put_autosuspend(), and introducing
__pm_runtime_put_autosuspend() for the odd cases where
pm_runtime_mark_last_busy() shouldn't be called.

> > The diff in these patches have been generated using the following
> > Coccinelle script (besides a manual change in
> > drivers/iio/magnetometer/af8133j.c):
> >
> > ----------8<-------------------
> > @@
> > expression E1;
> >
> > @@
> >
> > - pm_runtime_put_autosuspend(E1)
> > + __pm_runtime_put_autosuspend(E1)
> > ----------8<-------------------
> >
> > These patches are on top of today's linux-next (i.e. next-20241004).
> >
> > Sakari Ailus (51):
> >   accel/ivpu: Switch to __pm_runtime_put_autosuspend()
> >   bluetooth: Switch to __pm_runtime_put_autosuspend()
> >   bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
> >   hwrng: Switch to __pm_runtime_put_autosuspend()
> >   clk: Switch to __pm_runtime_put_autosuspend()
> >   crypto: Switch to __pm_runtime_put_autosuspend()
> >   dmaengine: Switch to __pm_runtime_put_autosuspend()
> >   gpio: Switch to __pm_runtime_put_autosuspend()
> >   drm/amd: Switch to __pm_runtime_put_autosuspend()
> >   drm/nouveau: Switch to __pm_runtime_put_autosuspend()
> >   drm/radeon: Switch to __pm_runtime_put_autosuspend()
> >   drm/panfrost: Switch to __pm_runtime_put_autosuspend()
> >   drivers: drm: Switch to __pm_runtime_put_autosuspend()
> >   HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
> >   stm class: Switch to __pm_runtime_put_autosuspend()
> >   i2c: Switch to __pm_runtime_put_autosuspend()
> >   i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
> >   i3c: dw: Switch to __pm_runtime_put_autosuspend()
> >   iio: Switch to __pm_runtime_put_autosuspend()
> >   Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
> >   Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
> >   iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
> >   irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
> >   mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
> >   media: Switch to __pm_runtime_put_autosuspend()
> >   mfd: Switch to __pm_runtime_put_autosuspend()
> >   mei: Switch to __pm_runtime_put_autosuspend()
> >   mmc: Switch to __pm_runtime_put_autosuspend()
> >   mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
> >   net: Switch to __pm_runtime_put_autosuspend()
> >   nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
> >   PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
> >   phy: motorola: phy-mapphone-mdm6600: Switch to
> >     __pm_runtime_put_autosuspend()
> >   phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
> >   power: Switch to __pm_runtime_put_autosuspend()
> >   pwm: img: Switch to __pm_runtime_put_autosuspend()
> >   regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
> >   remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
> >   slimbus: Switch to __pm_runtime_put_autosuspend()
> >   soundwire: Switch to __pm_runtime_put_autosuspend()
> >   spi: Switch to __pm_runtime_put_autosuspend()
> >   staging: Switch to __pm_runtime_put_autosuspend()
> >   thunderbolt: Switch to __pm_runtime_put_autosuspend()
> >   serial: Switch to __pm_runtime_put_autosuspend()
> >   usb: Switch to __pm_runtime_put_autosuspend()
> >   w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
> >   staging: greybus: Switch to __pm_runtime_put_autosuspend()
> >   ALSA: hda: Switch to __pm_runtime_put_autosuspend()
> >   ASoC: Switch to __pm_runtime_put_autosuspend()
> >   ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
> >   soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()
> >
> >  drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
> >  drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
> >  drivers/bluetooth/btmtksdio.c                 |   2 +-
> >  drivers/bluetooth/hci_bcm.c                   |   6 +-
> >  drivers/bluetooth/hci_h5.c                    |   4 +-
> >  drivers/bluetooth/hci_intel.c                 |   6 +-
> >  drivers/bus/sunxi-rsb.c                       |   4 +-
> >  drivers/char/hw_random/cctrng.c               |   2 +-
> >  drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
> >  drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
> >  drivers/clk/imx/clk-scu.c                     |   2 +-
> >  drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
> >  drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
> >  drivers/crypto/ccree/cc_pm.c                  |   2 +-
> >  drivers/crypto/hisilicon/qm.c                 |   2 +-
> >  drivers/crypto/omap-aes-gcm.c                 |   2 +-
> >  drivers/crypto/omap-aes.c                     |   2 +-
> >  drivers/crypto/omap-des.c                     |   2 +-
> >  drivers/crypto/omap-sham.c                    |   2 +-
> >  drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
> >  .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
> >  drivers/crypto/stm32/stm32-crc32.c            |   4 +-
> >  drivers/crypto/stm32/stm32-cryp.c             |   2 +-
> >  drivers/crypto/stm32/stm32-hash.c             |   2 +-
> >  drivers/dma/at_xdmac.c                        |  24 +--
> >  drivers/dma/pl330.c                           |  14 +-
> >  drivers/dma/qcom/bam_dma.c                    |  10 +-
> >  drivers/dma/qcom/hidma.c                      |  18 +-
> >  drivers/dma/qcom/hidma_dbg.c                  |   2 +-
> >  drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
> >  drivers/dma/ste_dma40.c                       |  16 +-
> >  drivers/dma/ti/cppi41.c                       |  10 +-
> >  drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
> >  drivers/gpio/gpio-arizona.c                   |  10 +-
> >  drivers/gpio/gpio-mxc.c                       |   2 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
> >  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
> >  .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
> >  drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
> >  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
> >  drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
> >  .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
> >  drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
> >  drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
> >  drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
> >  drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
> >  drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
> >  drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
> >  drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
> >  drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
> >  drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
> >  drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
> >  drivers/gpu/drm/lima/lima_sched.c             |   2 +-
> >  drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
> >  drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
> >  drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
> >  drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
> >  drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
> >  drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
> >  drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
> >  drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
> >  drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
> >  drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
> >  drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
> >  drivers/gpu/drm/panel/panel-edp.c             |   8 +-
> >  .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
> >  drivers/gpu/drm/panel/panel-simple.c          |   6 +-
> >  drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
> >  drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
> >  drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
> >  drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
> >  drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
> >  drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
> >  drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
> >  drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
> >  drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
> >  drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
> >  drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
> >  drivers/gpu/drm/tegra/submit.c                |   2 +-
> >  drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
> >  drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
> >  drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
> >  drivers/hwtracing/stm/core.c                  |   8 +-
> >  drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
> >  drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
> >  drivers/i2c/busses/i2c-at91-master.c          |   2 +-
> >  drivers/i2c/busses/i2c-cadence.c              |   2 +-
> >  drivers/i2c/busses/i2c-davinci.c              |   4 +-
> >  drivers/i2c/busses/i2c-designware-master.c    |   2 +-
> >  drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
> >  drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
> >  drivers/i2c/busses/i2c-i801.c                 |   4 +-
> >  drivers/i2c/busses/i2c-img-scb.c              |   6 +-
> >  drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
> >  drivers/i2c/busses/i2c-imx.c                  |   4 +-
> >  drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
> >  drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
> >  drivers/i2c/busses/i2c-omap.c                 |   6 +-
> >  drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
> >  drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
> >  drivers/i2c/busses/i2c-qup.c                  |   4 +-
> >  drivers/i2c/busses/i2c-riic.c                 |   4 +-
> >  drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
> >  drivers/i2c/busses/i2c-sprd.c                 |   4 +-
> >  drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
> >  drivers/i2c/busses/i2c-xiic.c                 |   2 +-
> >  drivers/i3c/master/dw-i3c-master.c            |  16 +-
> >  drivers/i3c/master/svc-i3c-master.c           |  16 +-
> >  drivers/iio/accel/bmc150-accel-core.c         |   2 +-
> >  drivers/iio/accel/bmi088-accel-core.c         |   6 +-
> >  drivers/iio/accel/fxls8962af-core.c           |   2 +-
> >  drivers/iio/accel/kxcjk-1013.c                |   2 +-
> >  drivers/iio/accel/kxsd9.c                     |   6 +-
> >  drivers/iio/accel/mma8452.c                   |   2 +-
> >  drivers/iio/accel/mma9551_core.c              |   2 +-
> >  drivers/iio/accel/msa311.c                    |  12 +-
> >  drivers/iio/adc/ab8500-gpadc.c                |   2 +-
> >  drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
> >  drivers/iio/adc/rcar-gyroadc.c                |   2 +-
> >  drivers/iio/adc/stm32-adc-core.c              |   2 +-
> >  drivers/iio/adc/stm32-adc.c                   |  12 +-
> >  drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
> >  drivers/iio/adc/ti-ads1015.c                  |   2 +-
> >  drivers/iio/adc/ti-ads1100.c                  |   2 +-
> >  drivers/iio/adc/ti-ads1119.c                  |   4 +-
> >  drivers/iio/chemical/atlas-sensor.c           |   4 +-
> >  .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
> >  drivers/iio/dac/stm32-dac.c                   |   6 +-
> >  drivers/iio/gyro/bmg160_core.c                |   2 +-
> >  drivers/iio/gyro/fxas21002c_core.c            |   2 +-
> >  drivers/iio/gyro/mpu3050-core.c               |   6 +-
> >  drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
> >  .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
> >  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
> >  drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
> >  drivers/iio/imu/kmx61.c                       |   2 +-
> >  drivers/iio/light/apds9306.c                  |   6 +-
> >  drivers/iio/light/apds9960.c                  |   4 +-
> >  drivers/iio/light/bh1780.c                    |   2 +-
> >  drivers/iio/light/gp2ap002.c                  |   4 +-
> >  drivers/iio/light/isl29028.c                  |   2 +-
> >  drivers/iio/light/ltrf216a.c                  |   2 +-
> >  drivers/iio/light/pa12203001.c                |   2 +-
> >  drivers/iio/light/rpr0521.c                   |   2 +-
> >  drivers/iio/light/tsl2583.c                   |   2 +-
> >  drivers/iio/light/tsl2591.c                   |   4 +-
> >  drivers/iio/light/us5182d.c                   |   2 +-
> >  drivers/iio/light/vcnl4000.c                  |   2 +-
> >  drivers/iio/light/vcnl4035.c                  |   2 +-
> >  drivers/iio/magnetometer/af8133j.c            |   4 +-
> >  drivers/iio/magnetometer/ak8974.c             |   4 +-
> >  drivers/iio/magnetometer/ak8975.c             |   2 +-
> >  drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
> >  drivers/iio/magnetometer/tmag5273.c           |   4 +-
> >  drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
> >  drivers/iio/pressure/bmp280-core.c            |  10 +-
> >  drivers/iio/pressure/icp10100.c               |   2 +-
> >  drivers/iio/pressure/mpl115.c                 |   4 +-
> >  drivers/iio/pressure/zpa2326.c                |   4 +-
> >  .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
> >  drivers/iio/proximity/srf04.c                 |   2 +-
> >  drivers/iio/temperature/mlx90614.c            |   4 +-
> >  drivers/iio/temperature/mlx90632.c            |   4 +-
> >  drivers/iio/temperature/mlx90635.c            |   4 +-
> >  drivers/input/keyboard/omap4-keypad.c         |   8 +-
> >  drivers/input/misc/cs40l50-vibra.c            |   8 +-
> >  drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
> >  drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
> >  drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
> >  drivers/media/i2c/alvium-csi2.c               |   2 +-
> >  drivers/media/i2c/ccs/ccs-core.c              |  10 +-
> >  drivers/media/i2c/dw9719.c                    |   2 +-
> >  drivers/media/i2c/gc0308.c                    |   6 +-
> >  drivers/media/i2c/gc2145.c                    |   8 +-
> >  drivers/media/i2c/imx283.c                    |   6 +-
> >  drivers/media/i2c/imx290.c                    |   6 +-
> >  drivers/media/i2c/imx296.c                    |   4 +-
> >  drivers/media/i2c/imx415.c                    |   4 +-
> >  drivers/media/i2c/mt9m114.c                   |  12 +-
> >  drivers/media/i2c/ov2680.c                    |   2 +-
> >  drivers/media/i2c/ov4689.c                    |   6 +-
> >  drivers/media/i2c/ov5640.c                    |   8 +-
> >  drivers/media/i2c/ov5645.c                    |   6 +-
> >  drivers/media/i2c/ov5693.c                    |   2 +-
> >  drivers/media/i2c/ov64a40.c                   |   8 +-
> >  drivers/media/i2c/ov7251.c                    |   2 +-
> >  drivers/media/i2c/ov8858.c                    |   4 +-
> >  drivers/media/i2c/thp7312.c                   |   8 +-
> >  drivers/media/i2c/video-i2c.c                 |   8 +-
> >  .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
> >  drivers/media/platform/qcom/venus/vdec.c      |   4 +-
> >  drivers/media/platform/qcom/venus/venc.c      |   4 +-
> >  .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
> >  .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
> >  drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
> >  .../media/platform/verisilicon/hantro_drv.c   |   2 +-
> >  drivers/media/rc/gpio-ir-recv.c               |   2 +-
> >  drivers/mfd/arizona-irq.c                     |   2 +-
> >  drivers/mfd/cs40l50-core.c                    |   2 +-
> >  drivers/mfd/cs42l43.c                         |   2 +-
> >  drivers/misc/mei/client.c                     |  14 +-
> >  drivers/mmc/core/core.c                       |   4 +-
> >  drivers/mmc/host/atmel-mci.c                  |   4 +-
> >  drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
> >  drivers/mmc/host/dw_mmc.c                     |   2 +-
> >  drivers/mmc/host/mmci.c                       |   2 +-
> >  drivers/mmc/host/omap_hsmmc.c                 |   6 +-
> >  drivers/mmc/host/sdhci-msm.c                  |   2 +-
> >  drivers/mmc/host/sdhci-of-at91.c              |   2 +-
> >  drivers/mmc/host/sdhci-omap.c                 |   4 +-
> >  drivers/mmc/host/sdhci-pci-core.c             |   2 +-
> >  drivers/mmc/host/sdhci-pxav3.c                |   6 +-
> >  drivers/mmc/host/sdhci-sprd.c                 |   2 +-
> >  drivers/mmc/host/sdhci-xenon.c                |   2 +-
> >  drivers/mmc/host/sdhci_am654.c                |   2 +-
> >  drivers/mmc/host/tmio_mmc_core.c              |   2 +-
> >  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
> >  drivers/net/ethernet/cadence/macb_main.c      |  10 +-
> >  drivers/net/ethernet/freescale/fec_main.c     |  16 +-
> >  drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
> >  drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
> >  drivers/net/ipa/ipa_interrupt.c               |   2 +-
> >  drivers/net/ipa/ipa_main.c                    |   2 +-
> >  drivers/net/ipa/ipa_modem.c                   |   8 +-
> >  drivers/net/ipa/ipa_smp2p.c                   |   4 +-
> >  drivers/net/ipa/ipa_uc.c                      |   4 +-
> >  drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
> >  drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
> >  drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
> >  drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
> >  drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
> >  drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
> >  drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
> >  drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
> >  drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
> >  drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
> >  drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
> >  drivers/nfc/trf7970a.c                        |   2 +-
> >  drivers/pci/pcie/portdrv.c                    |   2 +-
> >  drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
> >  drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
> >  drivers/power/supply/bq24190_charger.c        |  28 +--
> >  drivers/power/supply/twl4030_charger.c        |   2 +-
> >  drivers/pwm/pwm-img.c                         |   4 +-
> >  drivers/regulator/stm32-vrefbuf.c             |  12 +-
> >  drivers/remoteproc/omap_remoteproc.c          |   6 +-
> >  drivers/slimbus/core.c                        |   2 +-
> >  drivers/slimbus/messaging.c                   |   4 +-
> >  drivers/soc/apple/mailbox.c                   |   2 +-
> >  drivers/soundwire/bus.c                       |   2 +-
> >  drivers/soundwire/cadence_master.c            |   2 +-
> >  drivers/soundwire/qcom.c                      |   6 +-
> >  drivers/spi/atmel-quadspi.c                   |  10 +-
> >  drivers/spi/spi-cadence-quadspi.c             |   4 +-
> >  drivers/spi/spi-cadence.c                     |   2 +-
> >  drivers/spi/spi-dw-pci.c                      |   2 +-
> >  drivers/spi/spi-fsl-espi.c                    |   4 +-
> >  drivers/spi/spi-fsl-lpspi.c                   |   4 +-
> >  drivers/spi/spi-imx.c                         |   6 +-
> >  drivers/spi/spi-mtk-nor.c                     |   2 +-
> >  drivers/spi/spi-omap2-mcspi.c                 |   6 +-
> >  drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
> >  drivers/spi/spi-s3c64xx.c                     |   6 +-
> >  drivers/spi/spi-sprd.c                        |   2 +-
> >  drivers/spi/spi-stm32-qspi.c                  |  14 +-
> >  drivers/spi/spi-stm32.c                       |   4 +-
> >  drivers/spi/spi-ti-qspi.c                     |   4 +-
> >  drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
> >  drivers/spi/spi.c                             |   6 +-
> >  drivers/staging/greybus/gbphy.h               |   2 +-
> >  drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
> >  drivers/thunderbolt/debugfs.c                 |  22 +--
> >  drivers/thunderbolt/domain.c                  |   4 +-
> >  drivers/thunderbolt/icm.c                     |  14 +-
> >  drivers/thunderbolt/nhi.c                     |   2 +-
> >  drivers/thunderbolt/retimer.c                 |   4 +-
> >  drivers/thunderbolt/switch.c                  |   6 +-
> >  drivers/thunderbolt/tb.c                      |  18 +-
> >  drivers/thunderbolt/usb4_port.c               |   4 +-
> >  drivers/tty/serial/8250/8250_omap.c           |  18 +-
> >  drivers/tty/serial/8250/8250_port.c           |   4 +-
> >  drivers/tty/serial/fsl_lpuart.c               |   2 +-
> >  drivers/tty/serial/serial_core.c              |   2 +-
> >  drivers/tty/serial/uartlite.c                 |   4 +-
> >  drivers/tty/serial/xilinx_uartps.c            |   2 +-
> >  drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
> >  drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
> >  drivers/usb/chipidea/core.c                   |   2 +-
> >  drivers/usb/chipidea/otg_fsm.c                |   2 +-
> >  drivers/usb/dwc3/core.c                       |   2 +-
> >  drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
> >  drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
> >  drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
> >  drivers/usb/host/xhci-mtk.c                   |   2 +-
> >  drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
> >  drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
> >  drivers/usb/musb/musb_core.c                  |  10 +-
> >  drivers/usb/musb/musb_debugfs.c               |  10 +-
> >  drivers/usb/musb/musb_dsps.c                  |   2 +-
> >  drivers/usb/musb/musb_gadget.c                |   8 +-
> >  drivers/usb/musb/omap2430.c                   |   2 +-
> >  drivers/w1/masters/omap_hdq.c                 |  10 +-
> >  include/linux/greybus/bundle.h                |   2 +-
> >  sound/hda/hdac_device.c                       |   2 +-
> >  sound/pci/hda/cs35l41_hda.c                   |   8 +-
> >  sound/pci/hda/cs35l56_hda.c                   |   2 +-
> >  sound/pci/hda/hda_intel.c                     |   2 +-
> >  sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
> >  sound/soc/atmel/mchp-spdifrx.c                |  12 +-
> >  sound/soc/codecs/arizona-jack.c               |  12 +-
> >  sound/soc/codecs/arizona.c                    |   2 +-
> >  sound/soc/codecs/cs35l41.c                    |   4 +-
> >  sound/soc/codecs/cs35l45.c                    |   2 +-
> >  sound/soc/codecs/cs35l56-sdw.c                |   4 +-
> >  sound/soc/codecs/cs35l56-shared.c             |   2 +-
> >  sound/soc/codecs/cs35l56.c                    |   2 +-
> >  sound/soc/codecs/cs42l42-sdw.c                |   2 +-
> >  sound/soc/codecs/cs42l42.c                    |   4 +-
> >  sound/soc/codecs/cs42l43-jack.c               |  10 +-
> >  sound/soc/codecs/cs42l43.c                    |   4 +-
> >  sound/soc/codecs/hda.c                        |   6 +-
> >  sound/soc/codecs/madera.c                     |   6 +-
> >  sound/soc/codecs/max98363.c                   |   2 +-
> >  sound/soc/codecs/max98373-sdw.c               |   2 +-
> >  sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
> >  sound/soc/codecs/rt1308-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1316-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1318-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1320-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt5682-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt700.c                      |   4 +-
> >  sound/soc/codecs/rt711-sdca.c                 |   4 +-
> >  sound/soc/codecs/rt711.c                      |   4 +-
> >  sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
> >  sound/soc/codecs/rt712-sdca.c                 |   4 +-
> >  sound/soc/codecs/rt715-sdca.c                 |   2 +-
> >  sound/soc/codecs/rt715.c                      |   2 +-
> >  sound/soc/codecs/rt722-sdca.c                 |   4 +-
> >  sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
> >  sound/soc/codecs/wsa881x.c                    |   2 +-
> >  sound/soc/codecs/wsa884x.c                    |   2 +-
> >  sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
> >  sound/soc/intel/avs/core.c                    |   2 +-
> >  sound/soc/intel/avs/debugfs.c                 |   4 +-
> >  sound/soc/intel/avs/pcm.c                     |   2 +-
> >  sound/soc/intel/catpt/pcm.c                   |  12 +-
> >  sound/soc/intel/catpt/sysfs.c                 |   2 +-
> >  sound/soc/soc-component.c                     |   2 +-
> >  sound/soc/sof/control.c                       |   2 +-
> >  sound/soc/sof/debug.c                         |   2 +-
> >  sound/soc/sof/ipc3-dtrace.c                   |   2 +-
> >  sound/soc/sof/ipc4-loader.c                   |   2 +-
> >  sound/soc/sof/pcm.c                           |   2 +-
> >  sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
> >  .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
> >  sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
> >  sound/soc/sof/sof-client-probes.c             |   6 +-
> >  sound/x86/intel_hdmi_audio.c                  |   6 +-
> >  373 files changed, 1076 insertions(+), 1076 deletions(-)

-- 
Regards,

Laurent Pinchart

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 18:49     ` Laurent Pinchart
  0 siblings, 0 replies; 122+ messages in thread
From: Laurent Pinchart @ 2024-10-07 18:49 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

Hi Ulf,

On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> >
> > Hello everyone,
> >
> > This set will switch the users of pm_runtime_put_autosuspend() to
> > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > always used together, apart from bugs which are likely common. Going
> > forward, most new users should be using pm_runtime_put_autosuspend().
> >
> > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > and pm_runtime_mark_last_busy().
> 
> That sounds like it could cause a lot of churns.
> 
> Why not add a new helper function that does the
> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> things? Then we can start moving users over to this new interface,
> rather than having this intermediate step?

I think the API would be nicer if we used the shortest and simplest
function names for the most common use cases. Following
pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
most common use case. That's why I like Sakari's approach of repurposing
pm_runtime_put_autosuspend(), and introducing
__pm_runtime_put_autosuspend() for the odd cases where
pm_runtime_mark_last_busy() shouldn't be called.

> > The diff in these patches have been generated using the following
> > Coccinelle script (besides a manual change in
> > drivers/iio/magnetometer/af8133j.c):
> >
> > ----------8<-------------------
> > @@
> > expression E1;
> >
> > @@
> >
> > - pm_runtime_put_autosuspend(E1)
> > + __pm_runtime_put_autosuspend(E1)
> > ----------8<-------------------
> >
> > These patches are on top of today's linux-next (i.e. next-20241004).
> >
> > Sakari Ailus (51):
> >   accel/ivpu: Switch to __pm_runtime_put_autosuspend()
> >   bluetooth: Switch to __pm_runtime_put_autosuspend()
> >   bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
> >   hwrng: Switch to __pm_runtime_put_autosuspend()
> >   clk: Switch to __pm_runtime_put_autosuspend()
> >   crypto: Switch to __pm_runtime_put_autosuspend()
> >   dmaengine: Switch to __pm_runtime_put_autosuspend()
> >   gpio: Switch to __pm_runtime_put_autosuspend()
> >   drm/amd: Switch to __pm_runtime_put_autosuspend()
> >   drm/nouveau: Switch to __pm_runtime_put_autosuspend()
> >   drm/radeon: Switch to __pm_runtime_put_autosuspend()
> >   drm/panfrost: Switch to __pm_runtime_put_autosuspend()
> >   drivers: drm: Switch to __pm_runtime_put_autosuspend()
> >   HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
> >   stm class: Switch to __pm_runtime_put_autosuspend()
> >   i2c: Switch to __pm_runtime_put_autosuspend()
> >   i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
> >   i3c: dw: Switch to __pm_runtime_put_autosuspend()
> >   iio: Switch to __pm_runtime_put_autosuspend()
> >   Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
> >   Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
> >   iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
> >   irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
> >   mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
> >   media: Switch to __pm_runtime_put_autosuspend()
> >   mfd: Switch to __pm_runtime_put_autosuspend()
> >   mei: Switch to __pm_runtime_put_autosuspend()
> >   mmc: Switch to __pm_runtime_put_autosuspend()
> >   mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
> >   net: Switch to __pm_runtime_put_autosuspend()
> >   nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
> >   PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
> >   phy: motorola: phy-mapphone-mdm6600: Switch to
> >     __pm_runtime_put_autosuspend()
> >   phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
> >   power: Switch to __pm_runtime_put_autosuspend()
> >   pwm: img: Switch to __pm_runtime_put_autosuspend()
> >   regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
> >   remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
> >   slimbus: Switch to __pm_runtime_put_autosuspend()
> >   soundwire: Switch to __pm_runtime_put_autosuspend()
> >   spi: Switch to __pm_runtime_put_autosuspend()
> >   staging: Switch to __pm_runtime_put_autosuspend()
> >   thunderbolt: Switch to __pm_runtime_put_autosuspend()
> >   serial: Switch to __pm_runtime_put_autosuspend()
> >   usb: Switch to __pm_runtime_put_autosuspend()
> >   w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
> >   staging: greybus: Switch to __pm_runtime_put_autosuspend()
> >   ALSA: hda: Switch to __pm_runtime_put_autosuspend()
> >   ASoC: Switch to __pm_runtime_put_autosuspend()
> >   ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
> >   soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()
> >
> >  drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
> >  drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
> >  drivers/bluetooth/btmtksdio.c                 |   2 +-
> >  drivers/bluetooth/hci_bcm.c                   |   6 +-
> >  drivers/bluetooth/hci_h5.c                    |   4 +-
> >  drivers/bluetooth/hci_intel.c                 |   6 +-
> >  drivers/bus/sunxi-rsb.c                       |   4 +-
> >  drivers/char/hw_random/cctrng.c               |   2 +-
> >  drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
> >  drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
> >  drivers/clk/imx/clk-scu.c                     |   2 +-
> >  drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
> >  drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
> >  drivers/crypto/ccree/cc_pm.c                  |   2 +-
> >  drivers/crypto/hisilicon/qm.c                 |   2 +-
> >  drivers/crypto/omap-aes-gcm.c                 |   2 +-
> >  drivers/crypto/omap-aes.c                     |   2 +-
> >  drivers/crypto/omap-des.c                     |   2 +-
> >  drivers/crypto/omap-sham.c                    |   2 +-
> >  drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
> >  .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
> >  drivers/crypto/stm32/stm32-crc32.c            |   4 +-
> >  drivers/crypto/stm32/stm32-cryp.c             |   2 +-
> >  drivers/crypto/stm32/stm32-hash.c             |   2 +-
> >  drivers/dma/at_xdmac.c                        |  24 +--
> >  drivers/dma/pl330.c                           |  14 +-
> >  drivers/dma/qcom/bam_dma.c                    |  10 +-
> >  drivers/dma/qcom/hidma.c                      |  18 +-
> >  drivers/dma/qcom/hidma_dbg.c                  |   2 +-
> >  drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
> >  drivers/dma/ste_dma40.c                       |  16 +-
> >  drivers/dma/ti/cppi41.c                       |  10 +-
> >  drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
> >  drivers/gpio/gpio-arizona.c                   |  10 +-
> >  drivers/gpio/gpio-mxc.c                       |   2 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
> >  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
> >  .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
> >  drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
> >  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
> >  drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
> >  .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
> >  drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
> >  drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
> >  drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
> >  drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
> >  drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
> >  drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
> >  drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
> >  drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
> >  drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
> >  drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
> >  drivers/gpu/drm/lima/lima_sched.c             |   2 +-
> >  drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
> >  drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
> >  drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
> >  drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
> >  drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
> >  drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
> >  drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
> >  drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
> >  drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
> >  drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
> >  drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
> >  drivers/gpu/drm/panel/panel-edp.c             |   8 +-
> >  .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
> >  drivers/gpu/drm/panel/panel-simple.c          |   6 +-
> >  drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
> >  drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
> >  drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
> >  drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
> >  drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
> >  drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
> >  drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
> >  drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
> >  drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
> >  drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
> >  drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
> >  drivers/gpu/drm/tegra/submit.c                |   2 +-
> >  drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
> >  drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
> >  drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
> >  drivers/hwtracing/stm/core.c                  |   8 +-
> >  drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
> >  drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
> >  drivers/i2c/busses/i2c-at91-master.c          |   2 +-
> >  drivers/i2c/busses/i2c-cadence.c              |   2 +-
> >  drivers/i2c/busses/i2c-davinci.c              |   4 +-
> >  drivers/i2c/busses/i2c-designware-master.c    |   2 +-
> >  drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
> >  drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
> >  drivers/i2c/busses/i2c-i801.c                 |   4 +-
> >  drivers/i2c/busses/i2c-img-scb.c              |   6 +-
> >  drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
> >  drivers/i2c/busses/i2c-imx.c                  |   4 +-
> >  drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
> >  drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
> >  drivers/i2c/busses/i2c-omap.c                 |   6 +-
> >  drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
> >  drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
> >  drivers/i2c/busses/i2c-qup.c                  |   4 +-
> >  drivers/i2c/busses/i2c-riic.c                 |   4 +-
> >  drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
> >  drivers/i2c/busses/i2c-sprd.c                 |   4 +-
> >  drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
> >  drivers/i2c/busses/i2c-xiic.c                 |   2 +-
> >  drivers/i3c/master/dw-i3c-master.c            |  16 +-
> >  drivers/i3c/master/svc-i3c-master.c           |  16 +-
> >  drivers/iio/accel/bmc150-accel-core.c         |   2 +-
> >  drivers/iio/accel/bmi088-accel-core.c         |   6 +-
> >  drivers/iio/accel/fxls8962af-core.c           |   2 +-
> >  drivers/iio/accel/kxcjk-1013.c                |   2 +-
> >  drivers/iio/accel/kxsd9.c                     |   6 +-
> >  drivers/iio/accel/mma8452.c                   |   2 +-
> >  drivers/iio/accel/mma9551_core.c              |   2 +-
> >  drivers/iio/accel/msa311.c                    |  12 +-
> >  drivers/iio/adc/ab8500-gpadc.c                |   2 +-
> >  drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
> >  drivers/iio/adc/rcar-gyroadc.c                |   2 +-
> >  drivers/iio/adc/stm32-adc-core.c              |   2 +-
> >  drivers/iio/adc/stm32-adc.c                   |  12 +-
> >  drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
> >  drivers/iio/adc/ti-ads1015.c                  |   2 +-
> >  drivers/iio/adc/ti-ads1100.c                  |   2 +-
> >  drivers/iio/adc/ti-ads1119.c                  |   4 +-
> >  drivers/iio/chemical/atlas-sensor.c           |   4 +-
> >  .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
> >  drivers/iio/dac/stm32-dac.c                   |   6 +-
> >  drivers/iio/gyro/bmg160_core.c                |   2 +-
> >  drivers/iio/gyro/fxas21002c_core.c            |   2 +-
> >  drivers/iio/gyro/mpu3050-core.c               |   6 +-
> >  drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
> >  .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
> >  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
> >  drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
> >  drivers/iio/imu/kmx61.c                       |   2 +-
> >  drivers/iio/light/apds9306.c                  |   6 +-
> >  drivers/iio/light/apds9960.c                  |   4 +-
> >  drivers/iio/light/bh1780.c                    |   2 +-
> >  drivers/iio/light/gp2ap002.c                  |   4 +-
> >  drivers/iio/light/isl29028.c                  |   2 +-
> >  drivers/iio/light/ltrf216a.c                  |   2 +-
> >  drivers/iio/light/pa12203001.c                |   2 +-
> >  drivers/iio/light/rpr0521.c                   |   2 +-
> >  drivers/iio/light/tsl2583.c                   |   2 +-
> >  drivers/iio/light/tsl2591.c                   |   4 +-
> >  drivers/iio/light/us5182d.c                   |   2 +-
> >  drivers/iio/light/vcnl4000.c                  |   2 +-
> >  drivers/iio/light/vcnl4035.c                  |   2 +-
> >  drivers/iio/magnetometer/af8133j.c            |   4 +-
> >  drivers/iio/magnetometer/ak8974.c             |   4 +-
> >  drivers/iio/magnetometer/ak8975.c             |   2 +-
> >  drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
> >  drivers/iio/magnetometer/tmag5273.c           |   4 +-
> >  drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
> >  drivers/iio/pressure/bmp280-core.c            |  10 +-
> >  drivers/iio/pressure/icp10100.c               |   2 +-
> >  drivers/iio/pressure/mpl115.c                 |   4 +-
> >  drivers/iio/pressure/zpa2326.c                |   4 +-
> >  .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
> >  drivers/iio/proximity/srf04.c                 |   2 +-
> >  drivers/iio/temperature/mlx90614.c            |   4 +-
> >  drivers/iio/temperature/mlx90632.c            |   4 +-
> >  drivers/iio/temperature/mlx90635.c            |   4 +-
> >  drivers/input/keyboard/omap4-keypad.c         |   8 +-
> >  drivers/input/misc/cs40l50-vibra.c            |   8 +-
> >  drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
> >  drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
> >  drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
> >  drivers/media/i2c/alvium-csi2.c               |   2 +-
> >  drivers/media/i2c/ccs/ccs-core.c              |  10 +-
> >  drivers/media/i2c/dw9719.c                    |   2 +-
> >  drivers/media/i2c/gc0308.c                    |   6 +-
> >  drivers/media/i2c/gc2145.c                    |   8 +-
> >  drivers/media/i2c/imx283.c                    |   6 +-
> >  drivers/media/i2c/imx290.c                    |   6 +-
> >  drivers/media/i2c/imx296.c                    |   4 +-
> >  drivers/media/i2c/imx415.c                    |   4 +-
> >  drivers/media/i2c/mt9m114.c                   |  12 +-
> >  drivers/media/i2c/ov2680.c                    |   2 +-
> >  drivers/media/i2c/ov4689.c                    |   6 +-
> >  drivers/media/i2c/ov5640.c                    |   8 +-
> >  drivers/media/i2c/ov5645.c                    |   6 +-
> >  drivers/media/i2c/ov5693.c                    |   2 +-
> >  drivers/media/i2c/ov64a40.c                   |   8 +-
> >  drivers/media/i2c/ov7251.c                    |   2 +-
> >  drivers/media/i2c/ov8858.c                    |   4 +-
> >  drivers/media/i2c/thp7312.c                   |   8 +-
> >  drivers/media/i2c/video-i2c.c                 |   8 +-
> >  .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
> >  drivers/media/platform/qcom/venus/vdec.c      |   4 +-
> >  drivers/media/platform/qcom/venus/venc.c      |   4 +-
> >  .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
> >  .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
> >  drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
> >  .../media/platform/verisilicon/hantro_drv.c   |   2 +-
> >  drivers/media/rc/gpio-ir-recv.c               |   2 +-
> >  drivers/mfd/arizona-irq.c                     |   2 +-
> >  drivers/mfd/cs40l50-core.c                    |   2 +-
> >  drivers/mfd/cs42l43.c                         |   2 +-
> >  drivers/misc/mei/client.c                     |  14 +-
> >  drivers/mmc/core/core.c                       |   4 +-
> >  drivers/mmc/host/atmel-mci.c                  |   4 +-
> >  drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
> >  drivers/mmc/host/dw_mmc.c                     |   2 +-
> >  drivers/mmc/host/mmci.c                       |   2 +-
> >  drivers/mmc/host/omap_hsmmc.c                 |   6 +-
> >  drivers/mmc/host/sdhci-msm.c                  |   2 +-
> >  drivers/mmc/host/sdhci-of-at91.c              |   2 +-
> >  drivers/mmc/host/sdhci-omap.c                 |   4 +-
> >  drivers/mmc/host/sdhci-pci-core.c             |   2 +-
> >  drivers/mmc/host/sdhci-pxav3.c                |   6 +-
> >  drivers/mmc/host/sdhci-sprd.c                 |   2 +-
> >  drivers/mmc/host/sdhci-xenon.c                |   2 +-
> >  drivers/mmc/host/sdhci_am654.c                |   2 +-
> >  drivers/mmc/host/tmio_mmc_core.c              |   2 +-
> >  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
> >  drivers/net/ethernet/cadence/macb_main.c      |  10 +-
> >  drivers/net/ethernet/freescale/fec_main.c     |  16 +-
> >  drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
> >  drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
> >  drivers/net/ipa/ipa_interrupt.c               |   2 +-
> >  drivers/net/ipa/ipa_main.c                    |   2 +-
> >  drivers/net/ipa/ipa_modem.c                   |   8 +-
> >  drivers/net/ipa/ipa_smp2p.c                   |   4 +-
> >  drivers/net/ipa/ipa_uc.c                      |   4 +-
> >  drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
> >  drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
> >  drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
> >  drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
> >  drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
> >  drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
> >  drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
> >  drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
> >  drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
> >  drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
> >  drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
> >  drivers/nfc/trf7970a.c                        |   2 +-
> >  drivers/pci/pcie/portdrv.c                    |   2 +-
> >  drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
> >  drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
> >  drivers/power/supply/bq24190_charger.c        |  28 +--
> >  drivers/power/supply/twl4030_charger.c        |   2 +-
> >  drivers/pwm/pwm-img.c                         |   4 +-
> >  drivers/regulator/stm32-vrefbuf.c             |  12 +-
> >  drivers/remoteproc/omap_remoteproc.c          |   6 +-
> >  drivers/slimbus/core.c                        |   2 +-
> >  drivers/slimbus/messaging.c                   |   4 +-
> >  drivers/soc/apple/mailbox.c                   |   2 +-
> >  drivers/soundwire/bus.c                       |   2 +-
> >  drivers/soundwire/cadence_master.c            |   2 +-
> >  drivers/soundwire/qcom.c                      |   6 +-
> >  drivers/spi/atmel-quadspi.c                   |  10 +-
> >  drivers/spi/spi-cadence-quadspi.c             |   4 +-
> >  drivers/spi/spi-cadence.c                     |   2 +-
> >  drivers/spi/spi-dw-pci.c                      |   2 +-
> >  drivers/spi/spi-fsl-espi.c                    |   4 +-
> >  drivers/spi/spi-fsl-lpspi.c                   |   4 +-
> >  drivers/spi/spi-imx.c                         |   6 +-
> >  drivers/spi/spi-mtk-nor.c                     |   2 +-
> >  drivers/spi/spi-omap2-mcspi.c                 |   6 +-
> >  drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
> >  drivers/spi/spi-s3c64xx.c                     |   6 +-
> >  drivers/spi/spi-sprd.c                        |   2 +-
> >  drivers/spi/spi-stm32-qspi.c                  |  14 +-
> >  drivers/spi/spi-stm32.c                       |   4 +-
> >  drivers/spi/spi-ti-qspi.c                     |   4 +-
> >  drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
> >  drivers/spi/spi.c                             |   6 +-
> >  drivers/staging/greybus/gbphy.h               |   2 +-
> >  drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
> >  drivers/thunderbolt/debugfs.c                 |  22 +--
> >  drivers/thunderbolt/domain.c                  |   4 +-
> >  drivers/thunderbolt/icm.c                     |  14 +-
> >  drivers/thunderbolt/nhi.c                     |   2 +-
> >  drivers/thunderbolt/retimer.c                 |   4 +-
> >  drivers/thunderbolt/switch.c                  |   6 +-
> >  drivers/thunderbolt/tb.c                      |  18 +-
> >  drivers/thunderbolt/usb4_port.c               |   4 +-
> >  drivers/tty/serial/8250/8250_omap.c           |  18 +-
> >  drivers/tty/serial/8250/8250_port.c           |   4 +-
> >  drivers/tty/serial/fsl_lpuart.c               |   2 +-
> >  drivers/tty/serial/serial_core.c              |   2 +-
> >  drivers/tty/serial/uartlite.c                 |   4 +-
> >  drivers/tty/serial/xilinx_uartps.c            |   2 +-
> >  drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
> >  drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
> >  drivers/usb/chipidea/core.c                   |   2 +-
> >  drivers/usb/chipidea/otg_fsm.c                |   2 +-
> >  drivers/usb/dwc3/core.c                       |   2 +-
> >  drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
> >  drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
> >  drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
> >  drivers/usb/host/xhci-mtk.c                   |   2 +-
> >  drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
> >  drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
> >  drivers/usb/musb/musb_core.c                  |  10 +-
> >  drivers/usb/musb/musb_debugfs.c               |  10 +-
> >  drivers/usb/musb/musb_dsps.c                  |   2 +-
> >  drivers/usb/musb/musb_gadget.c                |   8 +-
> >  drivers/usb/musb/omap2430.c                   |   2 +-
> >  drivers/w1/masters/omap_hdq.c                 |  10 +-
> >  include/linux/greybus/bundle.h                |   2 +-
> >  sound/hda/hdac_device.c                       |   2 +-
> >  sound/pci/hda/cs35l41_hda.c                   |   8 +-
> >  sound/pci/hda/cs35l56_hda.c                   |   2 +-
> >  sound/pci/hda/hda_intel.c                     |   2 +-
> >  sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
> >  sound/soc/atmel/mchp-spdifrx.c                |  12 +-
> >  sound/soc/codecs/arizona-jack.c               |  12 +-
> >  sound/soc/codecs/arizona.c                    |   2 +-
> >  sound/soc/codecs/cs35l41.c                    |   4 +-
> >  sound/soc/codecs/cs35l45.c                    |   2 +-
> >  sound/soc/codecs/cs35l56-sdw.c                |   4 +-
> >  sound/soc/codecs/cs35l56-shared.c             |   2 +-
> >  sound/soc/codecs/cs35l56.c                    |   2 +-
> >  sound/soc/codecs/cs42l42-sdw.c                |   2 +-
> >  sound/soc/codecs/cs42l42.c                    |   4 +-
> >  sound/soc/codecs/cs42l43-jack.c               |  10 +-
> >  sound/soc/codecs/cs42l43.c                    |   4 +-
> >  sound/soc/codecs/hda.c                        |   6 +-
> >  sound/soc/codecs/madera.c                     |   6 +-
> >  sound/soc/codecs/max98363.c                   |   2 +-
> >  sound/soc/codecs/max98373-sdw.c               |   2 +-
> >  sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
> >  sound/soc/codecs/rt1308-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1316-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1318-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1320-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt5682-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt700.c                      |   4 +-
> >  sound/soc/codecs/rt711-sdca.c                 |   4 +-
> >  sound/soc/codecs/rt711.c                      |   4 +-
> >  sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
> >  sound/soc/codecs/rt712-sdca.c                 |   4 +-
> >  sound/soc/codecs/rt715-sdca.c                 |   2 +-
> >  sound/soc/codecs/rt715.c                      |   2 +-
> >  sound/soc/codecs/rt722-sdca.c                 |   4 +-
> >  sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
> >  sound/soc/codecs/wsa881x.c                    |   2 +-
> >  sound/soc/codecs/wsa884x.c                    |   2 +-
> >  sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
> >  sound/soc/intel/avs/core.c                    |   2 +-
> >  sound/soc/intel/avs/debugfs.c                 |   4 +-
> >  sound/soc/intel/avs/pcm.c                     |   2 +-
> >  sound/soc/intel/catpt/pcm.c                   |  12 +-
> >  sound/soc/intel/catpt/sysfs.c                 |   2 +-
> >  sound/soc/soc-component.c                     |   2 +-
> >  sound/soc/sof/control.c                       |   2 +-
> >  sound/soc/sof/debug.c                         |   2 +-
> >  sound/soc/sof/ipc3-dtrace.c                   |   2 +-
> >  sound/soc/sof/ipc4-loader.c                   |   2 +-
> >  sound/soc/sof/pcm.c                           |   2 +-
> >  sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
> >  .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
> >  sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
> >  sound/soc/sof/sof-client-probes.c             |   6 +-
> >  sound/x86/intel_hdmi_audio.c                  |   6 +-
> >  373 files changed, 1076 insertions(+), 1076 deletions(-)

-- 
Regards,

Laurent Pinchart

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 18:49     ` Laurent Pinchart
  0 siblings, 0 replies; 122+ messages in thread
From: Laurent Pinchart @ 2024-10-07 18:49 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

Hi Ulf,

On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> >
> > Hello everyone,
> >
> > This set will switch the users of pm_runtime_put_autosuspend() to
> > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > always used together, apart from bugs which are likely common. Going
> > forward, most new users should be using pm_runtime_put_autosuspend().
> >
> > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > and pm_runtime_mark_last_busy().
> 
> That sounds like it could cause a lot of churns.
> 
> Why not add a new helper function that does the
> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> things? Then we can start moving users over to this new interface,
> rather than having this intermediate step?

I think the API would be nicer if we used the shortest and simplest
function names for the most common use cases. Following
pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
most common use case. That's why I like Sakari's approach of repurposing
pm_runtime_put_autosuspend(), and introducing
__pm_runtime_put_autosuspend() for the odd cases where
pm_runtime_mark_last_busy() shouldn't be called.

> > The diff in these patches have been generated using the following
> > Coccinelle script (besides a manual change in
> > drivers/iio/magnetometer/af8133j.c):
> >
> > ----------8<-------------------
> > @@
> > expression E1;
> >
> > @@
> >
> > - pm_runtime_put_autosuspend(E1)
> > + __pm_runtime_put_autosuspend(E1)
> > ----------8<-------------------
> >
> > These patches are on top of today's linux-next (i.e. next-20241004).
> >
> > Sakari Ailus (51):
> >   accel/ivpu: Switch to __pm_runtime_put_autosuspend()
> >   bluetooth: Switch to __pm_runtime_put_autosuspend()
> >   bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
> >   hwrng: Switch to __pm_runtime_put_autosuspend()
> >   clk: Switch to __pm_runtime_put_autosuspend()
> >   crypto: Switch to __pm_runtime_put_autosuspend()
> >   dmaengine: Switch to __pm_runtime_put_autosuspend()
> >   gpio: Switch to __pm_runtime_put_autosuspend()
> >   drm/amd: Switch to __pm_runtime_put_autosuspend()
> >   drm/nouveau: Switch to __pm_runtime_put_autosuspend()
> >   drm/radeon: Switch to __pm_runtime_put_autosuspend()
> >   drm/panfrost: Switch to __pm_runtime_put_autosuspend()
> >   drivers: drm: Switch to __pm_runtime_put_autosuspend()
> >   HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()
> >   stm class: Switch to __pm_runtime_put_autosuspend()
> >   i2c: Switch to __pm_runtime_put_autosuspend()
> >   i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
> >   i3c: dw: Switch to __pm_runtime_put_autosuspend()
> >   iio: Switch to __pm_runtime_put_autosuspend()
> >   Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
> >   Input: cs40l50: Switch to __pm_runtime_put_autosuspend()
> >   iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
> >   irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
> >   mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
> >   media: Switch to __pm_runtime_put_autosuspend()
> >   mfd: Switch to __pm_runtime_put_autosuspend()
> >   mei: Switch to __pm_runtime_put_autosuspend()
> >   mmc: Switch to __pm_runtime_put_autosuspend()
> >   mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
> >   net: Switch to __pm_runtime_put_autosuspend()
> >   nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()
> >   PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
> >   phy: motorola: phy-mapphone-mdm6600: Switch to
> >     __pm_runtime_put_autosuspend()
> >   phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
> >   power: Switch to __pm_runtime_put_autosuspend()
> >   pwm: img: Switch to __pm_runtime_put_autosuspend()
> >   regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
> >   remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
> >   slimbus: Switch to __pm_runtime_put_autosuspend()
> >   soundwire: Switch to __pm_runtime_put_autosuspend()
> >   spi: Switch to __pm_runtime_put_autosuspend()
> >   staging: Switch to __pm_runtime_put_autosuspend()
> >   thunderbolt: Switch to __pm_runtime_put_autosuspend()
> >   serial: Switch to __pm_runtime_put_autosuspend()
> >   usb: Switch to __pm_runtime_put_autosuspend()
> >   w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
> >   staging: greybus: Switch to __pm_runtime_put_autosuspend()
> >   ALSA: hda: Switch to __pm_runtime_put_autosuspend()
> >   ASoC: Switch to __pm_runtime_put_autosuspend()
> >   ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
> >   soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()
> >
> >  drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
> >  drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
> >  drivers/bluetooth/btmtksdio.c                 |   2 +-
> >  drivers/bluetooth/hci_bcm.c                   |   6 +-
> >  drivers/bluetooth/hci_h5.c                    |   4 +-
> >  drivers/bluetooth/hci_intel.c                 |   6 +-
> >  drivers/bus/sunxi-rsb.c                       |   4 +-
> >  drivers/char/hw_random/cctrng.c               |   2 +-
> >  drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
> >  drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
> >  drivers/clk/imx/clk-scu.c                     |   2 +-
> >  drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
> >  drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
> >  drivers/crypto/ccree/cc_pm.c                  |   2 +-
> >  drivers/crypto/hisilicon/qm.c                 |   2 +-
> >  drivers/crypto/omap-aes-gcm.c                 |   2 +-
> >  drivers/crypto/omap-aes.c                     |   2 +-
> >  drivers/crypto/omap-des.c                     |   2 +-
> >  drivers/crypto/omap-sham.c                    |   2 +-
> >  drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
> >  .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
> >  drivers/crypto/stm32/stm32-crc32.c            |   4 +-
> >  drivers/crypto/stm32/stm32-cryp.c             |   2 +-
> >  drivers/crypto/stm32/stm32-hash.c             |   2 +-
> >  drivers/dma/at_xdmac.c                        |  24 +--
> >  drivers/dma/pl330.c                           |  14 +-
> >  drivers/dma/qcom/bam_dma.c                    |  10 +-
> >  drivers/dma/qcom/hidma.c                      |  18 +-
> >  drivers/dma/qcom/hidma_dbg.c                  |   2 +-
> >  drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
> >  drivers/dma/ste_dma40.c                       |  16 +-
> >  drivers/dma/ti/cppi41.c                       |  10 +-
> >  drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
> >  drivers/gpio/gpio-arizona.c                   |  10 +-
> >  drivers/gpio/gpio-mxc.c                       |   2 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
> >  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
> >  .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
> >  drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
> >  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
> >  drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
> >  .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
> >  drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
> >  drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
> >  drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
> >  drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
> >  drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
> >  drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
> >  drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
> >  drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
> >  drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
> >  drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
> >  drivers/gpu/drm/lima/lima_sched.c             |   2 +-
> >  drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
> >  drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
> >  drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
> >  drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
> >  drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
> >  drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
> >  drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
> >  drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
> >  drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
> >  drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
> >  drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
> >  drivers/gpu/drm/panel/panel-edp.c             |   8 +-
> >  .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
> >  drivers/gpu/drm/panel/panel-simple.c          |   6 +-
> >  drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
> >  drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
> >  drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
> >  drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
> >  drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
> >  drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
> >  drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
> >  drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
> >  drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
> >  drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
> >  drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
> >  drivers/gpu/drm/tegra/submit.c                |   2 +-
> >  drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
> >  drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
> >  drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
> >  drivers/hwtracing/stm/core.c                  |   8 +-
> >  drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
> >  drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
> >  drivers/i2c/busses/i2c-at91-master.c          |   2 +-
> >  drivers/i2c/busses/i2c-cadence.c              |   2 +-
> >  drivers/i2c/busses/i2c-davinci.c              |   4 +-
> >  drivers/i2c/busses/i2c-designware-master.c    |   2 +-
> >  drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
> >  drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
> >  drivers/i2c/busses/i2c-i801.c                 |   4 +-
> >  drivers/i2c/busses/i2c-img-scb.c              |   6 +-
> >  drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
> >  drivers/i2c/busses/i2c-imx.c                  |   4 +-
> >  drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
> >  drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
> >  drivers/i2c/busses/i2c-omap.c                 |   6 +-
> >  drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
> >  drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
> >  drivers/i2c/busses/i2c-qup.c                  |   4 +-
> >  drivers/i2c/busses/i2c-riic.c                 |   4 +-
> >  drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
> >  drivers/i2c/busses/i2c-sprd.c                 |   4 +-
> >  drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
> >  drivers/i2c/busses/i2c-xiic.c                 |   2 +-
> >  drivers/i3c/master/dw-i3c-master.c            |  16 +-
> >  drivers/i3c/master/svc-i3c-master.c           |  16 +-
> >  drivers/iio/accel/bmc150-accel-core.c         |   2 +-
> >  drivers/iio/accel/bmi088-accel-core.c         |   6 +-
> >  drivers/iio/accel/fxls8962af-core.c           |   2 +-
> >  drivers/iio/accel/kxcjk-1013.c                |   2 +-
> >  drivers/iio/accel/kxsd9.c                     |   6 +-
> >  drivers/iio/accel/mma8452.c                   |   2 +-
> >  drivers/iio/accel/mma9551_core.c              |   2 +-
> >  drivers/iio/accel/msa311.c                    |  12 +-
> >  drivers/iio/adc/ab8500-gpadc.c                |   2 +-
> >  drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
> >  drivers/iio/adc/rcar-gyroadc.c                |   2 +-
> >  drivers/iio/adc/stm32-adc-core.c              |   2 +-
> >  drivers/iio/adc/stm32-adc.c                   |  12 +-
> >  drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
> >  drivers/iio/adc/ti-ads1015.c                  |   2 +-
> >  drivers/iio/adc/ti-ads1100.c                  |   2 +-
> >  drivers/iio/adc/ti-ads1119.c                  |   4 +-
> >  drivers/iio/chemical/atlas-sensor.c           |   4 +-
> >  .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
> >  drivers/iio/dac/stm32-dac.c                   |   6 +-
> >  drivers/iio/gyro/bmg160_core.c                |   2 +-
> >  drivers/iio/gyro/fxas21002c_core.c            |   2 +-
> >  drivers/iio/gyro/mpu3050-core.c               |   6 +-
> >  drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
> >  .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
> >  .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
> >  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
> >  drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
> >  drivers/iio/imu/kmx61.c                       |   2 +-
> >  drivers/iio/light/apds9306.c                  |   6 +-
> >  drivers/iio/light/apds9960.c                  |   4 +-
> >  drivers/iio/light/bh1780.c                    |   2 +-
> >  drivers/iio/light/gp2ap002.c                  |   4 +-
> >  drivers/iio/light/isl29028.c                  |   2 +-
> >  drivers/iio/light/ltrf216a.c                  |   2 +-
> >  drivers/iio/light/pa12203001.c                |   2 +-
> >  drivers/iio/light/rpr0521.c                   |   2 +-
> >  drivers/iio/light/tsl2583.c                   |   2 +-
> >  drivers/iio/light/tsl2591.c                   |   4 +-
> >  drivers/iio/light/us5182d.c                   |   2 +-
> >  drivers/iio/light/vcnl4000.c                  |   2 +-
> >  drivers/iio/light/vcnl4035.c                  |   2 +-
> >  drivers/iio/magnetometer/af8133j.c            |   4 +-
> >  drivers/iio/magnetometer/ak8974.c             |   4 +-
> >  drivers/iio/magnetometer/ak8975.c             |   2 +-
> >  drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
> >  drivers/iio/magnetometer/tmag5273.c           |   4 +-
> >  drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
> >  drivers/iio/pressure/bmp280-core.c            |  10 +-
> >  drivers/iio/pressure/icp10100.c               |   2 +-
> >  drivers/iio/pressure/mpl115.c                 |   4 +-
> >  drivers/iio/pressure/zpa2326.c                |   4 +-
> >  .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
> >  drivers/iio/proximity/srf04.c                 |   2 +-
> >  drivers/iio/temperature/mlx90614.c            |   4 +-
> >  drivers/iio/temperature/mlx90632.c            |   4 +-
> >  drivers/iio/temperature/mlx90635.c            |   4 +-
> >  drivers/input/keyboard/omap4-keypad.c         |   8 +-
> >  drivers/input/misc/cs40l50-vibra.c            |   8 +-
> >  drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
> >  drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
> >  drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
> >  drivers/media/i2c/alvium-csi2.c               |   2 +-
> >  drivers/media/i2c/ccs/ccs-core.c              |  10 +-
> >  drivers/media/i2c/dw9719.c                    |   2 +-
> >  drivers/media/i2c/gc0308.c                    |   6 +-
> >  drivers/media/i2c/gc2145.c                    |   8 +-
> >  drivers/media/i2c/imx283.c                    |   6 +-
> >  drivers/media/i2c/imx290.c                    |   6 +-
> >  drivers/media/i2c/imx296.c                    |   4 +-
> >  drivers/media/i2c/imx415.c                    |   4 +-
> >  drivers/media/i2c/mt9m114.c                   |  12 +-
> >  drivers/media/i2c/ov2680.c                    |   2 +-
> >  drivers/media/i2c/ov4689.c                    |   6 +-
> >  drivers/media/i2c/ov5640.c                    |   8 +-
> >  drivers/media/i2c/ov5645.c                    |   6 +-
> >  drivers/media/i2c/ov5693.c                    |   2 +-
> >  drivers/media/i2c/ov64a40.c                   |   8 +-
> >  drivers/media/i2c/ov7251.c                    |   2 +-
> >  drivers/media/i2c/ov8858.c                    |   4 +-
> >  drivers/media/i2c/thp7312.c                   |   8 +-
> >  drivers/media/i2c/video-i2c.c                 |   8 +-
> >  .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
> >  drivers/media/platform/qcom/venus/vdec.c      |   4 +-
> >  drivers/media/platform/qcom/venus/venc.c      |   4 +-
> >  .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
> >  .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
> >  drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
> >  .../media/platform/verisilicon/hantro_drv.c   |   2 +-
> >  drivers/media/rc/gpio-ir-recv.c               |   2 +-
> >  drivers/mfd/arizona-irq.c                     |   2 +-
> >  drivers/mfd/cs40l50-core.c                    |   2 +-
> >  drivers/mfd/cs42l43.c                         |   2 +-
> >  drivers/misc/mei/client.c                     |  14 +-
> >  drivers/mmc/core/core.c                       |   4 +-
> >  drivers/mmc/host/atmel-mci.c                  |   4 +-
> >  drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
> >  drivers/mmc/host/dw_mmc.c                     |   2 +-
> >  drivers/mmc/host/mmci.c                       |   2 +-
> >  drivers/mmc/host/omap_hsmmc.c                 |   6 +-
> >  drivers/mmc/host/sdhci-msm.c                  |   2 +-
> >  drivers/mmc/host/sdhci-of-at91.c              |   2 +-
> >  drivers/mmc/host/sdhci-omap.c                 |   4 +-
> >  drivers/mmc/host/sdhci-pci-core.c             |   2 +-
> >  drivers/mmc/host/sdhci-pxav3.c                |   6 +-
> >  drivers/mmc/host/sdhci-sprd.c                 |   2 +-
> >  drivers/mmc/host/sdhci-xenon.c                |   2 +-
> >  drivers/mmc/host/sdhci_am654.c                |   2 +-
> >  drivers/mmc/host/tmio_mmc_core.c              |   2 +-
> >  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
> >  drivers/net/ethernet/cadence/macb_main.c      |  10 +-
> >  drivers/net/ethernet/freescale/fec_main.c     |  16 +-
> >  drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
> >  drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
> >  drivers/net/ipa/ipa_interrupt.c               |   2 +-
> >  drivers/net/ipa/ipa_main.c                    |   2 +-
> >  drivers/net/ipa/ipa_modem.c                   |   8 +-
> >  drivers/net/ipa/ipa_smp2p.c                   |   4 +-
> >  drivers/net/ipa/ipa_uc.c                      |   4 +-
> >  drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
> >  drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
> >  drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
> >  drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
> >  drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
> >  drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
> >  drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
> >  drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
> >  drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
> >  drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
> >  drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
> >  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
> >  drivers/nfc/trf7970a.c                        |   2 +-
> >  drivers/pci/pcie/portdrv.c                    |   2 +-
> >  drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
> >  drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
> >  drivers/power/supply/bq24190_charger.c        |  28 +--
> >  drivers/power/supply/twl4030_charger.c        |   2 +-
> >  drivers/pwm/pwm-img.c                         |   4 +-
> >  drivers/regulator/stm32-vrefbuf.c             |  12 +-
> >  drivers/remoteproc/omap_remoteproc.c          |   6 +-
> >  drivers/slimbus/core.c                        |   2 +-
> >  drivers/slimbus/messaging.c                   |   4 +-
> >  drivers/soc/apple/mailbox.c                   |   2 +-
> >  drivers/soundwire/bus.c                       |   2 +-
> >  drivers/soundwire/cadence_master.c            |   2 +-
> >  drivers/soundwire/qcom.c                      |   6 +-
> >  drivers/spi/atmel-quadspi.c                   |  10 +-
> >  drivers/spi/spi-cadence-quadspi.c             |   4 +-
> >  drivers/spi/spi-cadence.c                     |   2 +-
> >  drivers/spi/spi-dw-pci.c                      |   2 +-
> >  drivers/spi/spi-fsl-espi.c                    |   4 +-
> >  drivers/spi/spi-fsl-lpspi.c                   |   4 +-
> >  drivers/spi/spi-imx.c                         |   6 +-
> >  drivers/spi/spi-mtk-nor.c                     |   2 +-
> >  drivers/spi/spi-omap2-mcspi.c                 |   6 +-
> >  drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
> >  drivers/spi/spi-s3c64xx.c                     |   6 +-
> >  drivers/spi/spi-sprd.c                        |   2 +-
> >  drivers/spi/spi-stm32-qspi.c                  |  14 +-
> >  drivers/spi/spi-stm32.c                       |   4 +-
> >  drivers/spi/spi-ti-qspi.c                     |   4 +-
> >  drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
> >  drivers/spi/spi.c                             |   6 +-
> >  drivers/staging/greybus/gbphy.h               |   2 +-
> >  drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
> >  drivers/thunderbolt/debugfs.c                 |  22 +--
> >  drivers/thunderbolt/domain.c                  |   4 +-
> >  drivers/thunderbolt/icm.c                     |  14 +-
> >  drivers/thunderbolt/nhi.c                     |   2 +-
> >  drivers/thunderbolt/retimer.c                 |   4 +-
> >  drivers/thunderbolt/switch.c                  |   6 +-
> >  drivers/thunderbolt/tb.c                      |  18 +-
> >  drivers/thunderbolt/usb4_port.c               |   4 +-
> >  drivers/tty/serial/8250/8250_omap.c           |  18 +-
> >  drivers/tty/serial/8250/8250_port.c           |   4 +-
> >  drivers/tty/serial/fsl_lpuart.c               |   2 +-
> >  drivers/tty/serial/serial_core.c              |   2 +-
> >  drivers/tty/serial/uartlite.c                 |   4 +-
> >  drivers/tty/serial/xilinx_uartps.c            |   2 +-
> >  drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
> >  drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
> >  drivers/usb/chipidea/core.c                   |   2 +-
> >  drivers/usb/chipidea/otg_fsm.c                |   2 +-
> >  drivers/usb/dwc3/core.c                       |   2 +-
> >  drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
> >  drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
> >  drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
> >  drivers/usb/host/xhci-mtk.c                   |   2 +-
> >  drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
> >  drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
> >  drivers/usb/musb/musb_core.c                  |  10 +-
> >  drivers/usb/musb/musb_debugfs.c               |  10 +-
> >  drivers/usb/musb/musb_dsps.c                  |   2 +-
> >  drivers/usb/musb/musb_gadget.c                |   8 +-
> >  drivers/usb/musb/omap2430.c                   |   2 +-
> >  drivers/w1/masters/omap_hdq.c                 |  10 +-
> >  include/linux/greybus/bundle.h                |   2 +-
> >  sound/hda/hdac_device.c                       |   2 +-
> >  sound/pci/hda/cs35l41_hda.c                   |   8 +-
> >  sound/pci/hda/cs35l56_hda.c                   |   2 +-
> >  sound/pci/hda/hda_intel.c                     |   2 +-
> >  sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
> >  sound/soc/atmel/mchp-spdifrx.c                |  12 +-
> >  sound/soc/codecs/arizona-jack.c               |  12 +-
> >  sound/soc/codecs/arizona.c                    |   2 +-
> >  sound/soc/codecs/cs35l41.c                    |   4 +-
> >  sound/soc/codecs/cs35l45.c                    |   2 +-
> >  sound/soc/codecs/cs35l56-sdw.c                |   4 +-
> >  sound/soc/codecs/cs35l56-shared.c             |   2 +-
> >  sound/soc/codecs/cs35l56.c                    |   2 +-
> >  sound/soc/codecs/cs42l42-sdw.c                |   2 +-
> >  sound/soc/codecs/cs42l42.c                    |   4 +-
> >  sound/soc/codecs/cs42l43-jack.c               |  10 +-
> >  sound/soc/codecs/cs42l43.c                    |   4 +-
> >  sound/soc/codecs/hda.c                        |   6 +-
> >  sound/soc/codecs/madera.c                     |   6 +-
> >  sound/soc/codecs/max98363.c                   |   2 +-
> >  sound/soc/codecs/max98373-sdw.c               |   2 +-
> >  sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
> >  sound/soc/codecs/rt1308-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1316-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1318-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt1320-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt5682-sdw.c                 |   2 +-
> >  sound/soc/codecs/rt700.c                      |   4 +-
> >  sound/soc/codecs/rt711-sdca.c                 |   4 +-
> >  sound/soc/codecs/rt711.c                      |   4 +-
> >  sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
> >  sound/soc/codecs/rt712-sdca.c                 |   4 +-
> >  sound/soc/codecs/rt715-sdca.c                 |   2 +-
> >  sound/soc/codecs/rt715.c                      |   2 +-
> >  sound/soc/codecs/rt722-sdca.c                 |   4 +-
> >  sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
> >  sound/soc/codecs/wsa881x.c                    |   2 +-
> >  sound/soc/codecs/wsa884x.c                    |   2 +-
> >  sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
> >  sound/soc/intel/avs/core.c                    |   2 +-
> >  sound/soc/intel/avs/debugfs.c                 |   4 +-
> >  sound/soc/intel/avs/pcm.c                     |   2 +-
> >  sound/soc/intel/catpt/pcm.c                   |  12 +-
> >  sound/soc/intel/catpt/sysfs.c                 |   2 +-
> >  sound/soc/soc-component.c                     |   2 +-
> >  sound/soc/sof/control.c                       |   2 +-
> >  sound/soc/sof/debug.c                         |   2 +-
> >  sound/soc/sof/ipc3-dtrace.c                   |   2 +-
> >  sound/soc/sof/ipc4-loader.c                   |   2 +-
> >  sound/soc/sof/pcm.c                           |   2 +-
> >  sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
> >  .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
> >  sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
> >  sound/soc/sof/sof-client-probes.c             |   6 +-
> >  sound/x86/intel_hdmi_audio.c                  |   6 +-
> >  373 files changed, 1076 insertions(+), 1076 deletions(-)

-- 
Regards,

Laurent Pinchart

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-07 18:49     ` Laurent Pinchart
  (?)
  (?)
@ 2024-10-07 22:08       ` Ulf Hansson
  -1 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-07 22:08 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Ulf,
>
> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> > >
> > > Hello everyone,
> > >
> > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > always used together, apart from bugs which are likely common. Going
> > > forward, most new users should be using pm_runtime_put_autosuspend().
> > >
> > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > and pm_runtime_mark_last_busy().
> >
> > That sounds like it could cause a lot of churns.
> >
> > Why not add a new helper function that does the
> > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > things? Then we can start moving users over to this new interface,
> > rather than having this intermediate step?
>
> I think the API would be nicer if we used the shortest and simplest
> function names for the most common use cases. Following
> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> most common use case. That's why I like Sakari's approach of repurposing
> pm_runtime_put_autosuspend(), and introducing
> __pm_runtime_put_autosuspend() for the odd cases where
> pm_runtime_mark_last_busy() shouldn't be called.

Okay, so the reason for this approach is because we couldn't find a
short and descriptive name that could be used in favor of
pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
you like it - or not. :-)

I don't know what options you guys discussed, but to me the entire
"autosuspend"-suffix isn't really that necessary in my opinion. There
are more ways than calling pm_runtime_put_autosuspend() that triggers
us to use the RPM_AUTO flag for rpm_suspend(). For example, just
calling pm_runtime_put() has the similar effect.

Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
during rpm_resume() too, for example. So why bother about having
"mark_last_busy" in the new name too.

That said, my suggestion is simply "pm_runtime_put_suspend".

If you don't like it, I will certainly not object to your current
approach, even if I think it leads to unnecessary churns.

[...]

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 22:08       ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-07 22:08 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Ulf,
>
> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> > >
> > > Hello everyone,
> > >
> > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > always used together, apart from bugs which are likely common. Going
> > > forward, most new users should be using pm_runtime_put_autosuspend().
> > >
> > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > and pm_runtime_mark_last_busy().
> >
> > That sounds like it could cause a lot of churns.
> >
> > Why not add a new helper function that does the
> > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > things? Then we can start moving users over to this new interface,
> > rather than having this intermediate step?
>
> I think the API would be nicer if we used the shortest and simplest
> function names for the most common use cases. Following
> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> most common use case. That's why I like Sakari's approach of repurposing
> pm_runtime_put_autosuspend(), and introducing
> __pm_runtime_put_autosuspend() for the odd cases where
> pm_runtime_mark_last_busy() shouldn't be called.

Okay, so the reason for this approach is because we couldn't find a
short and descriptive name that could be used in favor of
pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
you like it - or not. :-)

I don't know what options you guys discussed, but to me the entire
"autosuspend"-suffix isn't really that necessary in my opinion. There
are more ways than calling pm_runtime_put_autosuspend() that triggers
us to use the RPM_AUTO flag for rpm_suspend(). For example, just
calling pm_runtime_put() has the similar effect.

Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
during rpm_resume() too, for example. So why bother about having
"mark_last_busy" in the new name too.

That said, my suggestion is simply "pm_runtime_put_suspend".

If you don't like it, I will certainly not object to your current
approach, even if I think it leads to unnecessary churns.

[...]

Kind regards
Uffe

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 22:08       ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-07 22:08 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Ulf,
>
> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> > >
> > > Hello everyone,
> > >
> > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > always used together, apart from bugs which are likely common. Going
> > > forward, most new users should be using pm_runtime_put_autosuspend().
> > >
> > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > and pm_runtime_mark_last_busy().
> >
> > That sounds like it could cause a lot of churns.
> >
> > Why not add a new helper function that does the
> > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > things? Then we can start moving users over to this new interface,
> > rather than having this intermediate step?
>
> I think the API would be nicer if we used the shortest and simplest
> function names for the most common use cases. Following
> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> most common use case. That's why I like Sakari's approach of repurposing
> pm_runtime_put_autosuspend(), and introducing
> __pm_runtime_put_autosuspend() for the odd cases where
> pm_runtime_mark_last_busy() shouldn't be called.

Okay, so the reason for this approach is because we couldn't find a
short and descriptive name that could be used in favor of
pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
you like it - or not. :-)

I don't know what options you guys discussed, but to me the entire
"autosuspend"-suffix isn't really that necessary in my opinion. There
are more ways than calling pm_runtime_put_autosuspend() that triggers
us to use the RPM_AUTO flag for rpm_suspend(). For example, just
calling pm_runtime_put() has the similar effect.

Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
during rpm_resume() too, for example. So why bother about having
"mark_last_busy" in the new name too.

That said, my suggestion is simply "pm_runtime_put_suspend".

If you don't like it, I will certainly not object to your current
approach, even if I think it leads to unnecessary churns.

[...]

Kind regards
Uffe

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 22:08       ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-07 22:08 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Ulf,
>
> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> > >
> > > Hello everyone,
> > >
> > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > always used together, apart from bugs which are likely common. Going
> > > forward, most new users should be using pm_runtime_put_autosuspend().
> > >
> > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > and pm_runtime_mark_last_busy().
> >
> > That sounds like it could cause a lot of churns.
> >
> > Why not add a new helper function that does the
> > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > things? Then we can start moving users over to this new interface,
> > rather than having this intermediate step?
>
> I think the API would be nicer if we used the shortest and simplest
> function names for the most common use cases. Following
> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> most common use case. That's why I like Sakari's approach of repurposing
> pm_runtime_put_autosuspend(), and introducing
> __pm_runtime_put_autosuspend() for the odd cases where
> pm_runtime_mark_last_busy() shouldn't be called.

Okay, so the reason for this approach is because we couldn't find a
short and descriptive name that could be used in favor of
pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
you like it - or not. :-)

I don't know what options you guys discussed, but to me the entire
"autosuspend"-suffix isn't really that necessary in my opinion. There
are more ways than calling pm_runtime_put_autosuspend() that triggers
us to use the RPM_AUTO flag for rpm_suspend(). For example, just
calling pm_runtime_put() has the similar effect.

Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
during rpm_resume() too, for example. So why bother about having
"mark_last_busy" in the new name too.

That said, my suggestion is simply "pm_runtime_put_suspend".

If you don't like it, I will certainly not object to your current
approach, even if I think it leads to unnecessary churns.

[...]

Kind regards
Uffe

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-07 22:08       ` Ulf Hansson
  (?)
  (?)
@ 2024-10-07 22:25         ` Laurent Pinchart
  -1 siblings, 0 replies; 122+ messages in thread
From: Laurent Pinchart @ 2024-10-07 22:25 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

Hi Ulf,

On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > >
> > > > Hello everyone,
> > > >
> > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > always used together, apart from bugs which are likely common. Going
> > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > >
> > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > and pm_runtime_mark_last_busy().
> > >
> > > That sounds like it could cause a lot of churns.
> > >
> > > Why not add a new helper function that does the
> > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > things? Then we can start moving users over to this new interface,
> > > rather than having this intermediate step?
> >
> > I think the API would be nicer if we used the shortest and simplest
> > function names for the most common use cases. Following
> > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > most common use case. That's why I like Sakari's approach of repurposing
> > pm_runtime_put_autosuspend(), and introducing
> > __pm_runtime_put_autosuspend() for the odd cases where
> > pm_runtime_mark_last_busy() shouldn't be called.
> 
> Okay, so the reason for this approach is because we couldn't find a
> short and descriptive name that could be used in favor of
> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> you like it - or not. :-)

I like the idea at least :-)

> I don't know what options you guys discussed, but to me the entire
> "autosuspend"-suffix isn't really that necessary in my opinion. There
> are more ways than calling pm_runtime_put_autosuspend() that triggers
> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> calling pm_runtime_put() has the similar effect.

To be honest, I'm lost there. pm_runtime_put() calls
__pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
RPM_ASYNC | RPM_AUTO).

> 
> Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> during rpm_resume() too, for example. So why bother about having
> "mark_last_busy" in the new name too.
> 
> That said, my suggestion is simply "pm_runtime_put_suspend".

Can we do even better, and make pm_runtime_put() to handle autosuspend
automatically when autosuspend is enabled ?

> If you don't like it, I will certainly not object to your current
> approach, even if I think it leads to unnecessary churns.
> 
> [...]
> 
> Kind regards
> Uffe

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 22:25         ` Laurent Pinchart
  0 siblings, 0 replies; 122+ messages in thread
From: Laurent Pinchart @ 2024-10-07 22:25 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

Hi Ulf,

On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > >
> > > > Hello everyone,
> > > >
> > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > always used together, apart from bugs which are likely common. Going
> > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > >
> > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > and pm_runtime_mark_last_busy().
> > >
> > > That sounds like it could cause a lot of churns.
> > >
> > > Why not add a new helper function that does the
> > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > things? Then we can start moving users over to this new interface,
> > > rather than having this intermediate step?
> >
> > I think the API would be nicer if we used the shortest and simplest
> > function names for the most common use cases. Following
> > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > most common use case. That's why I like Sakari's approach of repurposing
> > pm_runtime_put_autosuspend(), and introducing
> > __pm_runtime_put_autosuspend() for the odd cases where
> > pm_runtime_mark_last_busy() shouldn't be called.
> 
> Okay, so the reason for this approach is because we couldn't find a
> short and descriptive name that could be used in favor of
> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> you like it - or not. :-)

I like the idea at least :-)

> I don't know what options you guys discussed, but to me the entire
> "autosuspend"-suffix isn't really that necessary in my opinion. There
> are more ways than calling pm_runtime_put_autosuspend() that triggers
> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> calling pm_runtime_put() has the similar effect.

To be honest, I'm lost there. pm_runtime_put() calls
__pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
RPM_ASYNC | RPM_AUTO).

> 
> Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> during rpm_resume() too, for example. So why bother about having
> "mark_last_busy" in the new name too.
> 
> That said, my suggestion is simply "pm_runtime_put_suspend".

Can we do even better, and make pm_runtime_put() to handle autosuspend
automatically when autosuspend is enabled ?

> If you don't like it, I will certainly not object to your current
> approach, even if I think it leads to unnecessary churns.
> 
> [...]
> 
> Kind regards
> Uffe

-- 
Regards,

Laurent Pinchart

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 22:25         ` Laurent Pinchart
  0 siblings, 0 replies; 122+ messages in thread
From: Laurent Pinchart @ 2024-10-07 22:25 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

Hi Ulf,

On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > >
> > > > Hello everyone,
> > > >
> > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > always used together, apart from bugs which are likely common. Going
> > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > >
> > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > and pm_runtime_mark_last_busy().
> > >
> > > That sounds like it could cause a lot of churns.
> > >
> > > Why not add a new helper function that does the
> > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > things? Then we can start moving users over to this new interface,
> > > rather than having this intermediate step?
> >
> > I think the API would be nicer if we used the shortest and simplest
> > function names for the most common use cases. Following
> > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > most common use case. That's why I like Sakari's approach of repurposing
> > pm_runtime_put_autosuspend(), and introducing
> > __pm_runtime_put_autosuspend() for the odd cases where
> > pm_runtime_mark_last_busy() shouldn't be called.
> 
> Okay, so the reason for this approach is because we couldn't find a
> short and descriptive name that could be used in favor of
> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> you like it - or not. :-)

I like the idea at least :-)

> I don't know what options you guys discussed, but to me the entire
> "autosuspend"-suffix isn't really that necessary in my opinion. There
> are more ways than calling pm_runtime_put_autosuspend() that triggers
> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> calling pm_runtime_put() has the similar effect.

To be honest, I'm lost there. pm_runtime_put() calls
__pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
RPM_ASYNC | RPM_AUTO).

> 
> Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> during rpm_resume() too, for example. So why bother about having
> "mark_last_busy" in the new name too.
> 
> That said, my suggestion is simply "pm_runtime_put_suspend".

Can we do even better, and make pm_runtime_put() to handle autosuspend
automatically when autosuspend is enabled ?

> If you don't like it, I will certainly not object to your current
> approach, even if I think it leads to unnecessary churns.
> 
> [...]
> 
> Kind regards
> Uffe

-- 
Regards,

Laurent Pinchart

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 22:25         ` Laurent Pinchart
  0 siblings, 0 replies; 122+ messages in thread
From: Laurent Pinchart @ 2024-10-07 22:25 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

Hi Ulf,

On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > >
> > > > Hello everyone,
> > > >
> > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > always used together, apart from bugs which are likely common. Going
> > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > >
> > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > and pm_runtime_mark_last_busy().
> > >
> > > That sounds like it could cause a lot of churns.
> > >
> > > Why not add a new helper function that does the
> > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > things? Then we can start moving users over to this new interface,
> > > rather than having this intermediate step?
> >
> > I think the API would be nicer if we used the shortest and simplest
> > function names for the most common use cases. Following
> > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > most common use case. That's why I like Sakari's approach of repurposing
> > pm_runtime_put_autosuspend(), and introducing
> > __pm_runtime_put_autosuspend() for the odd cases where
> > pm_runtime_mark_last_busy() shouldn't be called.
> 
> Okay, so the reason for this approach is because we couldn't find a
> short and descriptive name that could be used in favor of
> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> you like it - or not. :-)

I like the idea at least :-)

> I don't know what options you guys discussed, but to me the entire
> "autosuspend"-suffix isn't really that necessary in my opinion. There
> are more ways than calling pm_runtime_put_autosuspend() that triggers
> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> calling pm_runtime_put() has the similar effect.

To be honest, I'm lost there. pm_runtime_put() calls
__pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
RPM_ASYNC | RPM_AUTO).

> 
> Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> during rpm_resume() too, for example. So why bother about having
> "mark_last_busy" in the new name too.
> 
> That said, my suggestion is simply "pm_runtime_put_suspend".

Can we do even better, and make pm_runtime_put() to handle autosuspend
automatically when autosuspend is enabled ?

> If you don't like it, I will certainly not object to your current
> approach, even if I think it leads to unnecessary churns.
> 
> [...]
> 
> Kind regards
> Uffe

-- 
Regards,

Laurent Pinchart

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-07 22:25         ` Laurent Pinchart
  (?)
  (?)
@ 2024-10-07 22:34           ` Ulf Hansson
  -1 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-07 22:34 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Ulf,
>
> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > >
> > > > > Hello everyone,
> > > > >
> > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > always used together, apart from bugs which are likely common. Going
> > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > >
> > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > and pm_runtime_mark_last_busy().
> > > >
> > > > That sounds like it could cause a lot of churns.
> > > >
> > > > Why not add a new helper function that does the
> > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > things? Then we can start moving users over to this new interface,
> > > > rather than having this intermediate step?
> > >
> > > I think the API would be nicer if we used the shortest and simplest
> > > function names for the most common use cases. Following
> > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > most common use case. That's why I like Sakari's approach of repurposing
> > > pm_runtime_put_autosuspend(), and introducing
> > > __pm_runtime_put_autosuspend() for the odd cases where
> > > pm_runtime_mark_last_busy() shouldn't be called.
> >
> > Okay, so the reason for this approach is because we couldn't find a
> > short and descriptive name that could be used in favor of
> > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > you like it - or not. :-)
>
> I like the idea at least :-)
>
> > I don't know what options you guys discussed, but to me the entire
> > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > calling pm_runtime_put() has the similar effect.
>
> To be honest, I'm lost there. pm_runtime_put() calls
> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> RPM_ASYNC | RPM_AUTO).

__pm_runtime_idle() ends up calling rpm_idle(), which may call
rpm_suspend() - if it succeeds to idle the device. In that case, it
tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
to what is happening when calling pm_runtime_put_autosuspend().

>
> >
> > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > during rpm_resume() too, for example. So why bother about having
> > "mark_last_busy" in the new name too.
> >
> > That said, my suggestion is simply "pm_runtime_put_suspend".
>
> Can we do even better, and make pm_runtime_put() to handle autosuspend
> automatically when autosuspend is enabled ?

As stated above, this is already the case.

>
> > If you don't like it, I will certainly not object to your current
> > approach, even if I think it leads to unnecessary churns.
> >
> > [...]
> >
> > Kind regards
> > Uffe
>
> --
> Regards,
>
> Laurent Pinchart

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 22:34           ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-07 22:34 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Ulf,
>
> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > >
> > > > > Hello everyone,
> > > > >
> > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > always used together, apart from bugs which are likely common. Going
> > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > >
> > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > and pm_runtime_mark_last_busy().
> > > >
> > > > That sounds like it could cause a lot of churns.
> > > >
> > > > Why not add a new helper function that does the
> > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > things? Then we can start moving users over to this new interface,
> > > > rather than having this intermediate step?
> > >
> > > I think the API would be nicer if we used the shortest and simplest
> > > function names for the most common use cases. Following
> > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > most common use case. That's why I like Sakari's approach of repurposing
> > > pm_runtime_put_autosuspend(), and introducing
> > > __pm_runtime_put_autosuspend() for the odd cases where
> > > pm_runtime_mark_last_busy() shouldn't be called.
> >
> > Okay, so the reason for this approach is because we couldn't find a
> > short and descriptive name that could be used in favor of
> > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > you like it - or not. :-)
>
> I like the idea at least :-)
>
> > I don't know what options you guys discussed, but to me the entire
> > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > calling pm_runtime_put() has the similar effect.
>
> To be honest, I'm lost there. pm_runtime_put() calls
> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> RPM_ASYNC | RPM_AUTO).

__pm_runtime_idle() ends up calling rpm_idle(), which may call
rpm_suspend() - if it succeeds to idle the device. In that case, it
tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
to what is happening when calling pm_runtime_put_autosuspend().

>
> >
> > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > during rpm_resume() too, for example. So why bother about having
> > "mark_last_busy" in the new name too.
> >
> > That said, my suggestion is simply "pm_runtime_put_suspend".
>
> Can we do even better, and make pm_runtime_put() to handle autosuspend
> automatically when autosuspend is enabled ?

As stated above, this is already the case.

>
> > If you don't like it, I will certainly not object to your current
> > approach, even if I think it leads to unnecessary churns.
> >
> > [...]
> >
> > Kind regards
> > Uffe
>
> --
> Regards,
>
> Laurent Pinchart

Kind regards
Uffe

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 22:34           ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-07 22:34 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Ulf,
>
> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > >
> > > > > Hello everyone,
> > > > >
> > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > always used together, apart from bugs which are likely common. Going
> > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > >
> > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > and pm_runtime_mark_last_busy().
> > > >
> > > > That sounds like it could cause a lot of churns.
> > > >
> > > > Why not add a new helper function that does the
> > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > things? Then we can start moving users over to this new interface,
> > > > rather than having this intermediate step?
> > >
> > > I think the API would be nicer if we used the shortest and simplest
> > > function names for the most common use cases. Following
> > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > most common use case. That's why I like Sakari's approach of repurposing
> > > pm_runtime_put_autosuspend(), and introducing
> > > __pm_runtime_put_autosuspend() for the odd cases where
> > > pm_runtime_mark_last_busy() shouldn't be called.
> >
> > Okay, so the reason for this approach is because we couldn't find a
> > short and descriptive name that could be used in favor of
> > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > you like it - or not. :-)
>
> I like the idea at least :-)
>
> > I don't know what options you guys discussed, but to me the entire
> > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > calling pm_runtime_put() has the similar effect.
>
> To be honest, I'm lost there. pm_runtime_put() calls
> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> RPM_ASYNC | RPM_AUTO).

__pm_runtime_idle() ends up calling rpm_idle(), which may call
rpm_suspend() - if it succeeds to idle the device. In that case, it
tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
to what is happening when calling pm_runtime_put_autosuspend().

>
> >
> > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > during rpm_resume() too, for example. So why bother about having
> > "mark_last_busy" in the new name too.
> >
> > That said, my suggestion is simply "pm_runtime_put_suspend".
>
> Can we do even better, and make pm_runtime_put() to handle autosuspend
> automatically when autosuspend is enabled ?

As stated above, this is already the case.

>
> > If you don't like it, I will certainly not object to your current
> > approach, even if I think it leads to unnecessary churns.
> >
> > [...]
> >
> > Kind regards
> > Uffe
>
> --
> Regards,
>
> Laurent Pinchart

Kind regards
Uffe

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-07 22:34           ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-07 22:34 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Sakari Ailus, dri-devel, linux-kernel, linux-bluetooth, linux-clk,
	linux-crypto, dmaengine, linux-gpio, amd-gfx, nouveau,
	linux-stm32, linux-arm-kernel, linux-i2c, linux-i3c, linux-iio,
	linux-input, patches, iommu, imx, linux-mediatek, linux-media,
	linux-mmc, linux-mtd, netdev, linux-wireless, linux-pci,
	linux-phy, linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	rafael, Andy Shevchenko

On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Ulf,
>
> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > >
> > > > > Hello everyone,
> > > > >
> > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > always used together, apart from bugs which are likely common. Going
> > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > >
> > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > and pm_runtime_mark_last_busy().
> > > >
> > > > That sounds like it could cause a lot of churns.
> > > >
> > > > Why not add a new helper function that does the
> > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > things? Then we can start moving users over to this new interface,
> > > > rather than having this intermediate step?
> > >
> > > I think the API would be nicer if we used the shortest and simplest
> > > function names for the most common use cases. Following
> > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > most common use case. That's why I like Sakari's approach of repurposing
> > > pm_runtime_put_autosuspend(), and introducing
> > > __pm_runtime_put_autosuspend() for the odd cases where
> > > pm_runtime_mark_last_busy() shouldn't be called.
> >
> > Okay, so the reason for this approach is because we couldn't find a
> > short and descriptive name that could be used in favor of
> > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > you like it - or not. :-)
>
> I like the idea at least :-)
>
> > I don't know what options you guys discussed, but to me the entire
> > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > calling pm_runtime_put() has the similar effect.
>
> To be honest, I'm lost there. pm_runtime_put() calls
> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> RPM_ASYNC | RPM_AUTO).

__pm_runtime_idle() ends up calling rpm_idle(), which may call
rpm_suspend() - if it succeeds to idle the device. In that case, it
tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
to what is happening when calling pm_runtime_put_autosuspend().

>
> >
> > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > during rpm_resume() too, for example. So why bother about having
> > "mark_last_busy" in the new name too.
> >
> > That said, my suggestion is simply "pm_runtime_put_suspend".
>
> Can we do even better, and make pm_runtime_put() to handle autosuspend
> automatically when autosuspend is enabled ?

As stated above, this is already the case.

>
> > If you don't like it, I will certainly not object to your current
> > approach, even if I think it leads to unnecessary churns.
> >
> > [...]
> >
> > Kind regards
> > Uffe
>
> --
> Regards,
>
> Laurent Pinchart

Kind regards
Uffe

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-07 22:34           ` Ulf Hansson
  (?)
  (?)
@ 2024-10-08 18:24             ` Rafael J. Wysocki
  -1 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-08 18:24 UTC (permalink / raw)
  To: Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> >
> > Hi Ulf,
> >
> > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > >
> > > > > > Hello everyone,
> > > > > >
> > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > >
> > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > and pm_runtime_mark_last_busy().
> > > > >
> > > > > That sounds like it could cause a lot of churns.
> > > > >
> > > > > Why not add a new helper function that does the
> > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > things? Then we can start moving users over to this new interface,
> > > > > rather than having this intermediate step?
> > > >
> > > > I think the API would be nicer if we used the shortest and simplest
> > > > function names for the most common use cases. Following
> > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > pm_runtime_put_autosuspend(), and introducing
> > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > pm_runtime_mark_last_busy() shouldn't be called.
> > >
> > > Okay, so the reason for this approach is because we couldn't find a
> > > short and descriptive name that could be used in favor of
> > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > you like it - or not. :-)
> >
> > I like the idea at least :-)
> >
> > > I don't know what options you guys discussed, but to me the entire
> > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > calling pm_runtime_put() has the similar effect.
> >
> > To be honest, I'm lost there. pm_runtime_put() calls
> > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > RPM_ASYNC | RPM_AUTO).
>
> __pm_runtime_idle() ends up calling rpm_idle(), which may call
> rpm_suspend() - if it succeeds to idle the device. In that case, it
> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> to what is happening when calling pm_runtime_put_autosuspend().

Right.

For almost everybody, except for a small bunch of drivers that
actually have a .runtime_idle() callback, pm_runtime_put() is
literally equivalent to pm_runtime_put_autosuspend().

So really the question is why anyone who doesn't provide a
.runtime_idle() callback bothers with using this special
pm_runtime_put_autosuspend() thing, which really means "do a
runtime_put(), but skip my .runtime_idle() callback".

> >
> > >
> > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > during rpm_resume() too, for example. So why bother about having
> > > "mark_last_busy" in the new name too.
> > >
> > > That said, my suggestion is simply "pm_runtime_put_suspend".
> >
> > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > automatically when autosuspend is enabled ?
>
> As stated above, this is already the case.

What really is needed appears to be a combination of
pm_runtime_mark_last_busy() with pm_runtime_put().

Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
thing automatically if autosuspend is enabled and the only consequence
of it might be delaying a suspend of the device until its autosuspend
timer expires, which should not be a problem in the vast majority of
cases.

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-08 18:24             ` Rafael J. Wysocki
  0 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-08 18:24 UTC (permalink / raw)
  To: Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> >
> > Hi Ulf,
> >
> > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > >
> > > > > > Hello everyone,
> > > > > >
> > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > >
> > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > and pm_runtime_mark_last_busy().
> > > > >
> > > > > That sounds like it could cause a lot of churns.
> > > > >
> > > > > Why not add a new helper function that does the
> > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > things? Then we can start moving users over to this new interface,
> > > > > rather than having this intermediate step?
> > > >
> > > > I think the API would be nicer if we used the shortest and simplest
> > > > function names for the most common use cases. Following
> > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > pm_runtime_put_autosuspend(), and introducing
> > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > pm_runtime_mark_last_busy() shouldn't be called.
> > >
> > > Okay, so the reason for this approach is because we couldn't find a
> > > short and descriptive name that could be used in favor of
> > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > you like it - or not. :-)
> >
> > I like the idea at least :-)
> >
> > > I don't know what options you guys discussed, but to me the entire
> > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > calling pm_runtime_put() has the similar effect.
> >
> > To be honest, I'm lost there. pm_runtime_put() calls
> > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > RPM_ASYNC | RPM_AUTO).
>
> __pm_runtime_idle() ends up calling rpm_idle(), which may call
> rpm_suspend() - if it succeeds to idle the device. In that case, it
> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> to what is happening when calling pm_runtime_put_autosuspend().

Right.

For almost everybody, except for a small bunch of drivers that
actually have a .runtime_idle() callback, pm_runtime_put() is
literally equivalent to pm_runtime_put_autosuspend().

So really the question is why anyone who doesn't provide a
.runtime_idle() callback bothers with using this special
pm_runtime_put_autosuspend() thing, which really means "do a
runtime_put(), but skip my .runtime_idle() callback".

> >
> > >
> > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > during rpm_resume() too, for example. So why bother about having
> > > "mark_last_busy" in the new name too.
> > >
> > > That said, my suggestion is simply "pm_runtime_put_suspend".
> >
> > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > automatically when autosuspend is enabled ?
>
> As stated above, this is already the case.

What really is needed appears to be a combination of
pm_runtime_mark_last_busy() with pm_runtime_put().

Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
thing automatically if autosuspend is enabled and the only consequence
of it might be delaying a suspend of the device until its autosuspend
timer expires, which should not be a problem in the vast majority of
cases.

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-08 18:24             ` Rafael J. Wysocki
  0 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-08 18:24 UTC (permalink / raw)
  To: Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> >
> > Hi Ulf,
> >
> > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > >
> > > > > > Hello everyone,
> > > > > >
> > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > >
> > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > and pm_runtime_mark_last_busy().
> > > > >
> > > > > That sounds like it could cause a lot of churns.
> > > > >
> > > > > Why not add a new helper function that does the
> > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > things? Then we can start moving users over to this new interface,
> > > > > rather than having this intermediate step?
> > > >
> > > > I think the API would be nicer if we used the shortest and simplest
> > > > function names for the most common use cases. Following
> > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > pm_runtime_put_autosuspend(), and introducing
> > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > pm_runtime_mark_last_busy() shouldn't be called.
> > >
> > > Okay, so the reason for this approach is because we couldn't find a
> > > short and descriptive name that could be used in favor of
> > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > you like it - or not. :-)
> >
> > I like the idea at least :-)
> >
> > > I don't know what options you guys discussed, but to me the entire
> > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > calling pm_runtime_put() has the similar effect.
> >
> > To be honest, I'm lost there. pm_runtime_put() calls
> > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > RPM_ASYNC | RPM_AUTO).
>
> __pm_runtime_idle() ends up calling rpm_idle(), which may call
> rpm_suspend() - if it succeeds to idle the device. In that case, it
> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> to what is happening when calling pm_runtime_put_autosuspend().

Right.

For almost everybody, except for a small bunch of drivers that
actually have a .runtime_idle() callback, pm_runtime_put() is
literally equivalent to pm_runtime_put_autosuspend().

So really the question is why anyone who doesn't provide a
.runtime_idle() callback bothers with using this special
pm_runtime_put_autosuspend() thing, which really means "do a
runtime_put(), but skip my .runtime_idle() callback".

> >
> > >
> > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > during rpm_resume() too, for example. So why bother about having
> > > "mark_last_busy" in the new name too.
> > >
> > > That said, my suggestion is simply "pm_runtime_put_suspend".
> >
> > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > automatically when autosuspend is enabled ?
>
> As stated above, this is already the case.

What really is needed appears to be a combination of
pm_runtime_mark_last_busy() with pm_runtime_put().

Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
thing automatically if autosuspend is enabled and the only consequence
of it might be delaying a suspend of the device until its autosuspend
timer expires, which should not be a problem in the vast majority of
cases.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-08 18:24             ` Rafael J. Wysocki
  0 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-08 18:24 UTC (permalink / raw)
  To: Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> >
> > Hi Ulf,
> >
> > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > >
> > > > > > Hello everyone,
> > > > > >
> > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > >
> > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > and pm_runtime_mark_last_busy().
> > > > >
> > > > > That sounds like it could cause a lot of churns.
> > > > >
> > > > > Why not add a new helper function that does the
> > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > things? Then we can start moving users over to this new interface,
> > > > > rather than having this intermediate step?
> > > >
> > > > I think the API would be nicer if we used the shortest and simplest
> > > > function names for the most common use cases. Following
> > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > pm_runtime_put_autosuspend(), and introducing
> > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > pm_runtime_mark_last_busy() shouldn't be called.
> > >
> > > Okay, so the reason for this approach is because we couldn't find a
> > > short and descriptive name that could be used in favor of
> > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > you like it - or not. :-)
> >
> > I like the idea at least :-)
> >
> > > I don't know what options you guys discussed, but to me the entire
> > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > calling pm_runtime_put() has the similar effect.
> >
> > To be honest, I'm lost there. pm_runtime_put() calls
> > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > RPM_ASYNC | RPM_AUTO).
>
> __pm_runtime_idle() ends up calling rpm_idle(), which may call
> rpm_suspend() - if it succeeds to idle the device. In that case, it
> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> to what is happening when calling pm_runtime_put_autosuspend().

Right.

For almost everybody, except for a small bunch of drivers that
actually have a .runtime_idle() callback, pm_runtime_put() is
literally equivalent to pm_runtime_put_autosuspend().

So really the question is why anyone who doesn't provide a
.runtime_idle() callback bothers with using this special
pm_runtime_put_autosuspend() thing, which really means "do a
runtime_put(), but skip my .runtime_idle() callback".

> >
> > >
> > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > during rpm_resume() too, for example. So why bother about having
> > > "mark_last_busy" in the new name too.
> > >
> > > That said, my suggestion is simply "pm_runtime_put_suspend".
> >
> > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > automatically when autosuspend is enabled ?
>
> As stated above, this is already the case.

What really is needed appears to be a combination of
pm_runtime_mark_last_busy() with pm_runtime_put().

Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
thing automatically if autosuspend is enabled and the only consequence
of it might be delaying a suspend of the device until its autosuspend
timer expires, which should not be a problem in the vast majority of
cases.

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-07 18:49     ` Laurent Pinchart
  (?)
  (?)
@ 2024-10-08 20:38       ` Uwe Kleine-König
  -1 siblings, 0 replies; 122+ messages in thread
From: Uwe Kleine-König @ 2024-10-08 20:38 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Ulf Hansson, Sakari Ailus, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, rafael, Andy Shevchenko

[-- Attachment #1: Type: text/plain, Size: 2371 bytes --]

Hello,

On Mon, Oct 07, 2024 at 09:49:24PM +0300, Laurent Pinchart wrote:
> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> > >
> > > Hello everyone,
> > >
> > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > always used together, apart from bugs which are likely common. Going
> > > forward, most new users should be using pm_runtime_put_autosuspend().
> > >
> > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > and pm_runtime_mark_last_busy().
> > 
> > That sounds like it could cause a lot of churns.
> > 
> > Why not add a new helper function that does the
> > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > things? Then we can start moving users over to this new interface,
> > rather than having this intermediate step?
> 
> I think the API would be nicer if we used the shortest and simplest
> function names for the most common use cases. Following
> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> most common use case. That's why I like Sakari's approach of repurposing
> pm_runtime_put_autosuspend(), and introducing
> __pm_runtime_put_autosuspend() for the odd cases where
> pm_runtime_mark_last_busy() shouldn't be called.

That's ok for me. However this patch series isn't the optimal path to
there because most drivers (i.e. those that already today do
pm_runtime_mark_last_busy() in combination with
pm_runtime_put_autosuspend()) have to be patched twice.

The saner route is: Only convert the drivers with a sole
pm_runtime_put_autosuspend() (i.e. without pm_runtime_mark_last_busy())
to __pm_runtime_put_autosuspend(). Then add the mark_last_busy() bits to
pm_runtime_put_autosuspend() and then drop the explicit calls to
pm_runtime_mark_last_busy() before pm_runtime_put_autosuspend().

(Note this doesn't take into account Rafael's position that
pm_runtime_put() might be the saner option. My argument applies for that
conversion analogously.)

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-08 20:38       ` Uwe Kleine-König
  0 siblings, 0 replies; 122+ messages in thread
From: Uwe Kleine-König @ 2024-10-08 20:38 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Ulf Hansson, Sakari Ailus, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, rafael, Andy Shevchenko


[-- Attachment #1.1: Type: text/plain, Size: 2371 bytes --]

Hello,

On Mon, Oct 07, 2024 at 09:49:24PM +0300, Laurent Pinchart wrote:
> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> > >
> > > Hello everyone,
> > >
> > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > always used together, apart from bugs which are likely common. Going
> > > forward, most new users should be using pm_runtime_put_autosuspend().
> > >
> > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > and pm_runtime_mark_last_busy().
> > 
> > That sounds like it could cause a lot of churns.
> > 
> > Why not add a new helper function that does the
> > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > things? Then we can start moving users over to this new interface,
> > rather than having this intermediate step?
> 
> I think the API would be nicer if we used the shortest and simplest
> function names for the most common use cases. Following
> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> most common use case. That's why I like Sakari's approach of repurposing
> pm_runtime_put_autosuspend(), and introducing
> __pm_runtime_put_autosuspend() for the odd cases where
> pm_runtime_mark_last_busy() shouldn't be called.

That's ok for me. However this patch series isn't the optimal path to
there because most drivers (i.e. those that already today do
pm_runtime_mark_last_busy() in combination with
pm_runtime_put_autosuspend()) have to be patched twice.

The saner route is: Only convert the drivers with a sole
pm_runtime_put_autosuspend() (i.e. without pm_runtime_mark_last_busy())
to __pm_runtime_put_autosuspend(). Then add the mark_last_busy() bits to
pm_runtime_put_autosuspend() and then drop the explicit calls to
pm_runtime_mark_last_busy() before pm_runtime_put_autosuspend().

(Note this doesn't take into account Rafael's position that
pm_runtime_put() might be the saner option. My argument applies for that
conversion analogously.)

Best regards
Uwe

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 111 bytes --]

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-08 20:38       ` Uwe Kleine-König
  0 siblings, 0 replies; 122+ messages in thread
From: Uwe Kleine-König @ 2024-10-08 20:38 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Ulf Hansson, Sakari Ailus, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, rafael, Andy Shevchenko


[-- Attachment #1.1: Type: text/plain, Size: 2371 bytes --]

Hello,

On Mon, Oct 07, 2024 at 09:49:24PM +0300, Laurent Pinchart wrote:
> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> > >
> > > Hello everyone,
> > >
> > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > always used together, apart from bugs which are likely common. Going
> > > forward, most new users should be using pm_runtime_put_autosuspend().
> > >
> > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > and pm_runtime_mark_last_busy().
> > 
> > That sounds like it could cause a lot of churns.
> > 
> > Why not add a new helper function that does the
> > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > things? Then we can start moving users over to this new interface,
> > rather than having this intermediate step?
> 
> I think the API would be nicer if we used the shortest and simplest
> function names for the most common use cases. Following
> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> most common use case. That's why I like Sakari's approach of repurposing
> pm_runtime_put_autosuspend(), and introducing
> __pm_runtime_put_autosuspend() for the odd cases where
> pm_runtime_mark_last_busy() shouldn't be called.

That's ok for me. However this patch series isn't the optimal path to
there because most drivers (i.e. those that already today do
pm_runtime_mark_last_busy() in combination with
pm_runtime_put_autosuspend()) have to be patched twice.

The saner route is: Only convert the drivers with a sole
pm_runtime_put_autosuspend() (i.e. without pm_runtime_mark_last_busy())
to __pm_runtime_put_autosuspend(). Then add the mark_last_busy() bits to
pm_runtime_put_autosuspend() and then drop the explicit calls to
pm_runtime_mark_last_busy() before pm_runtime_put_autosuspend().

(Note this doesn't take into account Rafael's position that
pm_runtime_put() might be the saner option. My argument applies for that
conversion analogously.)

Best regards
Uwe

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 144 bytes --]

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-08 20:38       ` Uwe Kleine-König
  0 siblings, 0 replies; 122+ messages in thread
From: Uwe Kleine-König @ 2024-10-08 20:38 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Ulf Hansson, Sakari Ailus, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, rafael, Andy Shevchenko


[-- Attachment #1.1: Type: text/plain, Size: 2371 bytes --]

Hello,

On Mon, Oct 07, 2024 at 09:49:24PM +0300, Laurent Pinchart wrote:
> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> > >
> > > Hello everyone,
> > >
> > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > always used together, apart from bugs which are likely common. Going
> > > forward, most new users should be using pm_runtime_put_autosuspend().
> > >
> > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > and pm_runtime_mark_last_busy().
> > 
> > That sounds like it could cause a lot of churns.
> > 
> > Why not add a new helper function that does the
> > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > things? Then we can start moving users over to this new interface,
> > rather than having this intermediate step?
> 
> I think the API would be nicer if we used the shortest and simplest
> function names for the most common use cases. Following
> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> most common use case. That's why I like Sakari's approach of repurposing
> pm_runtime_put_autosuspend(), and introducing
> __pm_runtime_put_autosuspend() for the odd cases where
> pm_runtime_mark_last_busy() shouldn't be called.

That's ok for me. However this patch series isn't the optimal path to
there because most drivers (i.e. those that already today do
pm_runtime_mark_last_busy() in combination with
pm_runtime_put_autosuspend()) have to be patched twice.

The saner route is: Only convert the drivers with a sole
pm_runtime_put_autosuspend() (i.e. without pm_runtime_mark_last_busy())
to __pm_runtime_put_autosuspend(). Then add the mark_last_busy() bits to
pm_runtime_put_autosuspend() and then drop the explicit calls to
pm_runtime_mark_last_busy() before pm_runtime_put_autosuspend().

(Note this doesn't take into account Rafael's position that
pm_runtime_put() might be the saner option. My argument applies for that
conversion analogously.)

Best regards
Uwe

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 112 bytes --]

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-08 18:24             ` Rafael J. Wysocki
  (?)
  (?)
@ 2024-10-09 10:20               ` Rafael J. Wysocki
  -1 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-09 10:20 UTC (permalink / raw)
  To: Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On Tue, Oct 8, 2024 at 8:24 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> > <laurent.pinchart@ideasonboard.com> wrote:
> > >
> > > Hi Ulf,
> > >
> > > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > > >
> > > > > > > Hello everyone,
> > > > > > >
> > > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > > >
> > > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > > and pm_runtime_mark_last_busy().
> > > > > >
> > > > > > That sounds like it could cause a lot of churns.
> > > > > >
> > > > > > Why not add a new helper function that does the
> > > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > > things? Then we can start moving users over to this new interface,
> > > > > > rather than having this intermediate step?
> > > > >
> > > > > I think the API would be nicer if we used the shortest and simplest
> > > > > function names for the most common use cases. Following
> > > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > > pm_runtime_put_autosuspend(), and introducing
> > > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > > pm_runtime_mark_last_busy() shouldn't be called.
> > > >
> > > > Okay, so the reason for this approach is because we couldn't find a
> > > > short and descriptive name that could be used in favor of
> > > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > > you like it - or not. :-)
> > >
> > > I like the idea at least :-)
> > >
> > > > I don't know what options you guys discussed, but to me the entire
> > > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > > calling pm_runtime_put() has the similar effect.
> > >
> > > To be honest, I'm lost there. pm_runtime_put() calls
> > > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > > RPM_ASYNC | RPM_AUTO).
> >
> > __pm_runtime_idle() ends up calling rpm_idle(), which may call
> > rpm_suspend() - if it succeeds to idle the device. In that case, it
> > tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> > to what is happening when calling pm_runtime_put_autosuspend().
>
> Right.
>
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
>
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing, which really means "do a
> runtime_put(), but skip my .runtime_idle() callback".
>
> > >
> > > >
> > > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > > during rpm_resume() too, for example. So why bother about having
> > > > "mark_last_busy" in the new name too.
> > > >
> > > > That said, my suggestion is simply "pm_runtime_put_suspend".
> > >
> > > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > > automatically when autosuspend is enabled ?
> >
> > As stated above, this is already the case.
>
> What really is needed appears to be a combination of
> pm_runtime_mark_last_busy() with pm_runtime_put().
>
> Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
> thing automatically if autosuspend is enabled and the only consequence
> of it might be delaying a suspend of the device until its autosuspend
> timer expires, which should not be a problem in the vast majority of
> cases.

That said, it is likely better to avoid surprising the current users
of pm_runtime_put() and define something like

static inline void pm_runtime_touch_and_put(struct device *dev)
{
        pm_runtime_mark_last_busy(dev);
        pm_runtime_put(dev);
}

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 10:20               ` Rafael J. Wysocki
  0 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-09 10:20 UTC (permalink / raw)
  To: Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On Tue, Oct 8, 2024 at 8:24 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> > <laurent.pinchart@ideasonboard.com> wrote:
> > >
> > > Hi Ulf,
> > >
> > > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > > >
> > > > > > > Hello everyone,
> > > > > > >
> > > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > > >
> > > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > > and pm_runtime_mark_last_busy().
> > > > > >
> > > > > > That sounds like it could cause a lot of churns.
> > > > > >
> > > > > > Why not add a new helper function that does the
> > > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > > things? Then we can start moving users over to this new interface,
> > > > > > rather than having this intermediate step?
> > > > >
> > > > > I think the API would be nicer if we used the shortest and simplest
> > > > > function names for the most common use cases. Following
> > > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > > pm_runtime_put_autosuspend(), and introducing
> > > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > > pm_runtime_mark_last_busy() shouldn't be called.
> > > >
> > > > Okay, so the reason for this approach is because we couldn't find a
> > > > short and descriptive name that could be used in favor of
> > > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > > you like it - or not. :-)
> > >
> > > I like the idea at least :-)
> > >
> > > > I don't know what options you guys discussed, but to me the entire
> > > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > > calling pm_runtime_put() has the similar effect.
> > >
> > > To be honest, I'm lost there. pm_runtime_put() calls
> > > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > > RPM_ASYNC | RPM_AUTO).
> >
> > __pm_runtime_idle() ends up calling rpm_idle(), which may call
> > rpm_suspend() - if it succeeds to idle the device. In that case, it
> > tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> > to what is happening when calling pm_runtime_put_autosuspend().
>
> Right.
>
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
>
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing, which really means "do a
> runtime_put(), but skip my .runtime_idle() callback".
>
> > >
> > > >
> > > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > > during rpm_resume() too, for example. So why bother about having
> > > > "mark_last_busy" in the new name too.
> > > >
> > > > That said, my suggestion is simply "pm_runtime_put_suspend".
> > >
> > > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > > automatically when autosuspend is enabled ?
> >
> > As stated above, this is already the case.
>
> What really is needed appears to be a combination of
> pm_runtime_mark_last_busy() with pm_runtime_put().
>
> Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
> thing automatically if autosuspend is enabled and the only consequence
> of it might be delaying a suspend of the device until its autosuspend
> timer expires, which should not be a problem in the vast majority of
> cases.

That said, it is likely better to avoid surprising the current users
of pm_runtime_put() and define something like

static inline void pm_runtime_touch_and_put(struct device *dev)
{
        pm_runtime_mark_last_busy(dev);
        pm_runtime_put(dev);
}

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 10:20               ` Rafael J. Wysocki
  0 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-09 10:20 UTC (permalink / raw)
  To: Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On Tue, Oct 8, 2024 at 8:24 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> > <laurent.pinchart@ideasonboard.com> wrote:
> > >
> > > Hi Ulf,
> > >
> > > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > > >
> > > > > > > Hello everyone,
> > > > > > >
> > > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > > >
> > > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > > and pm_runtime_mark_last_busy().
> > > > > >
> > > > > > That sounds like it could cause a lot of churns.
> > > > > >
> > > > > > Why not add a new helper function that does the
> > > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > > things? Then we can start moving users over to this new interface,
> > > > > > rather than having this intermediate step?
> > > > >
> > > > > I think the API would be nicer if we used the shortest and simplest
> > > > > function names for the most common use cases. Following
> > > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > > pm_runtime_put_autosuspend(), and introducing
> > > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > > pm_runtime_mark_last_busy() shouldn't be called.
> > > >
> > > > Okay, so the reason for this approach is because we couldn't find a
> > > > short and descriptive name that could be used in favor of
> > > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > > you like it - or not. :-)
> > >
> > > I like the idea at least :-)
> > >
> > > > I don't know what options you guys discussed, but to me the entire
> > > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > > calling pm_runtime_put() has the similar effect.
> > >
> > > To be honest, I'm lost there. pm_runtime_put() calls
> > > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > > RPM_ASYNC | RPM_AUTO).
> >
> > __pm_runtime_idle() ends up calling rpm_idle(), which may call
> > rpm_suspend() - if it succeeds to idle the device. In that case, it
> > tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> > to what is happening when calling pm_runtime_put_autosuspend().
>
> Right.
>
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
>
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing, which really means "do a
> runtime_put(), but skip my .runtime_idle() callback".
>
> > >
> > > >
> > > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > > during rpm_resume() too, for example. So why bother about having
> > > > "mark_last_busy" in the new name too.
> > > >
> > > > That said, my suggestion is simply "pm_runtime_put_suspend".
> > >
> > > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > > automatically when autosuspend is enabled ?
> >
> > As stated above, this is already the case.
>
> What really is needed appears to be a combination of
> pm_runtime_mark_last_busy() with pm_runtime_put().
>
> Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
> thing automatically if autosuspend is enabled and the only consequence
> of it might be delaying a suspend of the device until its autosuspend
> timer expires, which should not be a problem in the vast majority of
> cases.

That said, it is likely better to avoid surprising the current users
of pm_runtime_put() and define something like

static inline void pm_runtime_touch_and_put(struct device *dev)
{
        pm_runtime_mark_last_busy(dev);
        pm_runtime_put(dev);
}

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 10:20               ` Rafael J. Wysocki
  0 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-09 10:20 UTC (permalink / raw)
  To: Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On Tue, Oct 8, 2024 at 8:24 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> > <laurent.pinchart@ideasonboard.com> wrote:
> > >
> > > Hi Ulf,
> > >
> > > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > > >
> > > > > > > Hello everyone,
> > > > > > >
> > > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > > >
> > > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > > and pm_runtime_mark_last_busy().
> > > > > >
> > > > > > That sounds like it could cause a lot of churns.
> > > > > >
> > > > > > Why not add a new helper function that does the
> > > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > > things? Then we can start moving users over to this new interface,
> > > > > > rather than having this intermediate step?
> > > > >
> > > > > I think the API would be nicer if we used the shortest and simplest
> > > > > function names for the most common use cases. Following
> > > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > > pm_runtime_put_autosuspend(), and introducing
> > > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > > pm_runtime_mark_last_busy() shouldn't be called.
> > > >
> > > > Okay, so the reason for this approach is because we couldn't find a
> > > > short and descriptive name that could be used in favor of
> > > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > > you like it - or not. :-)
> > >
> > > I like the idea at least :-)
> > >
> > > > I don't know what options you guys discussed, but to me the entire
> > > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > > calling pm_runtime_put() has the similar effect.
> > >
> > > To be honest, I'm lost there. pm_runtime_put() calls
> > > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > > RPM_ASYNC | RPM_AUTO).
> >
> > __pm_runtime_idle() ends up calling rpm_idle(), which may call
> > rpm_suspend() - if it succeeds to idle the device. In that case, it
> > tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> > to what is happening when calling pm_runtime_put_autosuspend().
>
> Right.
>
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
>
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing, which really means "do a
> runtime_put(), but skip my .runtime_idle() callback".
>
> > >
> > > >
> > > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > > during rpm_resume() too, for example. So why bother about having
> > > > "mark_last_busy" in the new name too.
> > > >
> > > > That said, my suggestion is simply "pm_runtime_put_suspend".
> > >
> > > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > > automatically when autosuspend is enabled ?
> >
> > As stated above, this is already the case.
>
> What really is needed appears to be a combination of
> pm_runtime_mark_last_busy() with pm_runtime_put().
>
> Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
> thing automatically if autosuspend is enabled and the only consequence
> of it might be delaying a suspend of the device until its autosuspend
> timer expires, which should not be a problem in the vast majority of
> cases.

That said, it is likely better to avoid surprising the current users
of pm_runtime_put() and define something like

static inline void pm_runtime_touch_and_put(struct device *dev)
{
        pm_runtime_mark_last_busy(dev);
        pm_runtime_put(dev);
}

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-08 18:24             ` Rafael J. Wysocki
  (?)
  (?)
@ 2024-10-09 10:27               ` Ulf Hansson
  -1 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-09 10:27 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Laurent Pinchart, Sakari Ailus, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, Andy Shevchenko

On Tue, 8 Oct 2024 at 20:25, Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> > <laurent.pinchart@ideasonboard.com> wrote:
> > >
> > > Hi Ulf,
> > >
> > > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > > >
> > > > > > > Hello everyone,
> > > > > > >
> > > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > > >
> > > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > > and pm_runtime_mark_last_busy().
> > > > > >
> > > > > > That sounds like it could cause a lot of churns.
> > > > > >
> > > > > > Why not add a new helper function that does the
> > > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > > things? Then we can start moving users over to this new interface,
> > > > > > rather than having this intermediate step?
> > > > >
> > > > > I think the API would be nicer if we used the shortest and simplest
> > > > > function names for the most common use cases. Following
> > > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > > pm_runtime_put_autosuspend(), and introducing
> > > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > > pm_runtime_mark_last_busy() shouldn't be called.
> > > >
> > > > Okay, so the reason for this approach is because we couldn't find a
> > > > short and descriptive name that could be used in favor of
> > > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > > you like it - or not. :-)
> > >
> > > I like the idea at least :-)
> > >
> > > > I don't know what options you guys discussed, but to me the entire
> > > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > > calling pm_runtime_put() has the similar effect.
> > >
> > > To be honest, I'm lost there. pm_runtime_put() calls
> > > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > > RPM_ASYNC | RPM_AUTO).
> >
> > __pm_runtime_idle() ends up calling rpm_idle(), which may call
> > rpm_suspend() - if it succeeds to idle the device. In that case, it
> > tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> > to what is happening when calling pm_runtime_put_autosuspend().
>
> Right.
>
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
>
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing, which really means "do a
> runtime_put(), but skip my .runtime_idle() callback".

My guess is that it's in most cases a legacy pattern that is being
followed. Also note that rpm_idle() didn't "always" tag on the
RPM_AUTO flag, even if it's quite a while ago (2013) since we added
it.

Unless there is some actual optimization involved, as it also allows
us to skip calling rpm_idle() and go directly for rpm_suspend().

>
> > >
> > > >
> > > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > > during rpm_resume() too, for example. So why bother about having
> > > > "mark_last_busy" in the new name too.
> > > >
> > > > That said, my suggestion is simply "pm_runtime_put_suspend".
> > >
> > > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > > automatically when autosuspend is enabled ?
> >
> > As stated above, this is already the case.
>
> What really is needed appears to be a combination of
> pm_runtime_mark_last_busy() with pm_runtime_put().

This makes sense to me too, but I don't think we should limit it to this.

Making pm_runtime_put_autosuspend (or if the name
"pm_runtime_put_suspend" is better?) to do the similar thing, is
probably a good idea too. At least in my opinion.

>
> Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
> thing automatically if autosuspend is enabled and the only consequence
> of it might be delaying a suspend of the device until its autosuspend
> timer expires, which should not be a problem in the vast majority of
> cases.

Right.

I guess we should expect the *sync* variants to be used, if the timer
really needs to be overridden.

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 10:27               ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-09 10:27 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Laurent Pinchart, Sakari Ailus, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, Andy Shevchenko

On Tue, 8 Oct 2024 at 20:25, Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> > <laurent.pinchart@ideasonboard.com> wrote:
> > >
> > > Hi Ulf,
> > >
> > > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > > >
> > > > > > > Hello everyone,
> > > > > > >
> > > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > > >
> > > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > > and pm_runtime_mark_last_busy().
> > > > > >
> > > > > > That sounds like it could cause a lot of churns.
> > > > > >
> > > > > > Why not add a new helper function that does the
> > > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > > things? Then we can start moving users over to this new interface,
> > > > > > rather than having this intermediate step?
> > > > >
> > > > > I think the API would be nicer if we used the shortest and simplest
> > > > > function names for the most common use cases. Following
> > > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > > pm_runtime_put_autosuspend(), and introducing
> > > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > > pm_runtime_mark_last_busy() shouldn't be called.
> > > >
> > > > Okay, so the reason for this approach is because we couldn't find a
> > > > short and descriptive name that could be used in favor of
> > > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > > you like it - or not. :-)
> > >
> > > I like the idea at least :-)
> > >
> > > > I don't know what options you guys discussed, but to me the entire
> > > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > > calling pm_runtime_put() has the similar effect.
> > >
> > > To be honest, I'm lost there. pm_runtime_put() calls
> > > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > > RPM_ASYNC | RPM_AUTO).
> >
> > __pm_runtime_idle() ends up calling rpm_idle(), which may call
> > rpm_suspend() - if it succeeds to idle the device. In that case, it
> > tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> > to what is happening when calling pm_runtime_put_autosuspend().
>
> Right.
>
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
>
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing, which really means "do a
> runtime_put(), but skip my .runtime_idle() callback".

My guess is that it's in most cases a legacy pattern that is being
followed. Also note that rpm_idle() didn't "always" tag on the
RPM_AUTO flag, even if it's quite a while ago (2013) since we added
it.

Unless there is some actual optimization involved, as it also allows
us to skip calling rpm_idle() and go directly for rpm_suspend().

>
> > >
> > > >
> > > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > > during rpm_resume() too, for example. So why bother about having
> > > > "mark_last_busy" in the new name too.
> > > >
> > > > That said, my suggestion is simply "pm_runtime_put_suspend".
> > >
> > > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > > automatically when autosuspend is enabled ?
> >
> > As stated above, this is already the case.
>
> What really is needed appears to be a combination of
> pm_runtime_mark_last_busy() with pm_runtime_put().

This makes sense to me too, but I don't think we should limit it to this.

Making pm_runtime_put_autosuspend (or if the name
"pm_runtime_put_suspend" is better?) to do the similar thing, is
probably a good idea too. At least in my opinion.

>
> Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
> thing automatically if autosuspend is enabled and the only consequence
> of it might be delaying a suspend of the device until its autosuspend
> timer expires, which should not be a problem in the vast majority of
> cases.

Right.

I guess we should expect the *sync* variants to be used, if the timer
really needs to be overridden.

Kind regards
Uffe

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 10:27               ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-09 10:27 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Laurent Pinchart, Sakari Ailus, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, Andy Shevchenko

On Tue, 8 Oct 2024 at 20:25, Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> > <laurent.pinchart@ideasonboard.com> wrote:
> > >
> > > Hi Ulf,
> > >
> > > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > > >
> > > > > > > Hello everyone,
> > > > > > >
> > > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > > >
> > > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > > and pm_runtime_mark_last_busy().
> > > > > >
> > > > > > That sounds like it could cause a lot of churns.
> > > > > >
> > > > > > Why not add a new helper function that does the
> > > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > > things? Then we can start moving users over to this new interface,
> > > > > > rather than having this intermediate step?
> > > > >
> > > > > I think the API would be nicer if we used the shortest and simplest
> > > > > function names for the most common use cases. Following
> > > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > > pm_runtime_put_autosuspend(), and introducing
> > > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > > pm_runtime_mark_last_busy() shouldn't be called.
> > > >
> > > > Okay, so the reason for this approach is because we couldn't find a
> > > > short and descriptive name that could be used in favor of
> > > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > > you like it - or not. :-)
> > >
> > > I like the idea at least :-)
> > >
> > > > I don't know what options you guys discussed, but to me the entire
> > > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > > calling pm_runtime_put() has the similar effect.
> > >
> > > To be honest, I'm lost there. pm_runtime_put() calls
> > > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > > RPM_ASYNC | RPM_AUTO).
> >
> > __pm_runtime_idle() ends up calling rpm_idle(), which may call
> > rpm_suspend() - if it succeeds to idle the device. In that case, it
> > tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> > to what is happening when calling pm_runtime_put_autosuspend().
>
> Right.
>
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
>
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing, which really means "do a
> runtime_put(), but skip my .runtime_idle() callback".

My guess is that it's in most cases a legacy pattern that is being
followed. Also note that rpm_idle() didn't "always" tag on the
RPM_AUTO flag, even if it's quite a while ago (2013) since we added
it.

Unless there is some actual optimization involved, as it also allows
us to skip calling rpm_idle() and go directly for rpm_suspend().

>
> > >
> > > >
> > > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > > during rpm_resume() too, for example. So why bother about having
> > > > "mark_last_busy" in the new name too.
> > > >
> > > > That said, my suggestion is simply "pm_runtime_put_suspend".
> > >
> > > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > > automatically when autosuspend is enabled ?
> >
> > As stated above, this is already the case.
>
> What really is needed appears to be a combination of
> pm_runtime_mark_last_busy() with pm_runtime_put().

This makes sense to me too, but I don't think we should limit it to this.

Making pm_runtime_put_autosuspend (or if the name
"pm_runtime_put_suspend" is better?) to do the similar thing, is
probably a good idea too. At least in my opinion.

>
> Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
> thing automatically if autosuspend is enabled and the only consequence
> of it might be delaying a suspend of the device until its autosuspend
> timer expires, which should not be a problem in the vast majority of
> cases.

Right.

I guess we should expect the *sync* variants to be used, if the timer
really needs to be overridden.

Kind regards
Uffe

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 10:27               ` Ulf Hansson
  0 siblings, 0 replies; 122+ messages in thread
From: Ulf Hansson @ 2024-10-09 10:27 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Laurent Pinchart, Sakari Ailus, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, Andy Shevchenko

On Tue, 8 Oct 2024 at 20:25, Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> > <laurent.pinchart@ideasonboard.com> wrote:
> > >
> > > Hi Ulf,
> > >
> > > On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> > > > On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> > > > > On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> > > > > > On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> > > > > > >
> > > > > > > Hello everyone,
> > > > > > >
> > > > > > > This set will switch the users of pm_runtime_put_autosuspend() to
> > > > > > > __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> > > > > > > to include a call to pm_runtime_mark_last_busy(). The two are almost
> > > > > > > always used together, apart from bugs which are likely common. Going
> > > > > > > forward, most new users should be using pm_runtime_put_autosuspend().
> > > > > > >
> > > > > > > Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> > > > > > > I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> > > > > > > and pm_runtime_mark_last_busy().
> > > > > >
> > > > > > That sounds like it could cause a lot of churns.
> > > > > >
> > > > > > Why not add a new helper function that does the
> > > > > > pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> > > > > > things? Then we can start moving users over to this new interface,
> > > > > > rather than having this intermediate step?
> > > > >
> > > > > I think the API would be nicer if we used the shortest and simplest
> > > > > function names for the most common use cases. Following
> > > > > pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> > > > > most common use case. That's why I like Sakari's approach of repurposing
> > > > > pm_runtime_put_autosuspend(), and introducing
> > > > > __pm_runtime_put_autosuspend() for the odd cases where
> > > > > pm_runtime_mark_last_busy() shouldn't be called.
> > > >
> > > > Okay, so the reason for this approach is because we couldn't find a
> > > > short and descriptive name that could be used in favor of
> > > > pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> > > > you like it - or not. :-)
> > >
> > > I like the idea at least :-)
> > >
> > > > I don't know what options you guys discussed, but to me the entire
> > > > "autosuspend"-suffix isn't really that necessary in my opinion. There
> > > > are more ways than calling pm_runtime_put_autosuspend() that triggers
> > > > us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> > > > calling pm_runtime_put() has the similar effect.
> > >
> > > To be honest, I'm lost there. pm_runtime_put() calls
> > > __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> > > pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> > > RPM_ASYNC | RPM_AUTO).
> >
> > __pm_runtime_idle() ends up calling rpm_idle(), which may call
> > rpm_suspend() - if it succeeds to idle the device. In that case, it
> > tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> > to what is happening when calling pm_runtime_put_autosuspend().
>
> Right.
>
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
>
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing, which really means "do a
> runtime_put(), but skip my .runtime_idle() callback".

My guess is that it's in most cases a legacy pattern that is being
followed. Also note that rpm_idle() didn't "always" tag on the
RPM_AUTO flag, even if it's quite a while ago (2013) since we added
it.

Unless there is some actual optimization involved, as it also allows
us to skip calling rpm_idle() and go directly for rpm_suspend().

>
> > >
> > > >
> > > > Moreover, it's similar for pm_runtime_mark_last_busy(), it's called
> > > > during rpm_resume() too, for example. So why bother about having
> > > > "mark_last_busy" in the new name too.
> > > >
> > > > That said, my suggestion is simply "pm_runtime_put_suspend".
> > >
> > > Can we do even better, and make pm_runtime_put() to handle autosuspend
> > > automatically when autosuspend is enabled ?
> >
> > As stated above, this is already the case.
>
> What really is needed appears to be a combination of
> pm_runtime_mark_last_busy() with pm_runtime_put().

This makes sense to me too, but I don't think we should limit it to this.

Making pm_runtime_put_autosuspend (or if the name
"pm_runtime_put_suspend" is better?) to do the similar thing, is
probably a good idea too. At least in my opinion.

>
> Granted, pm_runtime_put() could do the pm_runtime_mark_last_busy()
> thing automatically if autosuspend is enabled and the only consequence
> of it might be delaying a suspend of the device until its autosuspend
> timer expires, which should not be a problem in the vast majority of
> cases.

Right.

I guess we should expect the *sync* variants to be used, if the timer
really needs to be overridden.

Kind regards
Uffe

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-08 18:24             ` Rafael J. Wysocki
  (?)
  (?)
@ 2024-10-09 12:48               ` Richard Fitzgerald
  -1 siblings, 0 replies; 122+ messages in thread
From: Richard Fitzgerald @ 2024-10-09 12:48 UTC (permalink / raw)
  To: Rafael J. Wysocki, Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On 08/10/2024 7:24 pm, Rafael J. Wysocki wrote:
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>>
>> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
>> <laurent.pinchart@ideasonboard.com> wrote:
>>>
>>> Hi Ulf,
>>>
>>> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
>>>> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
>>>>> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
>>>>>> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
>>>>>>>
>>>>>>> Hello everyone,
>>>>>>>
>>>>>>> This set will switch the users of pm_runtime_put_autosuspend() to
>>>>>>> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
>>>>>>> to include a call to pm_runtime_mark_last_busy(). The two are almost
>>>>>>> always used together, apart from bugs which are likely common. Going
>>>>>>> forward, most new users should be using pm_runtime_put_autosuspend().
>>>>>>>
>>>>>>> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
>>>>>>> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
>>>>>>> and pm_runtime_mark_last_busy().
>>>>>>
>>>>>> That sounds like it could cause a lot of churns.
>>>>>>
>>>>>> Why not add a new helper function that does the
>>>>>> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
>>>>>> things? Then we can start moving users over to this new interface,
>>>>>> rather than having this intermediate step?
>>>>>
>>>>> I think the API would be nicer if we used the shortest and simplest
>>>>> function names for the most common use cases. Following
>>>>> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
>>>>> most common use case. That's why I like Sakari's approach of repurposing
>>>>> pm_runtime_put_autosuspend(), and introducing
>>>>> __pm_runtime_put_autosuspend() for the odd cases where
>>>>> pm_runtime_mark_last_busy() shouldn't be called.
>>>>
>>>> Okay, so the reason for this approach is because we couldn't find a
>>>> short and descriptive name that could be used in favor of
>>>> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
>>>> you like it - or not. :-)
>>>
>>> I like the idea at least :-)
>>>
>>>> I don't know what options you guys discussed, but to me the entire
>>>> "autosuspend"-suffix isn't really that necessary in my opinion. There
>>>> are more ways than calling pm_runtime_put_autosuspend() that triggers
>>>> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
>>>> calling pm_runtime_put() has the similar effect.
>>>
>>> To be honest, I'm lost there. pm_runtime_put() calls
>>> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
>>> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
>>> RPM_ASYNC | RPM_AUTO).
>>
>> __pm_runtime_idle() ends up calling rpm_idle(), which may call
>> rpm_suspend() - if it succeeds to idle the device. In that case, it
>> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
>> to what is happening when calling pm_runtime_put_autosuspend().
> 
> Right.
> 
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
> 
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing,

Because they are following the documentation? It says:

"Drivers should call pm_runtime_mark_last_busy() to update this field
after carrying out I/O, typically just before calling
pm_runtime_put_autosuspend()."

and

"In order to use autosuspend, subsystems or drivers must call
pm_runtime_use_autosuspend() (...), and thereafter they should use the
various `*_autosuspend()` helper functions instead of the non#
autosuspend counterparts"

So the documentation says I should be using pm_runtime_put_autosuspend()
instead of pm_runtime_put().

Seems unfair to criticise people for following the documentation.


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 12:48               ` Richard Fitzgerald
  0 siblings, 0 replies; 122+ messages in thread
From: Richard Fitzgerald @ 2024-10-09 12:48 UTC (permalink / raw)
  To: Rafael J. Wysocki, Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On 08/10/2024 7:24 pm, Rafael J. Wysocki wrote:
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>>
>> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
>> <laurent.pinchart@ideasonboard.com> wrote:
>>>
>>> Hi Ulf,
>>>
>>> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
>>>> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
>>>>> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
>>>>>> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
>>>>>>>
>>>>>>> Hello everyone,
>>>>>>>
>>>>>>> This set will switch the users of pm_runtime_put_autosuspend() to
>>>>>>> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
>>>>>>> to include a call to pm_runtime_mark_last_busy(). The two are almost
>>>>>>> always used together, apart from bugs which are likely common. Going
>>>>>>> forward, most new users should be using pm_runtime_put_autosuspend().
>>>>>>>
>>>>>>> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
>>>>>>> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
>>>>>>> and pm_runtime_mark_last_busy().
>>>>>>
>>>>>> That sounds like it could cause a lot of churns.
>>>>>>
>>>>>> Why not add a new helper function that does the
>>>>>> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
>>>>>> things? Then we can start moving users over to this new interface,
>>>>>> rather than having this intermediate step?
>>>>>
>>>>> I think the API would be nicer if we used the shortest and simplest
>>>>> function names for the most common use cases. Following
>>>>> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
>>>>> most common use case. That's why I like Sakari's approach of repurposing
>>>>> pm_runtime_put_autosuspend(), and introducing
>>>>> __pm_runtime_put_autosuspend() for the odd cases where
>>>>> pm_runtime_mark_last_busy() shouldn't be called.
>>>>
>>>> Okay, so the reason for this approach is because we couldn't find a
>>>> short and descriptive name that could be used in favor of
>>>> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
>>>> you like it - or not. :-)
>>>
>>> I like the idea at least :-)
>>>
>>>> I don't know what options you guys discussed, but to me the entire
>>>> "autosuspend"-suffix isn't really that necessary in my opinion. There
>>>> are more ways than calling pm_runtime_put_autosuspend() that triggers
>>>> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
>>>> calling pm_runtime_put() has the similar effect.
>>>
>>> To be honest, I'm lost there. pm_runtime_put() calls
>>> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
>>> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
>>> RPM_ASYNC | RPM_AUTO).
>>
>> __pm_runtime_idle() ends up calling rpm_idle(), which may call
>> rpm_suspend() - if it succeeds to idle the device. In that case, it
>> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
>> to what is happening when calling pm_runtime_put_autosuspend().
> 
> Right.
> 
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
> 
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing,

Because they are following the documentation? It says:

"Drivers should call pm_runtime_mark_last_busy() to update this field
after carrying out I/O, typically just before calling
pm_runtime_put_autosuspend()."

and

"In order to use autosuspend, subsystems or drivers must call
pm_runtime_use_autosuspend() (...), and thereafter they should use the
various `*_autosuspend()` helper functions instead of the non#
autosuspend counterparts"

So the documentation says I should be using pm_runtime_put_autosuspend()
instead of pm_runtime_put().

Seems unfair to criticise people for following the documentation.


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 12:48               ` Richard Fitzgerald
  0 siblings, 0 replies; 122+ messages in thread
From: Richard Fitzgerald @ 2024-10-09 12:48 UTC (permalink / raw)
  To: Rafael J. Wysocki, Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On 08/10/2024 7:24 pm, Rafael J. Wysocki wrote:
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>>
>> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
>> <laurent.pinchart@ideasonboard.com> wrote:
>>>
>>> Hi Ulf,
>>>
>>> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
>>>> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
>>>>> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
>>>>>> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
>>>>>>>
>>>>>>> Hello everyone,
>>>>>>>
>>>>>>> This set will switch the users of pm_runtime_put_autosuspend() to
>>>>>>> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
>>>>>>> to include a call to pm_runtime_mark_last_busy(). The two are almost
>>>>>>> always used together, apart from bugs which are likely common. Going
>>>>>>> forward, most new users should be using pm_runtime_put_autosuspend().
>>>>>>>
>>>>>>> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
>>>>>>> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
>>>>>>> and pm_runtime_mark_last_busy().
>>>>>>
>>>>>> That sounds like it could cause a lot of churns.
>>>>>>
>>>>>> Why not add a new helper function that does the
>>>>>> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
>>>>>> things? Then we can start moving users over to this new interface,
>>>>>> rather than having this intermediate step?
>>>>>
>>>>> I think the API would be nicer if we used the shortest and simplest
>>>>> function names for the most common use cases. Following
>>>>> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
>>>>> most common use case. That's why I like Sakari's approach of repurposing
>>>>> pm_runtime_put_autosuspend(), and introducing
>>>>> __pm_runtime_put_autosuspend() for the odd cases where
>>>>> pm_runtime_mark_last_busy() shouldn't be called.
>>>>
>>>> Okay, so the reason for this approach is because we couldn't find a
>>>> short and descriptive name that could be used in favor of
>>>> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
>>>> you like it - or not. :-)
>>>
>>> I like the idea at least :-)
>>>
>>>> I don't know what options you guys discussed, but to me the entire
>>>> "autosuspend"-suffix isn't really that necessary in my opinion. There
>>>> are more ways than calling pm_runtime_put_autosuspend() that triggers
>>>> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
>>>> calling pm_runtime_put() has the similar effect.
>>>
>>> To be honest, I'm lost there. pm_runtime_put() calls
>>> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
>>> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
>>> RPM_ASYNC | RPM_AUTO).
>>
>> __pm_runtime_idle() ends up calling rpm_idle(), which may call
>> rpm_suspend() - if it succeeds to idle the device. In that case, it
>> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
>> to what is happening when calling pm_runtime_put_autosuspend().
> 
> Right.
> 
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
> 
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing,

Because they are following the documentation? It says:

"Drivers should call pm_runtime_mark_last_busy() to update this field
after carrying out I/O, typically just before calling
pm_runtime_put_autosuspend()."

and

"In order to use autosuspend, subsystems or drivers must call
pm_runtime_use_autosuspend() (...), and thereafter they should use the
various `*_autosuspend()` helper functions instead of the non#
autosuspend counterparts"

So the documentation says I should be using pm_runtime_put_autosuspend()
instead of pm_runtime_put().

Seems unfair to criticise people for following the documentation.


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 12:48               ` Richard Fitzgerald
  0 siblings, 0 replies; 122+ messages in thread
From: Richard Fitzgerald @ 2024-10-09 12:48 UTC (permalink / raw)
  To: Rafael J. Wysocki, Ulf Hansson, Laurent Pinchart, Sakari Ailus
  Cc: dri-devel, linux-kernel, linux-bluetooth, linux-clk, linux-crypto,
	dmaengine, linux-gpio, amd-gfx, nouveau, linux-stm32,
	linux-arm-kernel, linux-i2c, linux-i3c, linux-iio, linux-input,
	patches, iommu, imx, linux-mediatek, linux-media, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-phy,
	linux-pwm, linux-remoteproc, linux-sound, linux-spi,
	linux-staging, linux-usb, linux-serial, greybus-dev, asahi,
	Andy Shevchenko

On 08/10/2024 7:24 pm, Rafael J. Wysocki wrote:
> On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>>
>> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
>> <laurent.pinchart@ideasonboard.com> wrote:
>>>
>>> Hi Ulf,
>>>
>>> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
>>>> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
>>>>> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
>>>>>> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
>>>>>>>
>>>>>>> Hello everyone,
>>>>>>>
>>>>>>> This set will switch the users of pm_runtime_put_autosuspend() to
>>>>>>> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
>>>>>>> to include a call to pm_runtime_mark_last_busy(). The two are almost
>>>>>>> always used together, apart from bugs which are likely common. Going
>>>>>>> forward, most new users should be using pm_runtime_put_autosuspend().
>>>>>>>
>>>>>>> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
>>>>>>> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
>>>>>>> and pm_runtime_mark_last_busy().
>>>>>>
>>>>>> That sounds like it could cause a lot of churns.
>>>>>>
>>>>>> Why not add a new helper function that does the
>>>>>> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
>>>>>> things? Then we can start moving users over to this new interface,
>>>>>> rather than having this intermediate step?
>>>>>
>>>>> I think the API would be nicer if we used the shortest and simplest
>>>>> function names for the most common use cases. Following
>>>>> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
>>>>> most common use case. That's why I like Sakari's approach of repurposing
>>>>> pm_runtime_put_autosuspend(), and introducing
>>>>> __pm_runtime_put_autosuspend() for the odd cases where
>>>>> pm_runtime_mark_last_busy() shouldn't be called.
>>>>
>>>> Okay, so the reason for this approach is because we couldn't find a
>>>> short and descriptive name that could be used in favor of
>>>> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
>>>> you like it - or not. :-)
>>>
>>> I like the idea at least :-)
>>>
>>>> I don't know what options you guys discussed, but to me the entire
>>>> "autosuspend"-suffix isn't really that necessary in my opinion. There
>>>> are more ways than calling pm_runtime_put_autosuspend() that triggers
>>>> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
>>>> calling pm_runtime_put() has the similar effect.
>>>
>>> To be honest, I'm lost there. pm_runtime_put() calls
>>> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
>>> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
>>> RPM_ASYNC | RPM_AUTO).
>>
>> __pm_runtime_idle() ends up calling rpm_idle(), which may call
>> rpm_suspend() - if it succeeds to idle the device. In that case, it
>> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
>> to what is happening when calling pm_runtime_put_autosuspend().
> 
> Right.
> 
> For almost everybody, except for a small bunch of drivers that
> actually have a .runtime_idle() callback, pm_runtime_put() is
> literally equivalent to pm_runtime_put_autosuspend().
> 
> So really the question is why anyone who doesn't provide a
> .runtime_idle() callback bothers with using this special
> pm_runtime_put_autosuspend() thing,

Because they are following the documentation? It says:

"Drivers should call pm_runtime_mark_last_busy() to update this field
after carrying out I/O, typically just before calling
pm_runtime_put_autosuspend()."

and

"In order to use autosuspend, subsystems or drivers must call
pm_runtime_use_autosuspend() (...), and thereafter they should use the
various `*_autosuspend()` helper functions instead of the non#
autosuspend counterparts"

So the documentation says I should be using pm_runtime_put_autosuspend()
instead of pm_runtime_put().

Seems unfair to criticise people for following the documentation.


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-09 12:48               ` Richard Fitzgerald
  (?)
  (?)
@ 2024-10-09 13:34                 ` Rafael J. Wysocki
  -1 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-09 13:34 UTC (permalink / raw)
  To: Richard Fitzgerald, Sakari Ailus
  Cc: Ulf Hansson, Laurent Pinchart, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, Andy Shevchenko, Uwe Kleine-König

On Wed, Oct 9, 2024 at 2:48 PM Richard Fitzgerald
<rf@opensource.cirrus.com> wrote:
>
> On 08/10/2024 7:24 pm, Rafael J. Wysocki wrote:
> > On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >>
> >> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> >> <laurent.pinchart@ideasonboard.com> wrote:
> >>>
> >>> Hi Ulf,
> >>>
> >>> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> >>>> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> >>>>> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> >>>>>> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> >>>>>>>
> >>>>>>> Hello everyone,
> >>>>>>>
> >>>>>>> This set will switch the users of pm_runtime_put_autosuspend() to
> >>>>>>> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> >>>>>>> to include a call to pm_runtime_mark_last_busy(). The two are almost
> >>>>>>> always used together, apart from bugs which are likely common. Going
> >>>>>>> forward, most new users should be using pm_runtime_put_autosuspend().
> >>>>>>>
> >>>>>>> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> >>>>>>> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> >>>>>>> and pm_runtime_mark_last_busy().
> >>>>>>
> >>>>>> That sounds like it could cause a lot of churns.
> >>>>>>
> >>>>>> Why not add a new helper function that does the
> >>>>>> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> >>>>>> things? Then we can start moving users over to this new interface,
> >>>>>> rather than having this intermediate step?
> >>>>>
> >>>>> I think the API would be nicer if we used the shortest and simplest
> >>>>> function names for the most common use cases. Following
> >>>>> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> >>>>> most common use case. That's why I like Sakari's approach of repurposing
> >>>>> pm_runtime_put_autosuspend(), and introducing
> >>>>> __pm_runtime_put_autosuspend() for the odd cases where
> >>>>> pm_runtime_mark_last_busy() shouldn't be called.
> >>>>
> >>>> Okay, so the reason for this approach is because we couldn't find a
> >>>> short and descriptive name that could be used in favor of
> >>>> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> >>>> you like it - or not. :-)
> >>>
> >>> I like the idea at least :-)
> >>>
> >>>> I don't know what options you guys discussed, but to me the entire
> >>>> "autosuspend"-suffix isn't really that necessary in my opinion. There
> >>>> are more ways than calling pm_runtime_put_autosuspend() that triggers
> >>>> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> >>>> calling pm_runtime_put() has the similar effect.
> >>>
> >>> To be honest, I'm lost there. pm_runtime_put() calls
> >>> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> >>> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> >>> RPM_ASYNC | RPM_AUTO).
> >>
> >> __pm_runtime_idle() ends up calling rpm_idle(), which may call
> >> rpm_suspend() - if it succeeds to idle the device. In that case, it
> >> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> >> to what is happening when calling pm_runtime_put_autosuspend().
> >
> > Right.
> >
> > For almost everybody, except for a small bunch of drivers that
> > actually have a .runtime_idle() callback, pm_runtime_put() is
> > literally equivalent to pm_runtime_put_autosuspend().
> >
> > So really the question is why anyone who doesn't provide a
> > .runtime_idle() callback bothers with using this special
> > pm_runtime_put_autosuspend() thing,
>
> Because they are following the documentation? It says:
>
> "Drivers should call pm_runtime_mark_last_busy() to update this field
> after carrying out I/O, typically just before calling
> pm_runtime_put_autosuspend()."
>
> and
>
> "In order to use autosuspend, subsystems or drivers must call
> pm_runtime_use_autosuspend() (...), and thereafter they should use the
> various `*_autosuspend()` helper functions instead of the non#
> autosuspend counterparts"
>
> So the documentation says I should be using pm_runtime_put_autosuspend()
> instead of pm_runtime_put().
>
> Seems unfair to criticise people for following the documentation.

I'm not criticising anyone, just wondering why they do what they do.

"Because it is documented this way" is a fair answer, but it doesn't
invalidate the observation that the difference between
pm_runtime_put_autosuspend() and pm_runtime_put() boils down to the
cases when the .runtime_idle() callback is present (which are few and
far between so to speak).  Moreover, there are call sites using
pm_runtime_*() functions even though they may not know whether or not
autosuspend is enabled for the target devices, so the advice given in
the documentation cannot be universally followed regardless.

This thread is about the way to go, generally speaking, and what I'm
saying is effectively that replacing pm_runtime_put_autosuspend() with
pm_runtime_put() almost everywhere (if not just everywhere) would be
fine with me.

I also think that the current users of pm_runtime_put_autosuspend()
that is not immediately preceded by pm_runtime_mark_last_busy() can be
readily switched over to using pm_runtime_put() instead of it and then
pm_runtime_put_autosuspend() can be made call
pm_runtime_mark_last_busy(), so the latter can be removed from the
code using the former.  Note that this last step does not require
tree-wide changes, because calling pm_runtime_mark_last_busy() twice
in a row for the same device is not a problem.

Of course, the documentation needs to be updated in accordance with
the code changes, which didn't happen when previous changes were made
to pm_runtime_put() and that likely is why it does not reflect the
current code.

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 13:34                 ` Rafael J. Wysocki
  0 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-09 13:34 UTC (permalink / raw)
  To: Richard Fitzgerald, Sakari Ailus
  Cc: Ulf Hansson, Laurent Pinchart, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, Andy Shevchenko, Uwe Kleine-König

On Wed, Oct 9, 2024 at 2:48 PM Richard Fitzgerald
<rf@opensource.cirrus.com> wrote:
>
> On 08/10/2024 7:24 pm, Rafael J. Wysocki wrote:
> > On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >>
> >> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> >> <laurent.pinchart@ideasonboard.com> wrote:
> >>>
> >>> Hi Ulf,
> >>>
> >>> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> >>>> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> >>>>> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> >>>>>> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> >>>>>>>
> >>>>>>> Hello everyone,
> >>>>>>>
> >>>>>>> This set will switch the users of pm_runtime_put_autosuspend() to
> >>>>>>> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> >>>>>>> to include a call to pm_runtime_mark_last_busy(). The two are almost
> >>>>>>> always used together, apart from bugs which are likely common. Going
> >>>>>>> forward, most new users should be using pm_runtime_put_autosuspend().
> >>>>>>>
> >>>>>>> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> >>>>>>> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> >>>>>>> and pm_runtime_mark_last_busy().
> >>>>>>
> >>>>>> That sounds like it could cause a lot of churns.
> >>>>>>
> >>>>>> Why not add a new helper function that does the
> >>>>>> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> >>>>>> things? Then we can start moving users over to this new interface,
> >>>>>> rather than having this intermediate step?
> >>>>>
> >>>>> I think the API would be nicer if we used the shortest and simplest
> >>>>> function names for the most common use cases. Following
> >>>>> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> >>>>> most common use case. That's why I like Sakari's approach of repurposing
> >>>>> pm_runtime_put_autosuspend(), and introducing
> >>>>> __pm_runtime_put_autosuspend() for the odd cases where
> >>>>> pm_runtime_mark_last_busy() shouldn't be called.
> >>>>
> >>>> Okay, so the reason for this approach is because we couldn't find a
> >>>> short and descriptive name that could be used in favor of
> >>>> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> >>>> you like it - or not. :-)
> >>>
> >>> I like the idea at least :-)
> >>>
> >>>> I don't know what options you guys discussed, but to me the entire
> >>>> "autosuspend"-suffix isn't really that necessary in my opinion. There
> >>>> are more ways than calling pm_runtime_put_autosuspend() that triggers
> >>>> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> >>>> calling pm_runtime_put() has the similar effect.
> >>>
> >>> To be honest, I'm lost there. pm_runtime_put() calls
> >>> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> >>> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> >>> RPM_ASYNC | RPM_AUTO).
> >>
> >> __pm_runtime_idle() ends up calling rpm_idle(), which may call
> >> rpm_suspend() - if it succeeds to idle the device. In that case, it
> >> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> >> to what is happening when calling pm_runtime_put_autosuspend().
> >
> > Right.
> >
> > For almost everybody, except for a small bunch of drivers that
> > actually have a .runtime_idle() callback, pm_runtime_put() is
> > literally equivalent to pm_runtime_put_autosuspend().
> >
> > So really the question is why anyone who doesn't provide a
> > .runtime_idle() callback bothers with using this special
> > pm_runtime_put_autosuspend() thing,
>
> Because they are following the documentation? It says:
>
> "Drivers should call pm_runtime_mark_last_busy() to update this field
> after carrying out I/O, typically just before calling
> pm_runtime_put_autosuspend()."
>
> and
>
> "In order to use autosuspend, subsystems or drivers must call
> pm_runtime_use_autosuspend() (...), and thereafter they should use the
> various `*_autosuspend()` helper functions instead of the non#
> autosuspend counterparts"
>
> So the documentation says I should be using pm_runtime_put_autosuspend()
> instead of pm_runtime_put().
>
> Seems unfair to criticise people for following the documentation.

I'm not criticising anyone, just wondering why they do what they do.

"Because it is documented this way" is a fair answer, but it doesn't
invalidate the observation that the difference between
pm_runtime_put_autosuspend() and pm_runtime_put() boils down to the
cases when the .runtime_idle() callback is present (which are few and
far between so to speak).  Moreover, there are call sites using
pm_runtime_*() functions even though they may not know whether or not
autosuspend is enabled for the target devices, so the advice given in
the documentation cannot be universally followed regardless.

This thread is about the way to go, generally speaking, and what I'm
saying is effectively that replacing pm_runtime_put_autosuspend() with
pm_runtime_put() almost everywhere (if not just everywhere) would be
fine with me.

I also think that the current users of pm_runtime_put_autosuspend()
that is not immediately preceded by pm_runtime_mark_last_busy() can be
readily switched over to using pm_runtime_put() instead of it and then
pm_runtime_put_autosuspend() can be made call
pm_runtime_mark_last_busy(), so the latter can be removed from the
code using the former.  Note that this last step does not require
tree-wide changes, because calling pm_runtime_mark_last_busy() twice
in a row for the same device is not a problem.

Of course, the documentation needs to be updated in accordance with
the code changes, which didn't happen when previous changes were made
to pm_runtime_put() and that likely is why it does not reflect the
current code.

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 13:34                 ` Rafael J. Wysocki
  0 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-09 13:34 UTC (permalink / raw)
  To: Richard Fitzgerald, Sakari Ailus
  Cc: Ulf Hansson, Laurent Pinchart, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, Andy Shevchenko, Uwe Kleine-König

On Wed, Oct 9, 2024 at 2:48 PM Richard Fitzgerald
<rf@opensource.cirrus.com> wrote:
>
> On 08/10/2024 7:24 pm, Rafael J. Wysocki wrote:
> > On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >>
> >> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> >> <laurent.pinchart@ideasonboard.com> wrote:
> >>>
> >>> Hi Ulf,
> >>>
> >>> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> >>>> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> >>>>> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> >>>>>> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> >>>>>>>
> >>>>>>> Hello everyone,
> >>>>>>>
> >>>>>>> This set will switch the users of pm_runtime_put_autosuspend() to
> >>>>>>> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> >>>>>>> to include a call to pm_runtime_mark_last_busy(). The two are almost
> >>>>>>> always used together, apart from bugs which are likely common. Going
> >>>>>>> forward, most new users should be using pm_runtime_put_autosuspend().
> >>>>>>>
> >>>>>>> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> >>>>>>> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> >>>>>>> and pm_runtime_mark_last_busy().
> >>>>>>
> >>>>>> That sounds like it could cause a lot of churns.
> >>>>>>
> >>>>>> Why not add a new helper function that does the
> >>>>>> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> >>>>>> things? Then we can start moving users over to this new interface,
> >>>>>> rather than having this intermediate step?
> >>>>>
> >>>>> I think the API would be nicer if we used the shortest and simplest
> >>>>> function names for the most common use cases. Following
> >>>>> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> >>>>> most common use case. That's why I like Sakari's approach of repurposing
> >>>>> pm_runtime_put_autosuspend(), and introducing
> >>>>> __pm_runtime_put_autosuspend() for the odd cases where
> >>>>> pm_runtime_mark_last_busy() shouldn't be called.
> >>>>
> >>>> Okay, so the reason for this approach is because we couldn't find a
> >>>> short and descriptive name that could be used in favor of
> >>>> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> >>>> you like it - or not. :-)
> >>>
> >>> I like the idea at least :-)
> >>>
> >>>> I don't know what options you guys discussed, but to me the entire
> >>>> "autosuspend"-suffix isn't really that necessary in my opinion. There
> >>>> are more ways than calling pm_runtime_put_autosuspend() that triggers
> >>>> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> >>>> calling pm_runtime_put() has the similar effect.
> >>>
> >>> To be honest, I'm lost there. pm_runtime_put() calls
> >>> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> >>> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> >>> RPM_ASYNC | RPM_AUTO).
> >>
> >> __pm_runtime_idle() ends up calling rpm_idle(), which may call
> >> rpm_suspend() - if it succeeds to idle the device. In that case, it
> >> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> >> to what is happening when calling pm_runtime_put_autosuspend().
> >
> > Right.
> >
> > For almost everybody, except for a small bunch of drivers that
> > actually have a .runtime_idle() callback, pm_runtime_put() is
> > literally equivalent to pm_runtime_put_autosuspend().
> >
> > So really the question is why anyone who doesn't provide a
> > .runtime_idle() callback bothers with using this special
> > pm_runtime_put_autosuspend() thing,
>
> Because they are following the documentation? It says:
>
> "Drivers should call pm_runtime_mark_last_busy() to update this field
> after carrying out I/O, typically just before calling
> pm_runtime_put_autosuspend()."
>
> and
>
> "In order to use autosuspend, subsystems or drivers must call
> pm_runtime_use_autosuspend() (...), and thereafter they should use the
> various `*_autosuspend()` helper functions instead of the non#
> autosuspend counterparts"
>
> So the documentation says I should be using pm_runtime_put_autosuspend()
> instead of pm_runtime_put().
>
> Seems unfair to criticise people for following the documentation.

I'm not criticising anyone, just wondering why they do what they do.

"Because it is documented this way" is a fair answer, but it doesn't
invalidate the observation that the difference between
pm_runtime_put_autosuspend() and pm_runtime_put() boils down to the
cases when the .runtime_idle() callback is present (which are few and
far between so to speak).  Moreover, there are call sites using
pm_runtime_*() functions even though they may not know whether or not
autosuspend is enabled for the target devices, so the advice given in
the documentation cannot be universally followed regardless.

This thread is about the way to go, generally speaking, and what I'm
saying is effectively that replacing pm_runtime_put_autosuspend() with
pm_runtime_put() almost everywhere (if not just everywhere) would be
fine with me.

I also think that the current users of pm_runtime_put_autosuspend()
that is not immediately preceded by pm_runtime_mark_last_busy() can be
readily switched over to using pm_runtime_put() instead of it and then
pm_runtime_put_autosuspend() can be made call
pm_runtime_mark_last_busy(), so the latter can be removed from the
code using the former.  Note that this last step does not require
tree-wide changes, because calling pm_runtime_mark_last_busy() twice
in a row for the same device is not a problem.

Of course, the documentation needs to be updated in accordance with
the code changes, which didn't happen when previous changes were made
to pm_runtime_put() and that likely is why it does not reflect the
current code.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-09 13:34                 ` Rafael J. Wysocki
  0 siblings, 0 replies; 122+ messages in thread
From: Rafael J. Wysocki @ 2024-10-09 13:34 UTC (permalink / raw)
  To: Richard Fitzgerald, Sakari Ailus
  Cc: Ulf Hansson, Laurent Pinchart, dri-devel, linux-kernel,
	linux-bluetooth, linux-clk, linux-crypto, dmaengine, linux-gpio,
	amd-gfx, nouveau, linux-stm32, linux-arm-kernel, linux-i2c,
	linux-i3c, linux-iio, linux-input, patches, iommu, imx,
	linux-mediatek, linux-media, linux-mmc, linux-mtd, netdev,
	linux-wireless, linux-pci, linux-phy, linux-pwm, linux-remoteproc,
	linux-sound, linux-spi, linux-staging, linux-usb, linux-serial,
	greybus-dev, asahi, Andy Shevchenko, Uwe Kleine-König

On Wed, Oct 9, 2024 at 2:48 PM Richard Fitzgerald
<rf@opensource.cirrus.com> wrote:
>
> On 08/10/2024 7:24 pm, Rafael J. Wysocki wrote:
> > On Tue, Oct 8, 2024 at 12:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >>
> >> On Tue, 8 Oct 2024 at 00:25, Laurent Pinchart
> >> <laurent.pinchart@ideasonboard.com> wrote:
> >>>
> >>> Hi Ulf,
> >>>
> >>> On Tue, Oct 08, 2024 at 12:08:24AM +0200, Ulf Hansson wrote:
> >>>> On Mon, 7 Oct 2024 at 20:49, Laurent Pinchart wrote:
> >>>>> On Fri, Oct 04, 2024 at 04:38:36PM +0200, Ulf Hansson wrote:
> >>>>>> On Fri, 4 Oct 2024 at 11:41, Sakari Ailus wrote:
> >>>>>>>
> >>>>>>> Hello everyone,
> >>>>>>>
> >>>>>>> This set will switch the users of pm_runtime_put_autosuspend() to
> >>>>>>> __pm_runtime_put_autosuspend() while the former will soon be re-purposed
> >>>>>>> to include a call to pm_runtime_mark_last_busy(). The two are almost
> >>>>>>> always used together, apart from bugs which are likely common. Going
> >>>>>>> forward, most new users should be using pm_runtime_put_autosuspend().
> >>>>>>>
> >>>>>>> Once this conversion is done and pm_runtime_put_autosuspend() re-purposed,
> >>>>>>> I'll post another set to merge the calls to __pm_runtime_put_autosuspend()
> >>>>>>> and pm_runtime_mark_last_busy().
> >>>>>>
> >>>>>> That sounds like it could cause a lot of churns.
> >>>>>>
> >>>>>> Why not add a new helper function that does the
> >>>>>> pm_runtime_put_autosuspend() and the pm_runtime_mark_last_busy()
> >>>>>> things? Then we can start moving users over to this new interface,
> >>>>>> rather than having this intermediate step?
> >>>>>
> >>>>> I think the API would be nicer if we used the shortest and simplest
> >>>>> function names for the most common use cases. Following
> >>>>> pm_runtime_put_autosuspend() with pm_runtime_mark_last_busy() is that
> >>>>> most common use case. That's why I like Sakari's approach of repurposing
> >>>>> pm_runtime_put_autosuspend(), and introducing
> >>>>> __pm_runtime_put_autosuspend() for the odd cases where
> >>>>> pm_runtime_mark_last_busy() shouldn't be called.
> >>>>
> >>>> Okay, so the reason for this approach is because we couldn't find a
> >>>> short and descriptive name that could be used in favor of
> >>>> pm_runtime_put_autosuspend(). Let me throw some ideas at it and maybe
> >>>> you like it - or not. :-)
> >>>
> >>> I like the idea at least :-)
> >>>
> >>>> I don't know what options you guys discussed, but to me the entire
> >>>> "autosuspend"-suffix isn't really that necessary in my opinion. There
> >>>> are more ways than calling pm_runtime_put_autosuspend() that triggers
> >>>> us to use the RPM_AUTO flag for rpm_suspend(). For example, just
> >>>> calling pm_runtime_put() has the similar effect.
> >>>
> >>> To be honest, I'm lost there. pm_runtime_put() calls
> >>> __pm_runtime_idle(RPM_GET_PUT | RPM_ASYNC), while
> >>> pm_runtime_put_autosuspend() calls __pm_runtime_suspend(RPM_GET_PUT |
> >>> RPM_ASYNC | RPM_AUTO).
> >>
> >> __pm_runtime_idle() ends up calling rpm_idle(), which may call
> >> rpm_suspend() - if it succeeds to idle the device. In that case, it
> >> tags on the RPM_AUTO flag in the call to rpm_suspend(). Quite similar
> >> to what is happening when calling pm_runtime_put_autosuspend().
> >
> > Right.
> >
> > For almost everybody, except for a small bunch of drivers that
> > actually have a .runtime_idle() callback, pm_runtime_put() is
> > literally equivalent to pm_runtime_put_autosuspend().
> >
> > So really the question is why anyone who doesn't provide a
> > .runtime_idle() callback bothers with using this special
> > pm_runtime_put_autosuspend() thing,
>
> Because they are following the documentation? It says:
>
> "Drivers should call pm_runtime_mark_last_busy() to update this field
> after carrying out I/O, typically just before calling
> pm_runtime_put_autosuspend()."
>
> and
>
> "In order to use autosuspend, subsystems or drivers must call
> pm_runtime_use_autosuspend() (...), and thereafter they should use the
> various `*_autosuspend()` helper functions instead of the non#
> autosuspend counterparts"
>
> So the documentation says I should be using pm_runtime_put_autosuspend()
> instead of pm_runtime_put().
>
> Seems unfair to criticise people for following the documentation.

I'm not criticising anyone, just wondering why they do what they do.

"Because it is documented this way" is a fair answer, but it doesn't
invalidate the observation that the difference between
pm_runtime_put_autosuspend() and pm_runtime_put() boils down to the
cases when the .runtime_idle() callback is present (which are few and
far between so to speak).  Moreover, there are call sites using
pm_runtime_*() functions even though they may not know whether or not
autosuspend is enabled for the target devices, so the advice given in
the documentation cannot be universally followed regardless.

This thread is about the way to go, generally speaking, and what I'm
saying is effectively that replacing pm_runtime_put_autosuspend() with
pm_runtime_put() almost everywhere (if not just everywhere) would be
fine with me.

I also think that the current users of pm_runtime_put_autosuspend()
that is not immediately preceded by pm_runtime_mark_last_busy() can be
readily switched over to using pm_runtime_put() instead of it and then
pm_runtime_put_autosuspend() can be made call
pm_runtime_mark_last_busy(), so the latter can be removed from the
code using the former.  Note that this last step does not require
tree-wide changes, because calling pm_runtime_mark_last_busy() twice
in a row for the same device is not a problem.

Of course, the documentation needs to be updated in accordance with
the code changes, which didn't happen when previous changes were made
to pm_runtime_put() and that likely is why it does not reflect the
current code.

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 22/51] iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 22/51] iommu/arm-smmu: " Sakari Ailus
@ 2024-10-10 15:33   ` Pranjal Shrivastava
  2024-10-23 16:48     ` Will Deacon
  0 siblings, 1 reply; 122+ messages in thread
From: Pranjal Shrivastava @ 2024-10-10 15:33 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: Will Deacon, Robin Murphy, Joerg Roedel, Jason Gunthorpe,
	Rob Clark, Georgi Djakov, linux-arm-kernel, iommu

On Fri, Oct 04, 2024 at 12:41:23PM +0300, Sakari Ailus wrote:
> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> index 8321962b3714..cad02d5dc6d2 100644
> --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> @@ -79,7 +79,7 @@ static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
>  static inline void arm_smmu_rpm_put(struct arm_smmu_device *smmu)
>  {
>  	if (pm_runtime_enabled(smmu->dev))
> -		pm_runtime_put_autosuspend(smmu->dev);
> +		__pm_runtime_put_autosuspend(smmu->dev);
>  }

Seems like a straightforward change as a result of [1].
Although, I had a few things to discuss:

1. The `rpm_resume` in drivers/base/power/runtime.c seems to call
`pm_runtime_mark_last_busy` in case the ->runtime_resume callback
returned successfully. In such a case, why would we want to move
`pm_runtime_mark_last_busy` within `pm_runtime_put_autosuspend` ?

2. In the arm-smmu driver, we seem to rely on the rpm_resume to call
`pm_runtime_mark_last_busy` as a part of the ->runtime_resume callback.
The only other case, where we might wanna `*mark_last_busy` is if we
want the autosuspend timer to be re-started in case of a failed suspend.
However, the `arm_smmu_runtime_suspend` doesn't return errno in any case
hence, I don't see any other case where we'd benefit from using
`mark_last_busy` in the arm-smmu driver. 

On the other hand, I don't see a problem with using it either :)
Any thoughts Will/Rob/Robin?

>  
>  static void arm_smmu_rpm_use_autosuspend(struct arm_smmu_device *smmu)
> -- 
> 2.39.5
> 

Apart from the above discussion, for this patch alone:
Reviewed-by: Pranjal Shrivastava <praan@google.com>

Thanks,
Pranjal

[1]
 https://lore.kernel.org/all/20240109133639.111210-1-sakari.ailus@linux.intel.com/

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 22/51] iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
  2024-10-10 15:33   ` Pranjal Shrivastava
@ 2024-10-23 16:48     ` Will Deacon
  2024-10-24 15:26       ` Pranjal Shrivastava
  0 siblings, 1 reply; 122+ messages in thread
From: Will Deacon @ 2024-10-23 16:48 UTC (permalink / raw)
  To: Pranjal Shrivastava
  Cc: Sakari Ailus, Robin Murphy, Joerg Roedel, Jason Gunthorpe,
	Rob Clark, Georgi Djakov, linux-arm-kernel, iommu

On Thu, Oct 10, 2024 at 03:33:11PM +0000, Pranjal Shrivastava wrote:
> On Fri, Oct 04, 2024 at 12:41:23PM +0300, Sakari Ailus wrote:
> > pm_runtime_put_autosuspend() will soon be changed to include a call to
> > pm_runtime_mark_last_busy(). This patch switches the current users to
> > __pm_runtime_put_autosuspend() which will continue to have the
> > functionality of old pm_runtime_put_autosuspend().
> > 
> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > ---
> >  drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> > index 8321962b3714..cad02d5dc6d2 100644
> > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
> > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> > @@ -79,7 +79,7 @@ static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
> >  static inline void arm_smmu_rpm_put(struct arm_smmu_device *smmu)
> >  {
> >  	if (pm_runtime_enabled(smmu->dev))
> > -		pm_runtime_put_autosuspend(smmu->dev);
> > +		__pm_runtime_put_autosuspend(smmu->dev);
> >  }
> 
> Seems like a straightforward change as a result of [1].
> Although, I had a few things to discuss:
> 
> 1. The `rpm_resume` in drivers/base/power/runtime.c seems to call
> `pm_runtime_mark_last_busy` in case the ->runtime_resume callback
> returned successfully. In such a case, why would we want to move
> `pm_runtime_mark_last_busy` within `pm_runtime_put_autosuspend` ?
> 
> 2. In the arm-smmu driver, we seem to rely on the rpm_resume to call
> `pm_runtime_mark_last_busy` as a part of the ->runtime_resume callback.
> The only other case, where we might wanna `*mark_last_busy` is if we
> want the autosuspend timer to be re-started in case of a failed suspend.
> However, the `arm_smmu_runtime_suspend` doesn't return errno in any case
> hence, I don't see any other case where we'd benefit from using
> `mark_last_busy` in the arm-smmu driver. 
> 
> On the other hand, I don't see a problem with using it either :)
> Any thoughts Will/Rob/Robin?

To be honest, I think the current driver code is pretty weird. We're
calling arm_smmu_rpm_use_autosuspend() during device attach and that
does:

	pm_runtime_set_autosuspend_delay(smmu->dev, 20);
	pm_runtime_use_autosuspend(smmu->dev);

whereas I would've expected these autosuspend parameters to be configured
once during SMMU probe and then for attach to do something like:

	pm_runtime_mark_last_busy();
	__pm_runtime_put_autosuspend();

So I think we should probably rework the code we have slightly, which
will hopefully make this giant refactoring series a little more
straightforward.

Will


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 15/51] stm class: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 ` [PATCH 15/51] stm class: " Sakari Ailus
@ 2024-10-24 10:59   ` Alexander Shishkin
  0 siblings, 0 replies; 122+ messages in thread
From: Alexander Shishkin @ 2024-10-24 10:59 UTC (permalink / raw)
  To: Sakari Ailus, Maxime Coquelin, Alexandre Torgue
  Cc: linux-stm32, linux-arm-kernel, alexander.shishkin

Sakari Ailus <sakari.ailus@linux.intel.com> writes:

> pm_runtime_put_autosuspend() will soon be changed to include a call to
> pm_runtime_mark_last_busy(). This patch switches the current users to
> __pm_runtime_put_autosuspend() which will continue to have the
> functionality of old pm_runtime_put_autosuspend().

Hi Sakari,

Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>

Or do you want me to pick it up into my queue instead?

Regards,
--
Alex


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [PATCH 22/51] iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()
  2024-10-23 16:48     ` Will Deacon
@ 2024-10-24 15:26       ` Pranjal Shrivastava
  0 siblings, 0 replies; 122+ messages in thread
From: Pranjal Shrivastava @ 2024-10-24 15:26 UTC (permalink / raw)
  To: Will Deacon
  Cc: Sakari Ailus, Robin Murphy, Joerg Roedel, Jason Gunthorpe,
	Rob Clark, Georgi Djakov, linux-arm-kernel, iommu

On Wed, Oct 23, 2024 at 05:48:36PM +0100, Will Deacon wrote:
> On Thu, Oct 10, 2024 at 03:33:11PM +0000, Pranjal Shrivastava wrote:
> > On Fri, Oct 04, 2024 at 12:41:23PM +0300, Sakari Ailus wrote:
> > > pm_runtime_put_autosuspend() will soon be changed to include a call to
> > > pm_runtime_mark_last_busy(). This patch switches the current users to
> > > __pm_runtime_put_autosuspend() which will continue to have the
> > > functionality of old pm_runtime_put_autosuspend().
> > > 
> > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > > ---
> > >  drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> > > index 8321962b3714..cad02d5dc6d2 100644
> > > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
> > > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> > > @@ -79,7 +79,7 @@ static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
> > >  static inline void arm_smmu_rpm_put(struct arm_smmu_device *smmu)
> > >  {
> > >  	if (pm_runtime_enabled(smmu->dev))
> > > -		pm_runtime_put_autosuspend(smmu->dev);
> > > +		__pm_runtime_put_autosuspend(smmu->dev);
> > >  }
> > 
> > Seems like a straightforward change as a result of [1].
> > Although, I had a few things to discuss:
> > 
> > 1. The `rpm_resume` in drivers/base/power/runtime.c seems to call
> > `pm_runtime_mark_last_busy` in case the ->runtime_resume callback
> > returned successfully. In such a case, why would we want to move
> > `pm_runtime_mark_last_busy` within `pm_runtime_put_autosuspend` ?
> > 
> > 2. In the arm-smmu driver, we seem to rely on the rpm_resume to call
> > `pm_runtime_mark_last_busy` as a part of the ->runtime_resume callback.
> > The only other case, where we might wanna `*mark_last_busy` is if we
> > want the autosuspend timer to be re-started in case of a failed suspend.
> > However, the `arm_smmu_runtime_suspend` doesn't return errno in any case
> > hence, I don't see any other case where we'd benefit from using
> > `mark_last_busy` in the arm-smmu driver. 
> > 
> > On the other hand, I don't see a problem with using it either :)
> > Any thoughts Will/Rob/Robin?
> 
> To be honest, I think the current driver code is pretty weird. We're
> calling arm_smmu_rpm_use_autosuspend() during device attach and that
> does:
> 
> 	pm_runtime_set_autosuspend_delay(smmu->dev, 20);
> 	pm_runtime_use_autosuspend(smmu->dev);
> 
> whereas I would've expected these autosuspend parameters to be configured
> once during SMMU probe and then for attach to do something like:
> 
> 	pm_runtime_mark_last_busy();
> 	__pm_runtime_put_autosuspend();
> 

Ack. I had missed the `*set_autosuspend` call during attach, there's no
need for that to happen with each attach. I agree that we should setup
autosuspend delay once during the smmu probe and mark_last_busy on
attach to retain the current behaviour.

> So I think we should probably rework the code we have slightly, which
> will hopefully make this giant refactoring series a little more
> straightforward.

+1.

> 
> Will

Thanks,
Pranjal


^ permalink raw reply	[flat|nested] 122+ messages in thread

end of thread, other threads:[~2024-10-24 15:59 UTC | newest]

Thread overview: 122+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04  9:41 [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend() Sakari Ailus
2024-10-04  9:41 ` Sakari Ailus
2024-10-04  9:41 ` Sakari Ailus
2024-10-04  9:41 ` Sakari Ailus
2024-10-04  9:41 ` [PATCH 03/51] bus: sunxi-rsb: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 04/51] hwrng: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 05/51] clk: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 02/51] bluetooth: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 01/51] accel/ivpu: " Sakari Ailus
2024-10-04  9:51   ` Jacek Lawrynowicz
2024-10-04  9:41 ` [PATCH 10/51] drm/nouveau: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 12/51] drm/panfrost: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 11/51] drm/radeon: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 08/51] gpio: " Sakari Ailus
2024-10-04  9:55   ` Bartosz Golaszewski
2024-10-04 10:08     ` Sakari Ailus
2024-10-04  9:41 ` [PATCH 07/51] dmaengine: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 06/51] crypto: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 09/51] drm/amd: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 17/51] i3c: master: svc: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 14/51] HSI: omap_ssi_port: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 18/51] i3c: dw: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 16/51] i2c: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 13/51] drivers: drm: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 15/51] stm class: " Sakari Ailus
2024-10-24 10:59   ` Alexander Shishkin
2024-10-04  9:41 ` [PATCH 20/51] Input: omap4-keypad: " Sakari Ailus
2024-10-04  9:55   ` Andreas Kemnade
2024-10-04 10:26     ` Sakari Ailus
2024-10-04 10:54       ` Andreas Kemnade
2024-10-04 11:08       ` Dmitry Torokhov
2024-10-04  9:41 ` [PATCH 24/51] mailbox: mtk-cmdq-mailbox: " Sakari Ailus
2024-10-07 14:27   ` Matthias Brugger
2024-10-04  9:41 ` [PATCH 19/51] iio: " Sakari Ailus
2024-10-04 13:45   ` Jonathan Cameron
2024-10-04  9:41 ` [PATCH 25/51] media: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 21/51] Input: cs40l50: " Sakari Ailus
2024-10-04 11:09   ` Dmitry Torokhov
2024-10-04  9:41 ` [PATCH 22/51] iommu/arm-smmu: " Sakari Ailus
2024-10-10 15:33   ` Pranjal Shrivastava
2024-10-23 16:48     ` Will Deacon
2024-10-24 15:26       ` Pranjal Shrivastava
2024-10-04  9:41 ` [PATCH 23/51] irqchip/imx-irqsteer: " Sakari Ailus
2024-10-06 19:52   ` Thomas Gleixner
2024-10-04  9:41 ` [PATCH 29/51] mtd: rawnand: gpmi: " Sakari Ailus
2024-10-04 11:12   ` Miquel Raynal
2024-10-04  9:41 ` [PATCH 28/51] mmc: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 27/51] mei: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 30/51] net: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 26/51] mfd: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 36/51] pwm: img: " Sakari Ailus
2024-10-04 12:38   ` Uwe Kleine-König
2024-10-04  9:41 ` [PATCH 37/51] regulator: stm32-vrefbuf: " Sakari Ailus
2024-10-04 11:34   ` Mark Brown
2024-10-04  9:41 ` [PATCH 35/51] power: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 34/51] phy: ti: phy-twl4030-usb: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 32/51] PCI/portdrv: " Sakari Ailus
2024-10-04  9:45   ` Ilpo Järvinen
2024-10-04  9:41 ` [PATCH 33/51] phy: motorola: phy-mapphone-mdm6600: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 31/51] nfc: trf7970a: " Sakari Ailus
2024-10-04 14:05   ` Krzysztof Kozlowski
2024-10-04  9:41 ` [PATCH 41/51] spi: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 38/51] remoteproc: omap: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 40/51] soundwire: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 39/51] slimbus: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 42/51] staging: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 46/51] w1: omap-hdq: " Sakari Ailus
2024-10-04 14:05   ` Krzysztof Kozlowski
2024-10-04  9:41 ` [PATCH 44/51] serial: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 43/51] thunderbolt: " Sakari Ailus
2024-10-04 10:07   ` Mika Westerberg
2024-10-04  9:41 ` [PATCH 49/51] ASoC: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 48/51] ALSA: hda: " Sakari Ailus
2024-10-04 10:56   ` Takashi Iwai
2024-10-04 23:57     ` Mark Brown
2024-10-04  9:41 ` [PATCH 45/51] usb: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 50/51] ALSA: intel_hdmi: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 51/51] soc: apple: mailbox: " Sakari Ailus
2024-10-04 14:38 ` [PATCH 00/51] treewide: " Ulf Hansson
2024-10-04 14:38   ` Ulf Hansson
2024-10-04 14:38   ` Ulf Hansson
2024-10-04 14:38   ` Ulf Hansson
2024-10-07 18:49   ` Laurent Pinchart
2024-10-07 18:49     ` Laurent Pinchart
2024-10-07 18:49     ` Laurent Pinchart
2024-10-07 18:49     ` Laurent Pinchart
2024-10-07 22:08     ` Ulf Hansson
2024-10-07 22:08       ` Ulf Hansson
2024-10-07 22:08       ` Ulf Hansson
2024-10-07 22:08       ` Ulf Hansson
2024-10-07 22:25       ` Laurent Pinchart
2024-10-07 22:25         ` Laurent Pinchart
2024-10-07 22:25         ` Laurent Pinchart
2024-10-07 22:25         ` Laurent Pinchart
2024-10-07 22:34         ` Ulf Hansson
2024-10-07 22:34           ` Ulf Hansson
2024-10-07 22:34           ` Ulf Hansson
2024-10-07 22:34           ` Ulf Hansson
2024-10-08 18:24           ` Rafael J. Wysocki
2024-10-08 18:24             ` Rafael J. Wysocki
2024-10-08 18:24             ` Rafael J. Wysocki
2024-10-08 18:24             ` Rafael J. Wysocki
2024-10-09 10:20             ` Rafael J. Wysocki
2024-10-09 10:20               ` Rafael J. Wysocki
2024-10-09 10:20               ` Rafael J. Wysocki
2024-10-09 10:20               ` Rafael J. Wysocki
2024-10-09 10:27             ` Ulf Hansson
2024-10-09 10:27               ` Ulf Hansson
2024-10-09 10:27               ` Ulf Hansson
2024-10-09 10:27               ` Ulf Hansson
2024-10-09 12:48             ` Richard Fitzgerald
2024-10-09 12:48               ` Richard Fitzgerald
2024-10-09 12:48               ` Richard Fitzgerald
2024-10-09 12:48               ` Richard Fitzgerald
2024-10-09 13:34               ` Rafael J. Wysocki
2024-10-09 13:34                 ` Rafael J. Wysocki
2024-10-09 13:34                 ` Rafael J. Wysocki
2024-10-09 13:34                 ` Rafael J. Wysocki
2024-10-08 20:38     ` Uwe Kleine-König
2024-10-08 20:38       ` Uwe Kleine-König
2024-10-08 20:38       ` Uwe Kleine-König
2024-10-08 20:38       ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.