Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
@ 2024-10-04  9:41 Sakari Ailus
  2024-10-04  9:41 ` [PATCH 40/51] soundwire: " Sakari Ailus
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ 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] 19+ messages in thread

* [PATCH 39/51] slimbus: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend() Sakari Ailus
  2024-10-04  9:41 ` [PATCH 40/51] soundwire: " Sakari Ailus
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04  9:41 ` [PATCH 49/51] ASoC: " Sakari Ailus
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 19+ 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] 19+ messages in thread

* [PATCH 40/51] soundwire: Switch to __pm_runtime_put_autosuspend()
  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 ` [PATCH 39/51] slimbus: " Sakari Ailus
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 19+ 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] 19+ messages in thread

* [PATCH 48/51] ALSA: hda: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend() Sakari Ailus
                   ` (2 preceding siblings ...)
  2024-10-04  9:41 ` [PATCH 49/51] ASoC: " Sakari Ailus
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04 10:56   ` Takashi Iwai
  2024-10-04  9:41 ` [PATCH 50/51] ALSA: intel_hdmi: " Sakari Ailus
  2024-10-04 14:38 ` [PATCH 00/51] treewide: " Ulf Hansson
  5 siblings, 1 reply; 19+ 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] 19+ messages in thread

* [PATCH 49/51] ASoC: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend() 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 ` Sakari Ailus
  2024-10-04  9:41 ` [PATCH 48/51] ALSA: hda: " Sakari Ailus
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 19+ 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] 19+ messages in thread

* [PATCH 50/51] ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend() Sakari Ailus
                   ` (3 preceding siblings ...)
  2024-10-04  9:41 ` [PATCH 48/51] ALSA: hda: " Sakari Ailus
@ 2024-10-04  9:41 ` Sakari Ailus
  2024-10-04 14:38 ` [PATCH 00/51] treewide: " Ulf Hansson
  5 siblings, 0 replies; 19+ 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] 19+ 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; 19+ 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] 19+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-04  9:41 [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend() Sakari Ailus
                   ` (4 preceding siblings ...)
  2024-10-04  9:41 ` [PATCH 50/51] ALSA: intel_hdmi: " Sakari Ailus
@ 2024-10-04 14:38 ` Ulf Hansson
  2024-10-07 18:49   ` Laurent Pinchart
  5 siblings, 1 reply; 19+ 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] 19+ 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; 19+ 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] 19+ messages in thread

* Re: [PATCH 00/51] treewide: Switch to __pm_runtime_put_autosuspend()
  2024-10-04 14:38 ` [PATCH 00/51] treewide: " Ulf Hansson
@ 2024-10-07 18:49   ` Laurent Pinchart
  2024-10-07 22:08     ` Ulf Hansson
  2024-10-08 20:38     ` Uwe Kleine-König
  0 siblings, 2 replies; 19+ 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] 19+ 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
  2024-10-07 22:25       ` Laurent Pinchart
  2024-10-08 20:38     ` Uwe Kleine-König
  1 sibling, 1 reply; 19+ 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] 19+ 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
  2024-10-07 22:34         ` Ulf Hansson
  0 siblings, 1 reply; 19+ 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] 19+ 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
  2024-10-08 18:24           ` Rafael J. Wysocki
  0 siblings, 1 reply; 19+ 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] 19+ 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
  2024-10-09 10:20             ` Rafael J. Wysocki
                               ` (2 more replies)
  0 siblings, 3 replies; 19+ 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] 19+ 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
@ 2024-10-08 20:38     ` Uwe Kleine-König
  1 sibling, 0 replies; 19+ 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] 19+ 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
  2024-10-09 10:27             ` Ulf Hansson
  2024-10-09 12:48             ` Richard Fitzgerald
  2 siblings, 0 replies; 19+ 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] 19+ 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
@ 2024-10-09 10:27             ` Ulf Hansson
  2024-10-09 12:48             ` Richard Fitzgerald
  2 siblings, 0 replies; 19+ 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] 19+ 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
  2024-10-09 10:27             ` Ulf Hansson
@ 2024-10-09 12:48             ` Richard Fitzgerald
  2024-10-09 13:34               ` Rafael J. Wysocki
  2 siblings, 1 reply; 19+ 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] 19+ 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
  0 siblings, 0 replies; 19+ 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] 19+ messages in thread

end of thread, other threads:[~2024-10-09 13:34 UTC | newest]

Thread overview: 19+ 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 ` [PATCH 40/51] soundwire: " Sakari Ailus
2024-10-04  9:41 ` [PATCH 39/51] slimbus: " Sakari Ailus
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 50/51] ALSA: intel_hdmi: " Sakari Ailus
2024-10-04 14:38 ` [PATCH 00/51] treewide: " Ulf Hansson
2024-10-07 18:49   ` Laurent Pinchart
2024-10-07 22:08     ` Ulf Hansson
2024-10-07 22:25       ` Laurent Pinchart
2024-10-07 22:34         ` Ulf Hansson
2024-10-08 18:24           ` Rafael J. Wysocki
2024-10-09 10:20             ` Rafael J. Wysocki
2024-10-09 10:27             ` Ulf Hansson
2024-10-09 12:48             ` Richard Fitzgerald
2024-10-09 13:34               ` Rafael J. Wysocki
2024-10-08 20:38     ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox