Skip to contentSkip to conversation

treewide: Remove redundant pm_runtime_mark_last_busy() calls

PATCH Applied Sakari Ailus 51 participants 165 messages Jul 4, 2025 – Nov 26, 2025 Page 1 of 2

Subsystems (204)

v1 of 5 Applied Latest is v5 →

lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

cover treewide: Remove redundant pm_runtime_mark_last_busy() calls

Hello everyone,

Late last year I posted a set to switch to __pm_runtime_mark_last_busy()
and gradually get rid of explicit pm_runtime_mark_last_busy() calls in
drivers, embedding them in the appropriate pm_runtime_*autosuspend*()
calls. The overall feedback I got at the time was that this is an
unnecessary intermediate step, and removing the
pm_runtime_mark_last_busy() calls can be done after adding them to the
relevant Runtime PM autosuspend related functions. The latter part has
been done and is present in Rafael's tree at the moment, also see <URL:https://lore.kernel.org/linux-pm/CAJZ5v0g7-8UWp6ATOy+=oGdxDaCnfKHBG_+kbiTr+VeuXZsUFQ@mail.gmail.com/>:

	git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
		pm-runtime-6.17-rc1

So before merging these, please pull Rafael's tag. My thinking is indeed these would be best merged via the respective trees as there's some potential for conflicts (there are around 920 call sites modified here).

These patches are on next-20250701.

The changes in these have been generated using the following Coccinelle patch:

-----------8<-----------------------------
@@
expression E;
identifier label, rval;
@@
- pm_runtime_mark_last_busy(E);
...
(
label:
|
)
...
(
pm_runtime_put_autosuspend(E);
|
pm_runtime_put_sync_autosuspend(E);
|
pm_runtime_autosuspend(E);
|
pm_request_autosuspend(E);
|
(void)pm_runtime_put_autosuspend(E);
|
(void)pm_runtime_put_sync_autosuspend(E);
|
(void)pm_runtime_autosuspend(E);
|
(void)pm_request_autosuspend(E);
|
return pm_runtime_put_autosuspend(E);
|
return pm_runtime_put_sync_autosuspend(E);
|
return pm_runtime_autosuspend(E);
|
return pm_request_autosuspend(E);
|
rval = pm_runtime_put_autosuspend(E);
|
rval = pm_runtime_put_sync_autosuspend(E);
|
rval = pm_runtime_autosuspend(E);
|
rval = pm_request_autosuspend(E);
)
-----------8<-----------------------------

Sakari Ailus (80):
accel/ivpu: Remove redundant pm_runtime_mark_last_busy() calls accel/amdxdna: Remove redundant pm_runtime_mark_last_busy() calls
Bluetooth: Remove redundant pm_runtime_mark_last_busy() calls
bus: sunxi-rsb: Remove redundant pm_runtime_mark_last_busy() calls
hwrng: Remove redundant pm_runtime_mark_last_busy() calls
clk: imx: Remove redundant pm_runtime_mark_last_busy() calls
clk: qcom: Remove redundant pm_runtime_mark_last_busy() calls
crypto: Remove redundant pm_runtime_mark_last_busy() calls
dmaengine: at_xdmac: Remove redundant pm_runtime_mark_last_busy()
calls
dmaengine: pl330: Remove redundant pm_runtime_mark_last_busy() calls
dmaengine: qcom: Remove redundant pm_runtime_mark_last_busy() calls
dmaengine: ste_dma40: Remove redundant pm_runtime_mark_last_busy()
calls
dmaengine: ti: Remove redundant pm_runtime_mark_last_busy() calls
dmaengine: zynqmp_dma: Remove redundant pm_runtime_mark_last_busy()
calls
gpio: arizona: Remove redundant pm_runtime_mark_last_busy() calls drm/amd: Remove redundant pm_runtime_mark_last_busy() calls drm/nouveau: Remove redundant pm_runtime_mark_last_busy() calls drm/radeon: Remove redundant pm_runtime_mark_last_busy() calls drm/panfrost: Remove redundant pm_runtime_mark_last_busy() calls
drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls
HSI: omap_ssi_port: Remove redundant pm_runtime_mark_last_busy() calls stm class: Remove redundant pm_runtime_mark_last_busy() calls
i2c: Remove redundant pm_runtime_mark_last_busy() calls
i3c: master: svc: Remove redundant pm_runtime_mark_last_busy() calls
i3c: dw: Remove redundant pm_runtime_mark_last_busy() calls
HID: intel-thc-hid: Remove redundant pm_runtime_mark_last_busy() calls
iio: accel: Remove redundant pm_runtime_mark_last_busy() calls
iio: adc: Remove redundant pm_runtime_mark_last_busy() calls
iio: chemical: Remove redundant pm_runtime_mark_last_busy() calls
iio: common: Remove redundant pm_runtime_mark_last_busy() calls
iio: dac: Remove redundant pm_runtime_mark_last_busy() calls
iio: gyro: Remove redundant pm_runtime_mark_last_busy() calls
iio: imu: Remove redundant pm_runtime_mark_last_busy() calls
iio: light: Remove redundant pm_runtime_mark_last_busy() calls
iio: magnetometer: Remove redundant pm_runtime_mark_last_busy() calls
iio: pressure: Remove redundant pm_runtime_mark_last_busy() calls
iio: proximity: Remove redundant pm_runtime_mark_last_busy() calls
iio: temperature: Remove redundant pm_runtime_mark_last_busy() calls
Input: omap4-keypad: Remove redundant pm_runtime_mark_last_busy()
calls
Input: cs40l50: Remove redundant pm_runtime_mark_last_busy() calls
media: Remove redundant pm_runtime_mark_last_busy() calls
mfd: Remove redundant pm_runtime_mark_last_busy() calls
mei: Remove redundant pm_runtime_mark_last_busy() calls
mmc: Remove redundant pm_runtime_mark_last_busy() calls
mtd: rawnand: gpmi: Remove redundant pm_runtime_mark_last_busy() calls
net: ethernet: Remove redundant pm_runtime_mark_last_busy() calls
net: ipa: Remove redundant pm_runtime_mark_last_busy() calls
net: wireless: Remove redundant pm_runtime_mark_last_busy() calls
net: wwan: Remove redundant pm_runtime_mark_last_busy() calls
nfc: trf7970a: Remove redundant pm_runtime_mark_last_busy() calls PCI/portdrv: Remove redundant pm_runtime_mark_last_busy() calls
phy: motorola: phy-mapphone-mdm6600: Remove redundant
pm_runtime_mark_last_busy() calls
phy: ti: phy-twl4030-usb: Remove redundant pm_runtime_mark_last_busy()
calls
power: supply: bq24190: Remove redundant pm_runtime_mark_last_busy()
calls
power: supply: twl4030_charger: Remove redundant
pm_runtime_mark_last_busy() calls
pwm: img: Remove redundant pm_runtime_mark_last_busy() calls
regulator: stm32-vrefbuf: Remove redundant pm_runtime_mark_last_busy()
calls
remoteproc: omap: Remove redundant pm_runtime_mark_last_busy() calls
slimbus: Remove redundant pm_runtime_mark_last_busy() calls
soundwire: Remove redundant pm_runtime_mark_last_busy() calls
spi: Remove redundant pm_runtime_mark_last_busy() calls
staging: greybus: Remove redundant pm_runtime_mark_last_busy() calls
greybus: Remove redundant pm_runtime_mark_last_busy() calls
media: rkvdec: Remove redundant pm_runtime_mark_last_busy() calls
thunderbolt: Remove redundant pm_runtime_mark_last_busy() calls
serial: Remove redundant pm_runtime_mark_last_busy() calls
usb: Remove redundant pm_runtime_mark_last_busy() calls
w1: omap-hdq: Remove redundant pm_runtime_mark_last_busy() calls
ALSA: hda: Remove redundant pm_runtime_mark_last_busy() calls
ASoC: atmel: Remove redundant pm_runtime_mark_last_busy() calls
ASoC: codecs: Remove redundant pm_runtime_mark_last_busy() calls
ASoC: Intel: Remove redundant pm_runtime_mark_last_busy() calls
ASoC: component: Remove redundant pm_runtime_mark_last_busy() calls
ASoC: SOF: Remove redundant pm_runtime_mark_last_busy() calls
ALSA: intel_hdmi: Remove redundant pm_runtime_mark_last_busy() calls
soc: apple: mailbox: Remove redundant pm_runtime_mark_last_busy()
calls
block: pm: Remove redundant pm_runtime_mark_last_busy() calls
Input: cyapa - Remove redundant pm_runtime_mark_last_busy() calls
mei: Remove redundant pm_runtime_mark_last_busy() calls
scsi: block: pm: Remove redundant pm_runtime_mark_last_busy() calls

 block/blk-pm.c                                |  1 -
 drivers/accel/amdxdna/amdxdna_pci_drv.c       |  3 --
 drivers/accel/ivpu/ivpu_job.c                 |  1 -
 drivers/accel/ivpu/ivpu_pm.c                  |  2 --
 drivers/bluetooth/btmtksdio.c                 |  1 -
 drivers/bluetooth/hci_bcm.c                   |  3 --
 drivers/bluetooth/hci_h5.c                    |  2 --
 drivers/bluetooth/hci_intel.c                 |  3 --
 drivers/bus/sunxi-rsb.c                       |  2 --
 drivers/char/hw_random/atmel-rng.c            |  1 -
 drivers/char/hw_random/cctrng.c               |  1 -
 drivers/char/hw_random/mtk-rng.c              |  1 -
 drivers/char/hw_random/npcm-rng.c             |  1 -
 drivers/char/hw_random/omap3-rom-rng.c        |  1 -
 drivers/char/hw_random/rockchip-rng.c         |  3 --
 drivers/char/hw_random/stm32-rng.c            |  1 -
 drivers/clk/imx/clk-imx8qxp-lpcg.c            |  1 -
 drivers/clk/imx/clk-scu.c                     |  1 -
 drivers/clk/qcom/lpassaudiocc-sc7280.c        |  2 --
 drivers/clk/qcom/lpasscorecc-sc7180.c         |  2 --
 drivers/crypto/ccree/cc_pm.c                  |  1 -
 drivers/crypto/hisilicon/qm.c                 |  1 -
 drivers/crypto/omap-aes-gcm.c                 |  1 -
 drivers/crypto/omap-aes.c                     |  1 -
 drivers/crypto/omap-des.c                     |  1 -
 drivers/crypto/omap-sham.c                    |  1 -
 drivers/crypto/stm32/stm32-cryp.c             |  1 -
 drivers/crypto/stm32/stm32-hash.c             |  1 -
 drivers/dma/at_xdmac.c                        | 11 ------
 drivers/dma/pl330.c                           |  5 ---
 drivers/dma/qcom/bam_dma.c                    |  5 ---
 drivers/dma/qcom/hidma.c                      |  9 -----
 drivers/dma/qcom/hidma_dbg.c                  |  1 -
 drivers/dma/qcom/hidma_mgmt.c                 |  2 --
 drivers/dma/ste_dma40.c                       |  8 -----
 drivers/dma/ti/cppi41.c                       |  5 ---
 drivers/dma/xilinx/zynqmp_dma.c               |  2 --
 drivers/gpio/gpio-arizona.c                   |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |  1 -
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  4 ---
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 25 -------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  4 ---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |  1 -
 .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c     |  1 -
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |  1 -
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            |  1 -
 .../drm/bridge/analogix/analogix_dp_core.c    |  2 --
 drivers/gpu/drm/bridge/analogix/anx7625.c     |  2 --
 drivers/gpu/drm/bridge/parade-ps8640.c        |  2 --
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  1 -
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  4 ---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c      |  2 --
 drivers/gpu/drm/exynos/exynos_drm_g2d.c       |  2 --
 drivers/gpu/drm/exynos/exynos_drm_gsc.c       |  2 --
 drivers/gpu/drm/exynos/exynos_drm_rotator.c   |  1 -
 drivers/gpu/drm/exynos/exynos_drm_scaler.c    |  1 -
 drivers/gpu/drm/i915/intel_runtime_pm.c       |  2 --
 drivers/gpu/drm/imx/dcss/dcss-crtc.c          |  1 -
 drivers/gpu/drm/lima/lima_sched.c             |  1 -
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |  2 --
 drivers/gpu/drm/nouveau/nouveau_connector.c   |  1 -
 drivers/gpu/drm/nouveau/nouveau_debugfs.c     |  1 -
 drivers/gpu/drm/nouveau/nouveau_display.c     |  1 -
 drivers/gpu/drm/nouveau/nouveau_drm.c         |  4 ---
 drivers/gpu/drm/nouveau/nouveau_gem.c         |  3 --
 drivers/gpu/drm/panel/panel-edp.c             |  3 --
 .../gpu/drm/panel/panel-samsung-atna33xc20.c  |  2 --
 drivers/gpu/drm/panel/panel-simple.c          |  2 --
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |  2 --
 drivers/gpu/drm/panthor/panthor_sched.c       |  2 --
 drivers/gpu/drm/radeon/radeon_acpi.c          |  1 -
 drivers/gpu/drm/radeon/radeon_connectors.c    |  5 ---
 drivers/gpu/drm/radeon/radeon_display.c       |  2 --
 drivers/gpu/drm/radeon/radeon_drv.c           |  2 --
 drivers/gpu/drm/radeon/radeon_fbdev.c         |  2 --
 drivers/gpu/drm/radeon/radeon_kms.c           |  4 ---
 drivers/gpu/drm/tegra/submit.c                |  1 -
 drivers/gpu/drm/tidss/tidss_drv.c             |  2 --
 drivers/gpu/drm/vc4/vc4_v3d.c                 |  1 -
 drivers/greybus/bundle.c                      |  1 -
 drivers/greybus/interface.c                   |  1 -
 .../intel-quicki2c/pci-quicki2c.c             |  2 --
 .../intel-quicki2c/quicki2c-hid.c             |  1 -
 .../intel-quickspi/pci-quickspi.c             |  2 --
 .../intel-quickspi/quickspi-hid.c             |  1 -
 drivers/hsi/controllers/omap_ssi_port.c       | 11 ------
 drivers/hwtracing/stm/core.c                  |  3 --
 drivers/i2c/busses/i2c-amd-mp2.h              |  1 -
 drivers/i2c/busses/i2c-at91-core.c            |  1 -
 drivers/i2c/busses/i2c-at91-master.c          |  1 -
 drivers/i2c/busses/i2c-cadence.c              |  1 -
 drivers/i2c/busses/i2c-davinci.c              |  2 --
 drivers/i2c/busses/i2c-designware-master.c    |  1 -
 drivers/i2c/busses/i2c-hix5hd2.c              |  1 -
 drivers/i2c/busses/i2c-i801.c                 |  1 -
 drivers/i2c/busses/i2c-img-scb.c              |  3 --
 drivers/i2c/busses/i2c-imx-lpi2c.c            |  4 ---
 drivers/i2c/busses/i2c-imx.c                  |  3 --
 drivers/i2c/busses/i2c-mv64xxx.c              |  1 -
 drivers/i2c/busses/i2c-nvidia-gpu.c           |  1 -
 drivers/i2c/busses/i2c-omap.c                 |  3 --
 drivers/i2c/busses/i2c-qcom-cci.c             |  2 --
 drivers/i2c/busses/i2c-qcom-geni.c            |  1 -
 drivers/i2c/busses/i2c-qup.c                  |  3 --
 drivers/i2c/busses/i2c-riic.c                 |  2 --
 drivers/i2c/busses/i2c-rzv2m.c                |  1 -
 drivers/i2c/busses/i2c-sprd.c                 |  2 --
 drivers/i2c/busses/i2c-stm32f7.c              |  5 ---
 drivers/i2c/busses/i2c-xiic.c                 |  1 -
 drivers/i3c/master/dw-i3c-master.c            |  8 -----
 drivers/i3c/master/svc-i3c-master.c           |  8 -----
 drivers/iio/accel/bmc150-accel-core.c         |  1 -
 drivers/iio/accel/bmi088-accel-core.c         |  3 --
 drivers/iio/accel/fxls8962af-core.c           |  1 -
 drivers/iio/accel/kxcjk-1013.c                |  1 -
 drivers/iio/accel/kxsd9.c                     |  3 --
 drivers/iio/accel/mma8452.c                   |  1 -
 drivers/iio/accel/mma9551_core.c              |  1 -
 drivers/iio/accel/msa311.c                    |  6 ----
 drivers/iio/adc/ab8500-gpadc.c                |  1 -
 drivers/iio/adc/at91-sama5d2_adc.c            | 10 ------
 drivers/iio/adc/imx8qxp-adc.c                 |  2 --
 drivers/iio/adc/imx93_adc.c                   |  1 -
 drivers/iio/adc/rcar-gyroadc.c                |  1 -
 drivers/iio/adc/rzg2l_adc.c                   |  3 --
 drivers/iio/adc/stm32-adc-core.c              |  1 -
 drivers/iio/adc/stm32-adc.c                   |  7 ----
 drivers/iio/adc/sun4i-gpadc-iio.c             |  2 --
 drivers/iio/adc/ti-ads1015.c                  |  1 -
 drivers/iio/adc/ti-ads1100.c                  |  1 -
 drivers/iio/adc/ti-ads1119.c                  |  2 --
 drivers/iio/chemical/atlas-sensor.c           |  2 --
 drivers/iio/chemical/bme680_core.c            |  3 --
 .../common/hid-sensors/hid-sensor-trigger.c   |  1 -
 drivers/iio/dac/stm32-dac.c                   |  3 --
 drivers/iio/gyro/bmg160_core.c                |  1 -
 drivers/iio/gyro/fxas21002c_core.c            |  2 --
 drivers/iio/gyro/mpu3050-core.c               |  3 --
 drivers/iio/gyro/mpu3050-i2c.c                |  1 -
 .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  5 ---
 .../imu/inv_icm42600/inv_icm42600_buffer.c    |  1 -
 .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  5 ---
 .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |  1 -
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  6 ----
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |  1 -
 drivers/iio/imu/kmx61.c                       |  1 -
 drivers/iio/light/apds9306.c                  |  2 --
 drivers/iio/light/apds9960.c                  |  1 -
 drivers/iio/light/bh1780.c                    |  1 -
 drivers/iio/light/gp2ap002.c                  |  2 --
 drivers/iio/light/isl29028.c                  |  1 -
 drivers/iio/light/ltrf216a.c                  |  1 -
 drivers/iio/light/pa12203001.c                |  1 -
 drivers/iio/light/rpr0521.c                   |  1 -
 drivers/iio/light/tsl2583.c                   |  1 -
 drivers/iio/light/tsl2591.c                   |  2 --
 drivers/iio/light/us5182d.c                   |  1 -
 drivers/iio/light/vcnl4000.c                  |  1 -
 drivers/iio/light/vcnl4035.c                  |  1 -
 drivers/iio/magnetometer/ak8974.c             |  2 --
 drivers/iio/magnetometer/ak8975.c             |  1 -
 drivers/iio/magnetometer/als31300.c           |  2 --
 drivers/iio/magnetometer/bmc150_magn.c        |  1 -
 drivers/iio/magnetometer/tmag5273.c           |  2 --
 drivers/iio/magnetometer/yamaha-yas530.c      |  2 --
 drivers/iio/pressure/bmp280-core.c            |  5 ---
 drivers/iio/pressure/icp10100.c               |  1 -
 drivers/iio/pressure/mpl115.c                 |  2 --
 drivers/iio/pressure/zpa2326.c                |  2 --
 .../iio/proximity/pulsedlight-lidar-lite-v2.c |  1 -
 drivers/iio/proximity/srf04.c                 |  1 -
 drivers/iio/temperature/mlx90614.c            |  1 -
 drivers/iio/temperature/mlx90632.c            |  1 -
 drivers/iio/temperature/mlx90635.c            |  1 -
 drivers/input/keyboard/omap4-keypad.c         |  4 ---
 drivers/input/misc/cs40l50-vibra.c            |  4 ---
 drivers/input/mouse/cyapa.c                   |  3 --
 drivers/input/mouse/cyapa_gen5.c              |  1 -
 drivers/media/i2c/alvium-csi2.c               |  1 -
 drivers/media/i2c/ccs/ccs-core.c              |  4 ---
 drivers/media/i2c/dw9768.c                    |  1 -
 drivers/media/i2c/gc0308.c                    |  3 --
 drivers/media/i2c/gc2145.c                    |  3 --
 drivers/media/i2c/imx219.c                    |  2 --
 drivers/media/i2c/imx283.c                    |  3 --
 drivers/media/i2c/imx290.c                    |  3 --
 drivers/media/i2c/imx296.c                    |  1 -
 drivers/media/i2c/imx415.c                    |  1 -
 drivers/media/i2c/mt9m114.c                   |  6 ----
 drivers/media/i2c/ov4689.c                    |  3 --
 drivers/media/i2c/ov5640.c                    |  4 ---
 drivers/media/i2c/ov5645.c                    |  3 --
 drivers/media/i2c/ov64a40.c                   |  4 ---
 drivers/media/i2c/ov8858.c                    |  2 --
 drivers/media/i2c/st-mipid02.c                |  2 --
 drivers/media/i2c/tc358746.c                  |  5 ---
 drivers/media/i2c/thp7312.c                   |  4 ---
 drivers/media/i2c/vd55g1.c                    |  4 ---
 drivers/media/i2c/vd56g3.c                    |  4 ---
 drivers/media/i2c/video-i2c.c                 |  4 ---
 .../chips-media/wave5/wave5-vpu-dec.c         |  4 ---
 .../chips-media/wave5/wave5-vpu-enc.c         |  5 ---
 .../media/platform/nvidia/tegra-vde/h264.c    |  2 --
 .../media/platform/qcom/iris/iris_hfi_queue.c |  1 -
 .../platform/raspberrypi/pisp_be/pisp_be.c    |  2 --
 .../media/platform/verisilicon/hantro_drv.c   |  1 -
 drivers/media/rc/gpio-ir-recv.c               |  1 -
 drivers/mfd/arizona-irq.c                     |  1 -
 drivers/mfd/cs40l50-core.c                    |  1 -
 drivers/mfd/cs42l43.c                         |  1 -
 drivers/misc/mei/client.c                     |  9 -----
 drivers/misc/mei/interrupt.c                  |  2 --
 drivers/mmc/core/core.c                       |  1 -
 drivers/mmc/host/atmel-mci.c                  |  2 --
 drivers/mmc/host/mmci.c                       |  1 -
 drivers/mmc/host/omap_hsmmc.c                 |  3 --
 drivers/mmc/host/sdhci-esdhc-imx.c            |  1 -
 drivers/mmc/host/sdhci-msm.c                  |  1 -
 drivers/mmc/host/sdhci-omap.c                 |  2 --
 drivers/mmc/host/sdhci-pxav3.c                |  2 --
 drivers/mmc/host/sdhci-sprd.c                 |  1 -
 drivers/mmc/host/sdhci_am654.c                |  1 -
 drivers/mmc/host/tmio_mmc_core.c              |  1 -
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  3 --
 drivers/net/ethernet/cadence/macb_main.c      |  5 ---
 drivers/net/ethernet/freescale/fec_main.c     |  8 -----
 drivers/net/ethernet/renesas/ravb_main.c      |  4 ---
 drivers/net/ethernet/ti/davinci_mdio.c        |  7 ----
 drivers/net/ipa/ipa_interrupt.c               |  1 -
 drivers/net/ipa/ipa_main.c                    |  1 -
 drivers/net/ipa/ipa_modem.c                   |  4 ---
 drivers/net/ipa/ipa_smp2p.c                   |  2 --
 drivers/net/ipa/ipa_uc.c                      |  2 --
 drivers/net/wireless/ath/wil6210/pm.c         |  1 -
 drivers/net/wireless/ti/wl18xx/debugfs.c      |  3 --
 drivers/net/wireless/ti/wlcore/cmd.c          |  1 -
 drivers/net/wireless/ti/wlcore/debugfs.c      | 11 ------
 drivers/net/wireless/ti/wlcore/main.c         | 36 -------------------
 drivers/net/wireless/ti/wlcore/scan.c         |  1 -
 drivers/net/wireless/ti/wlcore/sysfs.c        |  1 -
 drivers/net/wireless/ti/wlcore/testmode.c     |  2 --
 drivers/net/wireless/ti/wlcore/tx.c           |  1 -
 drivers/net/wireless/ti/wlcore/vendor_cmd.c   |  3 --
 drivers/net/wwan/qcom_bam_dmux.c              |  2 --
 drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |  3 --
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |  2 --
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |  2 --
 drivers/nfc/trf7970a.c                        |  1 -
 drivers/pci/pcie/portdrv.c                    |  1 -
 drivers/phy/motorola/phy-mapphone-mdm6600.c   |  2 --
 drivers/phy/ti/phy-twl4030-usb.c              |  3 --
 drivers/power/supply/bq24190_charger.c        | 14 --------
 drivers/power/supply/twl4030_charger.c        |  1 -
 drivers/pwm/pwm-img.c                         |  2 --
 drivers/regulator/stm32-vrefbuf.c             |  6 ----
 drivers/remoteproc/omap_remoteproc.c          |  3 --
 drivers/scsi/scsi_pm.c                        |  1 -
 drivers/slimbus/core.c                        |  1 -
 drivers/slimbus/messaging.c                   |  2 --
 drivers/slimbus/qcom-ctrl.c                   |  1 -
 drivers/soc/apple/mailbox.c                   |  1 -
 drivers/soundwire/bus.c                       |  1 -
 drivers/soundwire/cadence_master.c            |  1 -
 drivers/soundwire/qcom.c                      |  3 --
 drivers/spi/atmel-quadspi.c                   |  5 ---
 drivers/spi/spi-cadence-quadspi.c             |  2 --
 drivers/spi/spi-cadence.c                     |  1 -
 drivers/spi/spi-fsl-espi.c                    |  2 --
 drivers/spi/spi-fsl-lpspi.c                   |  2 --
 drivers/spi/spi-imx.c                         |  3 --
 drivers/spi/spi-mtk-nor.c                     |  1 -
 drivers/spi/spi-nxp-fspi.c                    |  1 -
 drivers/spi/spi-omap2-mcspi.c                 |  3 --
 drivers/spi/spi-rockchip-sfc.c                |  3 --
 drivers/spi/spi-s3c64xx.c                     |  3 --
 drivers/spi/spi-sprd.c                        |  1 -
 drivers/spi/spi-stm32-ospi.c                  |  7 ----
 drivers/spi/spi-stm32-qspi.c                  |  7 ----
 drivers/spi/spi-stm32.c                       |  2 --
 drivers/spi/spi-ti-qspi.c                     |  2 --
 drivers/spi/spi-zynqmp-gqspi.c                |  1 -
 drivers/spi/spi.c                             |  3 --
 drivers/staging/greybus/gbphy.c               |  1 -
 drivers/staging/greybus/gbphy.h               |  1 -
 drivers/staging/media/rkvdec/rkvdec.c         |  1 -
 drivers/thunderbolt/debugfs.c                 | 11 ------
 drivers/thunderbolt/domain.c                  |  2 --
 drivers/thunderbolt/icm.c                     |  7 ----
 drivers/thunderbolt/retimer.c                 |  2 --
 drivers/thunderbolt/switch.c                  |  4 ---
 drivers/thunderbolt/tb.c                      |  9 -----
 drivers/thunderbolt/usb4_port.c               |  2 --
 drivers/tty/serial/8250/8250_omap.c           |  9 -----
 drivers/tty/serial/8250/8250_port.c           |  2 --
 drivers/tty/serial/fsl_lpuart.c               |  1 -
 drivers/tty/serial/serial_core.c              |  1 -
 drivers/tty/serial/uartlite.c                 |  2 --
 drivers/tty/serial/xilinx_uartps.c            |  1 -
 drivers/usb/cdns3/cdns3-gadget.c              |  1 -
 drivers/usb/cdns3/cdnsp-gadget.c              |  1 -
 drivers/usb/chipidea/core.c                   |  1 -
 drivers/usb/chipidea/otg_fsm.c                |  1 -
 drivers/usb/dwc3/core.c                       |  2 --
 drivers/usb/dwc3/dwc3-am62.c                  |  1 -
 drivers/usb/dwc3/dwc3-imx8mp.c                |  1 -
 drivers/usb/dwc3/dwc3-pci.c                   |  1 -
 drivers/usb/dwc3/dwc3-xilinx.c                |  1 -
 drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |  1 -
 drivers/usb/host/xhci-mtk.c                   |  1 -
 drivers/usb/host/xhci-tegra.c                 |  1 -
 drivers/usb/misc/apple-mfi-fastcharge.c       |  1 -
 drivers/usb/mtu3/mtu3_plat.c                  |  1 -
 drivers/usb/musb/musb_core.c                  |  5 ---
 drivers/usb/musb/musb_debugfs.c               |  5 ---
 drivers/usb/musb/musb_dsps.c                  |  1 -
 drivers/usb/musb/musb_gadget.c                |  4 ---
 drivers/usb/musb/omap2430.c                   |  1 -
 drivers/w1/masters/omap_hdq.c                 |  5 ---
 sound/hda/hdac_device.c                       |  1 -
 sound/pci/hda/cs35l41_hda.c                   |  4 ---
 sound/pci/hda/cs35l56_hda.c                   |  1 -
 sound/pci/hda/tas2781_hda_i2c.c               |  3 --
 sound/pci/hda/tas2781_hda_spi.c               |  4 ---
 sound/soc/atmel/mchp-spdifrx.c                |  6 ----
 sound/soc/codecs/arizona-jack.c               |  2 --
 sound/soc/codecs/cs35l41.c                    |  2 --
 sound/soc/codecs/cs35l45.c                    |  1 -
 sound/soc/codecs/cs35l56-sdw.c                |  1 -
 sound/soc/codecs/cs35l56.c                    |  1 -
 sound/soc/codecs/cs42l42.c                    |  1 -
 sound/soc/codecs/cs42l43-jack.c               |  5 ---
 sound/soc/codecs/cs42l43.c                    |  2 --
 sound/soc/codecs/cs48l32.c                    |  1 -
 sound/soc/codecs/hda.c                        |  3 --
 sound/soc/codecs/max98363.c                   |  1 -
 sound/soc/codecs/max98373-sdw.c               |  1 -
 sound/soc/codecs/rt1017-sdca-sdw.c            |  1 -
 sound/soc/codecs/rt1308-sdw.c                 |  1 -
 sound/soc/codecs/rt1316-sdw.c                 |  1 -
 sound/soc/codecs/rt1318-sdw.c                 |  1 -
 sound/soc/codecs/rt1320-sdw.c                 |  1 -
 sound/soc/codecs/rt5682-sdw.c                 |  1 -
 sound/soc/codecs/rt700.c                      |  2 --
 sound/soc/codecs/rt711-sdca.c                 |  2 --
 sound/soc/codecs/rt711.c                      |  2 --
 sound/soc/codecs/rt712-sdca-dmic.c            |  1 -
 sound/soc/codecs/rt712-sdca.c                 |  2 --
 sound/soc/codecs/rt715-sdca.c                 |  1 -
 sound/soc/codecs/rt715.c                      |  1 -
 sound/soc/codecs/rt721-sdca.c                 |  2 --
 sound/soc/codecs/rt722-sdca.c                 |  2 --
 sound/soc/codecs/rt9123.c                     |  3 --
 sound/soc/codecs/tas2552.c                    |  1 -
 sound/soc/codecs/wcd-mbhc-v2.c                |  2 --
 sound/soc/codecs/wsa881x.c                    |  1 -
 sound/soc/codecs/wsa883x.c                    |  1 -
 sound/soc/codecs/wsa884x.c                    |  1 -
 sound/soc/intel/atom/sst/sst_pvt.c            |  1 -
 sound/soc/intel/avs/core.c                    |  1 -
 sound/soc/intel/avs/debugfs.c                 |  2 --
 sound/soc/intel/avs/ipc.c                     |  1 -
 sound/soc/intel/avs/pcm.c                     |  1 -
 sound/soc/intel/catpt/pcm.c                   |  6 ----
 sound/soc/intel/catpt/sysfs.c                 |  1 -
 sound/soc/soc-component.c                     |  1 -
 sound/soc/sof/control.c                       |  1 -
 sound/soc/sof/debug.c                         |  1 -
 sound/soc/sof/ipc3-dtrace.c                   |  1 -
 sound/soc/sof/ipc4-loader.c                   |  1 -
 sound/soc/sof/pcm.c                           |  1 -
 sound/soc/sof/sof-client-ipc-flood-test.c     |  1 -
 .../soc/sof/sof-client-ipc-kernel-injector.c  |  1 -
 sound/soc/sof/sof-client-ipc-msg-injector.c   |  1 -
 sound/soc/sof/sof-client-probes.c             |  3 --
 sound/x86/intel_hdmi_audio.c                  |  3 --
 381 files changed, 923 deletions(-)
Signature · 1 line
2.39.5
author maintainer
#1 lore raw

PATCH 1/80 accel/ivpu: Remove redundant pm_runtime_mark_last_busy() calls

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/accel/ivpu/ivpu_job.c | 1 -
 drivers/accel/ivpu/ivpu_pm.c  | 2 --
 2 files changed, 3 deletions(-)
drivers/accel/ivpu/ivpu_job.c +0 -1
index 060f1fc031d3..05a1a768e1c9 100644
@@ -1049,6 +1049,5 @@ void ivpu_context_abort_work_fn(struct work_struct *work)
 	mutex_unlock(&vdev->submitted_jobs_lock);
 
 runtime_put:
-	pm_runtime_mark_last_busy(vdev->drm.dev);
 	pm_runtime_put_autosuspend(vdev->drm.dev);
 }
drivers/accel/ivpu/ivpu_pm.c +0 -2
index eacda1dbe840..761b4d7e1a5a 100644
@@ -359,7 +359,6 @@ int ivpu_rpm_get(struct ivpu_device *vdev)
 
 void ivpu_rpm_put(struct ivpu_device *vdev)
 {
-	pm_runtime_mark_last_busy(vdev->drm.dev);
 	pm_runtime_put_autosuspend(vdev->drm.dev);
 }
 
@@ -428,7 +427,6 @@ void ivpu_pm_enable(struct ivpu_device *vdev)
 	struct device *dev = vdev->drm.dev;
 
 	pm_runtime_allow(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 }
 
Signature · 1 line
2.39.5
Reviewed-by on v1 1/80
#2 lore raw

Re: [PATCH 01/80] accel/ivpu: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 52 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/accel/ivpu/ivpu_job.c | 1 -
 drivers/accel/ivpu/ivpu_pm.c  | 2 --
 2 files changed, 3 deletions(-)
drivers/accel/ivpu/ivpu_job.c +0 -1
index 060f1fc031d3..05a1a768e1c9 100644
@@ -1049,6 +1049,5 @@ void ivpu_context_abort_work_fn(struct work_struct *work)
 	mutex_unlock(&vdev->submitted_jobs_lock);
 
 runtime_put:
-	pm_runtime_mark_last_busy(vdev->drm.dev);
 	pm_runtime_put_autosuspend(vdev->drm.dev);
 }
drivers/accel/ivpu/ivpu_pm.c +0 -2
index eacda1dbe840..761b4d7e1a5a 100644
@@ -359,7 +359,6 @@ int ivpu_rpm_get(struct ivpu_device *vdev)
 
 void ivpu_rpm_put(struct ivpu_device *vdev)
 {
-	pm_runtime_mark_last_busy(vdev->drm.dev);
 	pm_runtime_put_autosuspend(vdev->drm.dev);
 }
 
@@ -428,7 +427,6 @@ void ivpu_pm_enable(struct ivpu_device *vdev)
 	struct device *dev = vdev->drm.dev;
 
 	pm_runtime_allow(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 }
 
author maintainer
#3 lore raw

PATCH 2/80 accel/amdxdna: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/accel/amdxdna/amdxdna_pci_drv.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/accel/amdxdna/amdxdna_pci_drv.c +0 -3
index f2bf1d374cc7..c7083a657333 100644
@@ -101,7 +101,6 @@ static int amdxdna_drm_open(struct drm_device *ddev, struct drm_file *filp)
 failed:
 	kfree(client);
 put_rpm:
-	pm_runtime_mark_last_busy(ddev->dev);
 	pm_runtime_put_autosuspend(ddev->dev);
 
 	return ret;
@@ -125,7 +124,6 @@ static void amdxdna_drm_close(struct drm_device *ddev, struct drm_file *filp)
 
 	XDNA_DBG(xdna, "pid %d closed", client->pid);
 	kfree(client);
-	pm_runtime_mark_last_busy(ddev->dev);
 	pm_runtime_put_autosuspend(ddev->dev);
 }
 
@@ -296,7 +294,6 @@ static int amdxdna_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		goto failed_sysfs_fini;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return 0;
 
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 2/80
#4 lore raw

Re: [PATCH 02/80] accel/amdxdna: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 48 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                 pm-runtime-6.17-rc1
  drivers/accel/amdxdna/amdxdna_pci_drv.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/accel/amdxdna/amdxdna_pci_drv.c +0 -3
index f2bf1d374cc7..c7083a657333 100644
@@ -101,7 +101,6 @@ static int amdxdna_drm_open(struct drm_device *ddev, struct drm_file *filp)
  failed:
  	kfree(client);
  put_rpm:
-	pm_runtime_mark_last_busy(ddev->dev);
  	pm_runtime_put_autosuspend(ddev->dev);
 
  	return ret;
@@ -125,7 +124,6 @@ static void amdxdna_drm_close(struct drm_device *ddev, struct drm_file *filp)
 
  	XDNA_DBG(xdna, "pid %d closed", client->pid);
  	kfree(client);
-	pm_runtime_mark_last_busy(ddev->dev);
  	pm_runtime_put_autosuspend(ddev->dev);
  }
 
@@ -296,7 +294,6 @@ static int amdxdna_probe(struct pci_dev *pdev, const struct pci_device_id *id)
  		goto failed_sysfs_fini;
  	}
 
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
  	return 0;
 
author maintainer
#5 lore raw

PATCH 3/80 Bluetooth: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/bluetooth/btmtksdio.c | 1 -
 drivers/bluetooth/hci_bcm.c   | 3 ---
 drivers/bluetooth/hci_h5.c    | 2 --
 drivers/bluetooth/hci_intel.c | 3 ---
 4 files changed, 9 deletions(-)
drivers/bluetooth/btmtksdio.c +0 -1
index c16a3518b8ff..83aee551a848 100644
@@ -615,7 +615,6 @@ static void btmtksdio_txrx_work(struct work_struct *work)
 
 	sdio_release_host(bdev->func);
 
-	pm_runtime_mark_last_busy(bdev->dev);
 	pm_runtime_put_autosuspend(bdev->dev);
 }
 
drivers/bluetooth/hci_bcm.c +0 -3
index 9684eb16059b..08f9a232e375 100644
@@ -326,7 +326,6 @@ static irqreturn_t bcm_host_wake(int irq, void *data)
 	bt_dev_dbg(bdev, "Host wake IRQ");
 
 	pm_runtime_get(bdev->dev);
-	pm_runtime_mark_last_busy(bdev->dev);
 	pm_runtime_put_autosuspend(bdev->dev);
 
 	return IRQ_HANDLED;
@@ -710,7 +709,6 @@ static int bcm_recv(struct hci_uart *hu, const void *data, int count)
 		mutex_lock(&bcm_device_lock);
 		if (bcm->dev && bcm_device_exists(bcm->dev)) {
 			pm_runtime_get(bcm->dev->dev);
-			pm_runtime_mark_last_busy(bcm->dev->dev);
 			pm_runtime_put_autosuspend(bcm->dev->dev);
 		}
 		mutex_unlock(&bcm_device_lock);
@@ -749,7 +747,6 @@ static struct sk_buff *bcm_dequeue(struct hci_uart *hu)
 	skb = skb_dequeue(&bcm->txq);
 
 	if (bdev) {
-		pm_runtime_mark_last_busy(bdev->dev);
 		pm_runtime_put_autosuspend(bdev->dev);
 	}
 
drivers/bluetooth/hci_h5.c +0 -2
index d0d4420c1a0f..e932d66a1cc0 100644
@@ -592,7 +592,6 @@ static int h5_recv(struct hci_uart *hu, const void *data, int count)
 
 	if (hu->serdev) {
 		pm_runtime_get(&hu->serdev->dev);
-		pm_runtime_mark_last_busy(&hu->serdev->dev);
 		pm_runtime_put_autosuspend(&hu->serdev->dev);
 	}
 
@@ -634,7 +633,6 @@ static int h5_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 
 	if (hu->serdev) {
 		pm_runtime_get_sync(&hu->serdev->dev);
-		pm_runtime_mark_last_busy(&hu->serdev->dev);
 		pm_runtime_put_autosuspend(&hu->serdev->dev);
 	}
 
drivers/bluetooth/hci_intel.c +0 -3
index 811f33701f84..6240ee23e030 100644
@@ -280,7 +280,6 @@ static irqreturn_t intel_irq(int irq, void *dev_id)
 
 	/* Host/Controller are now LPM resumed, trigger a new delayed suspend */
 	pm_runtime_get(&idev->pdev->dev);
-	pm_runtime_mark_last_busy(&idev->pdev->dev);
 	pm_runtime_put_autosuspend(&idev->pdev->dev);
 
 	return IRQ_HANDLED;
@@ -371,7 +370,6 @@ static void intel_busy_work(struct work_struct *work)
 	list_for_each_entry(idev, &intel_device_list, list) {
 		if (intel->hu->tty->dev->parent == idev->pdev->dev.parent) {
 			pm_runtime_get(&idev->pdev->dev);
-			pm_runtime_mark_last_busy(&idev->pdev->dev);
 			pm_runtime_put_autosuspend(&idev->pdev->dev);
 			break;
 		}
@@ -1003,7 +1001,6 @@ static int intel_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 	list_for_each_entry(idev, &intel_device_list, list) {
 		if (hu->tty->dev->parent == idev->pdev->dev.parent) {
 			pm_runtime_get_sync(&idev->pdev->dev);
-			pm_runtime_mark_last_busy(&idev->pdev->dev);
 			pm_runtime_put_autosuspend(&idev->pdev->dev);
 			break;
 		}
Signature · 1 line
2.39.5
author maintainer
#6 lore raw

PATCH 4/80 bus: sunxi-rsb: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/bus/sunxi-rsb.c | 2 --
 1 file changed, 2 deletions(-)
drivers/bus/sunxi-rsb.c +0 -2
index 7a33c3b31d1e..82735c58be11 100644
@@ -373,7 +373,6 @@ static int sunxi_rsb_read(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
 unlock:
 	mutex_unlock(&rsb->lock);
 
-	pm_runtime_mark_last_busy(rsb->dev);
 	pm_runtime_put_autosuspend(rsb->dev);
 
 	return ret;
@@ -417,7 +416,6 @@ static int sunxi_rsb_write(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
 
 	mutex_unlock(&rsb->lock);
 
-	pm_runtime_mark_last_busy(rsb->dev);
 	pm_runtime_put_autosuspend(rsb->dev);
 
 	return ret;
Signature · 1 line
2.39.5
Acked-by on v1 4/80
#7 lore raw

Re: [PATCH 04/80] bus: sunxi-rsb: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Could this go through the PM tree?

Quoted 38 lines

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/bus/sunxi-rsb.c | 2 --
 1 file changed, 2 deletions(-)
drivers/bus/sunxi-rsb.c +0 -3
index 7a33c3b31d1e..82735c58be11 100644
@@ -373,7 +373,6 @@ static int sunxi_rsb_read(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
 unlock:
        mutex_unlock(&rsb->lock);
 
-       pm_runtime_mark_last_busy(rsb->dev);
        pm_runtime_put_autosuspend(rsb->dev);
 
        return ret;
@@ -417,7 +416,6 @@ static int sunxi_rsb_write(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
 
        mutex_unlock(&rsb->lock);
 
-       pm_runtime_mark_last_busy(rsb->dev);
        pm_runtime_put_autosuspend(rsb->dev);
 
        return ret;
--

2.39.5

author maintainer
#8 lore raw

PATCH 5/80 hwrng: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/char/hw_random/atmel-rng.c     | 1 -
 drivers/char/hw_random/cctrng.c        | 1 -
 drivers/char/hw_random/mtk-rng.c       | 1 -
 drivers/char/hw_random/npcm-rng.c      | 1 -
 drivers/char/hw_random/omap3-rom-rng.c | 1 -
 drivers/char/hw_random/rockchip-rng.c  | 3 ---
 drivers/char/hw_random/stm32-rng.c     | 1 -
 7 files changed, 9 deletions(-)
drivers/char/hw_random/atmel-rng.c +0 -1
index d2b00458761e..6ed24be3481d 100644
@@ -80,7 +80,6 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
 	ret = 4;
 
 out:
-	pm_runtime_mark_last_busy(trng->dev);
 	pm_runtime_put_sync_autosuspend(trng->dev);
 	return ret;
 }
drivers/char/hw_random/cctrng.c +0 -1
index 4db198849695..a5be9258037f 100644
@@ -98,7 +98,6 @@ static void cc_trng_pm_put_suspend(struct device *dev)
 {
 	int rc = 0;
 
-	pm_runtime_mark_last_busy(dev);
 	rc = pm_runtime_put_autosuspend(dev);
 	if (rc)
 		dev_err(dev, "pm_runtime_put_autosuspend returned %x\n", rc);
drivers/char/hw_random/mtk-rng.c +0 -1
index b7fa1bc1122b..c89171df7635 100644
@@ -98,7 +98,6 @@ static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 		max -= sizeof(u32);
 	}
 
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_sync_autosuspend(priv->dev);
 
 	return retval || !wait ? retval : -EIO;
drivers/char/hw_random/npcm-rng.c +0 -1
index 3e308c890bd2..40d6e29dea03 100644
@@ -80,7 +80,6 @@ static int npcm_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 		max--;
 	}
 
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_sync_autosuspend(priv->dev);
 
 	return retval || !wait ? retval : -EIO;
drivers/char/hw_random/omap3-rom-rng.c +0 -1
index 8064c792caf0..aa71f61c3dc9 100644
@@ -56,7 +56,6 @@ static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
 	else
 		r = 4;
 
-	pm_runtime_mark_last_busy(ddata->dev);
 	pm_runtime_put_autosuspend(ddata->dev);
 
 	return r;
drivers/char/hw_random/rockchip-rng.c +0 -3
index fb4a30b95507..6e3ed4b85605 100644
@@ -223,7 +223,6 @@ static int rk3568_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 	/* Read random data stored in the registers */
 	memcpy_fromio(buf, rk_rng->base + TRNG_RNG_DOUT, to_read);
 out:
-	pm_runtime_mark_last_busy(rk_rng->dev);
 	pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
 	return (ret < 0) ? ret : to_read;
@@ -263,7 +262,6 @@ static int rk3576_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 	memcpy_fromio(buf, rk_rng->base + RKRNG_TRNG_DATA0, to_read);
 
 out:
-	pm_runtime_mark_last_busy(rk_rng->dev);
 	pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
 	return (ret < 0) ? ret : to_read;
@@ -355,7 +353,6 @@ static int rk3588_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
 	/* close the TRNG */
 	rk_rng_writel(rk_rng, TRNG_V1_CTRL_NOP, TRNG_V1_CTRL);
 
-	pm_runtime_mark_last_busy(rk_rng->dev);
 	pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
 	return (ret < 0) ? ret : to_read;
drivers/char/hw_random/stm32-rng.c +0 -1
index 98edbe796bc5..9a8c00586ab0 100644
@@ -255,7 +255,6 @@ static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
 	}
 
 exit_rpm:
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_sync_autosuspend(priv->dev);
 
 	return retval || !wait ? retval : -EIO;
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 5/80
#9 lore raw

Re: [PATCH 05/80] hwrng: Remove redundant pm_runtime_mark_last_busy() calls

Il 04/07/25 09:53, Sakari Ailus ha scritto:

Quoted 6 lines

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

For MediaTek:

maintainer
#10 lore raw

Re: [PATCH 05/80] hwrng: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 17 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
Quoted 8 lines
 drivers/char/hw_random/atmel-rng.c     | 1 -
 drivers/char/hw_random/cctrng.c        | 1 -
 drivers/char/hw_random/mtk-rng.c       | 1 -
 drivers/char/hw_random/npcm-rng.c      | 1 -
 drivers/char/hw_random/omap3-rom-rng.c | 1 -
 drivers/char/hw_random/rockchip-rng.c  | 3 ---
 drivers/char/hw_random/stm32-rng.c     | 1 -
 7 files changed, 9 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
author maintainer
#11 lore raw

PATCH 6/80 clk: imx: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/clk/imx/clk-imx8qxp-lpcg.c | 1 -
 drivers/clk/imx/clk-scu.c          | 1 -
 2 files changed, 2 deletions(-)
drivers/clk/imx/clk-imx8qxp-lpcg.c +0 -1
index d0ccaa040225..1dae3410ee99 100644
@@ -267,7 +267,6 @@ static int imx_lpcg_parse_clks_from_dt(struct platform_device *pdev,
 	if (ret)
 		goto unreg;
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
drivers/clk/imx/clk-scu.c +0 -1
index b27186aaf2a1..0ef661608139 100644
@@ -567,7 +567,6 @@ static int imx_clk_scu_probe(struct platform_device *pdev)
 
 	if (!((clk->rsrc == IMX_SC_R_A35) || (clk->rsrc == IMX_SC_R_A53) ||
 	    (clk->rsrc == IMX_SC_R_A72))) {
-		pm_runtime_mark_last_busy(&pdev->dev);
 		pm_runtime_put_autosuspend(&pdev->dev);
 	}
 
Signature · 1 line
2.39.5
Reviewed-by on v1 6/80
#12 lore raw

Re: [PATCH 06/80] clk: imx: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

maintainer Applied
#13 lore raw

Re: [PATCH 06/80] clk: imx: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

Quoting Sakari Ailus (2025-07-04 00:54:00)

Quoted 7 lines

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---

Applied to clk-next

author maintainer
#14 lore raw

PATCH 7/80 clk: qcom: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/clk/qcom/lpassaudiocc-sc7280.c | 2 --
 drivers/clk/qcom/lpasscorecc-sc7180.c  | 2 --
 2 files changed, 4 deletions(-)
drivers/clk/qcom/lpassaudiocc-sc7280.c +0 -2
index 22169da08a51..3ff123bffa11 100644
@@ -799,7 +799,6 @@ static int lpass_audio_cc_sc7280_probe(struct platform_device *pdev)
 		goto exit;
 	}
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 exit:
 	pm_runtime_put_autosuspend(&pdev->dev);
 
@@ -868,7 +867,6 @@ static int lpass_aon_cc_sc7280_probe(struct platform_device *pdev)
 		goto exit;
 	}
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 exit:
 	pm_runtime_put_autosuspend(&pdev->dev);
 
drivers/clk/qcom/lpasscorecc-sc7180.c +0 -2
index 605516d03993..5937b071533b 100644
@@ -412,7 +412,6 @@ static int lpass_core_cc_sc7180_probe(struct platform_device *pdev)
 
 	ret = qcom_cc_really_probe(&pdev->dev, &lpass_core_cc_sc7180_desc, regmap);
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 exit:
 	pm_runtime_put_autosuspend(&pdev->dev);
 
@@ -433,7 +432,6 @@ static int lpass_hm_core_probe(struct platform_device *pdev)
 
 	ret = qcom_cc_probe_by_index(pdev, 0, desc);
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return ret;
Signature · 1 line
2.39.5
maintainer Applied
#15 lore raw

Re: [PATCH 07/80] clk: qcom: Remove redundant pm_runtime_mark_last_busy() calls

Quoting Sakari Ailus (2025-07-04 00:54:01)

Quoted 7 lines

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---

Applied to clk-next

author maintainer
#16 lore raw

PATCH 8/80 crypto: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/crypto/ccree/cc_pm.c      | 1 -
 drivers/crypto/hisilicon/qm.c     | 1 -
 drivers/crypto/omap-aes-gcm.c     | 1 -
 drivers/crypto/omap-aes.c         | 1 -
 drivers/crypto/omap-des.c         | 1 -
 drivers/crypto/omap-sham.c        | 1 -
 drivers/crypto/stm32/stm32-cryp.c | 1 -
 drivers/crypto/stm32/stm32-hash.c | 1 -
 8 files changed, 8 deletions(-)
drivers/crypto/ccree/cc_pm.c +0 -1
index 6124fbbbed94..bbd118f8de0e 100644
@@ -77,6 +77,5 @@ int cc_pm_get(struct device *dev)
 
 void cc_pm_put_suspend(struct device *dev)
 {
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 }
drivers/crypto/hisilicon/qm.c +0 -1
index 7c41f9593d03..2e4ee7ecfdfb 100644
@@ -912,7 +912,6 @@ static void qm_pm_put_sync(struct hisi_qm *qm)
 	if (!test_bit(QM_SUPPORT_RPM, &qm->caps))
 		return;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 }
 
drivers/crypto/omap-aes-gcm.c +0 -1
index c498950402e8..1f4586509ca4 100644
@@ -38,7 +38,6 @@ static void omap_aes_gcm_finish_req(struct omap_aes_dev *dd, int ret)
 
 	crypto_finalize_aead_request(dd->engine, req, ret);
 
-	pm_runtime_mark_last_busy(dd->dev);
 	pm_runtime_put_autosuspend(dd->dev);
 }
 
drivers/crypto/omap-aes.c +0 -1
index 1ecf5f6ac04e..244e24e52987 100644
@@ -400,7 +400,6 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err)
 
 	crypto_finalize_skcipher_request(dd->engine, req, err);
 
-	pm_runtime_mark_last_busy(dd->dev);
 	pm_runtime_put_autosuspend(dd->dev);
 }
 
drivers/crypto/omap-des.c +0 -1
index a099460d5f21..9c5538ae17db 100644
@@ -489,7 +489,6 @@ static void omap_des_finish_req(struct omap_des_dev *dd, int err)
 
 	crypto_finalize_skcipher_request(dd->engine, req, err);
 
-	pm_runtime_mark_last_busy(dd->dev);
 	pm_runtime_put_autosuspend(dd->dev);
 }
 
drivers/crypto/omap-sham.c +0 -1
index 56f192cb976d..6328e8026b91 100644
@@ -1167,7 +1167,6 @@ static void omap_sham_finish_req(struct ahash_request *req, int err)
 	dd->flags &= ~(BIT(FLAGS_FINAL) | BIT(FLAGS_CPU) |
 			BIT(FLAGS_DMA_READY) | BIT(FLAGS_OUTPUT_READY));
 
-	pm_runtime_mark_last_busy(dd->dev);
 	pm_runtime_put_autosuspend(dd->dev);
 
 	ctx->offset = 0;
drivers/crypto/stm32/stm32-cryp.c +0 -1
index 5ce88e7a8f65..a89b4c5d62a0 100644
@@ -851,7 +851,6 @@ static void stm32_cryp_finish_req(struct stm32_cryp *cryp, int err)
 	if (!err && (!(is_gcm(cryp) || is_ccm(cryp) || is_ecb(cryp))))
 		stm32_cryp_get_iv(cryp);
 
-	pm_runtime_mark_last_busy(cryp->dev);
 	pm_runtime_put_autosuspend(cryp->dev);
 
 	if (is_gcm(cryp) || is_ccm(cryp))
drivers/crypto/stm32/stm32-hash.c +0 -1
index 768b27de4737..a4436728b0db 100644
@@ -1373,7 +1373,6 @@ static void stm32_hash_unprepare_request(struct ahash_request *req)
 		*preg++ = stm32_hash_read(hdev, HASH_CSR(i));
 
 pm_runtime:
-	pm_runtime_mark_last_busy(hdev->dev);
 	pm_runtime_put_autosuspend(hdev->dev);
 }
 
Signature · 1 line
2.39.5
maintainer
#17 lore raw

Re: [PATCH 08/80] crypto: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 17 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
Quoted 9 lines
 drivers/crypto/ccree/cc_pm.c      | 1 -
 drivers/crypto/hisilicon/qm.c     | 1 -
 drivers/crypto/omap-aes-gcm.c     | 1 -
 drivers/crypto/omap-aes.c         | 1 -
 drivers/crypto/omap-des.c         | 1 -
 drivers/crypto/omap-sham.c        | 1 -
 drivers/crypto/stm32/stm32-cryp.c | 1 -
 drivers/crypto/stm32/stm32-hash.c | 1 -
 8 files changed, 8 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
author maintainer
#18 lore raw

PATCH 9/80 dmaengine: at_xdmac: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/dma/at_xdmac.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/dma/at_xdmac.c +0 -11
index 3fbc74710a13..ada96d490847 100644
@@ -379,7 +379,6 @@ static void at_xdmac_runtime_suspend_descriptors(struct at_xdmac_chan *atchan)
 		if (!desc->active_xfer)
 			continue;
 
-		pm_runtime_mark_last_busy(atxdmac->dev);
 		pm_runtime_put_autosuspend(atxdmac->dev);
 	}
 }
@@ -413,7 +412,6 @@ static bool at_xdmac_chan_is_enabled(struct at_xdmac_chan *atchan)
 
 	ret = !!(at_xdmac_chan_read(atchan, AT_XDMAC_GS) & atchan->mask);
 
-	pm_runtime_mark_last_busy(atxdmac->dev);
 	pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return ret;
@@ -446,7 +444,6 @@ static void at_xdmac_off(struct at_xdmac *atxdmac, bool suspend_descriptors)
 		}
 	}
 
-	pm_runtime_mark_last_busy(atxdmac->dev);
 	pm_runtime_put_autosuspend(atxdmac->dev);
 }
 
@@ -1676,7 +1673,6 @@ at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
 
 spin_unlock:
 	spin_unlock_irqrestore(&atchan->lock, flags);
-	pm_runtime_mark_last_busy(atxdmac->dev);
 	pm_runtime_put_autosuspend(atxdmac->dev);
 	return ret;
 }
@@ -1758,7 +1754,6 @@ static void at_xdmac_handle_error(struct at_xdmac_chan *atchan)
 		__func__, &bad_desc->lld.mbr_sa, &bad_desc->lld.mbr_da,
 		bad_desc->lld.mbr_ubc);
 
-	pm_runtime_mark_last_busy(atxdmac->dev);
 	pm_runtime_put_autosuspend(atxdmac->dev);
 
 	/* Then continue with usual descriptor management */
@@ -1822,7 +1817,6 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
 	 * Decrement runtime PM ref counter incremented in
 	 * at_xdmac_start_xfer().
 	 */
-	pm_runtime_mark_last_busy(atxdmac->dev);
 	pm_runtime_put_autosuspend(atxdmac->dev);
 }
 
@@ -1954,7 +1948,6 @@ static int at_xdmac_device_pause(struct dma_chan *chan)
 
 	spin_unlock_irqrestore(&atchan->lock, flags);
 
-	pm_runtime_mark_last_busy(atxdmac->dev);
 	pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return 0;
@@ -1998,7 +1991,6 @@ static int at_xdmac_device_resume(struct dma_chan *chan)
 
 unlock:
 	spin_unlock_irqrestore(&atchan->lock, flags);
-	pm_runtime_mark_last_busy(atxdmac->dev);
 	pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return ret;
@@ -2041,7 +2033,6 @@ static int at_xdmac_device_terminate_all(struct dma_chan *chan)
 	clear_bit(AT_XDMAC_CHAN_IS_CYCLIC, &atchan->status);
 	spin_unlock_irqrestore(&atchan->lock, flags);
 
-	pm_runtime_mark_last_busy(atxdmac->dev);
 	pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return 0;
@@ -2235,7 +2226,6 @@ static int __maybe_unused atmel_xdmac_resume(struct device *dev)
 		}
 	}
 
-	pm_runtime_mark_last_busy(atxdmac->dev);
 	pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return 0;
@@ -2412,7 +2402,6 @@ static int at_xdmac_probe(struct platform_device *pdev)
 
 	at_xdmac_axi_config(pdev);
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
Signature · 1 line
2.39.5
author maintainer
#19 lore raw

PATCH 10/80 dmaengine: pl330: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/dma/pl330.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/dma/pl330.c +0 -5
index 82a9fe88ad54..472cb6fe126d 100644
@@ -2134,7 +2134,6 @@ static void pl330_tasklet(struct tasklet_struct *t)
 
 	/* If work list empty, power down */
 	if (power_down) {
-		pm_runtime_mark_last_busy(pch->dmac->ddma.dev);
 		pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
 	}
 }
@@ -2313,7 +2312,6 @@ static int pl330_terminate_all(struct dma_chan *chan)
 	list_splice_tail_init(&pch->work_list, &pl330->desc_pool);
 	list_splice_tail_init(&pch->completed_list, &pl330->desc_pool);
 	spin_unlock_irqrestore(&pch->lock, flags);
-	pm_runtime_mark_last_busy(pl330->ddma.dev);
 	if (power_down)
 		pm_runtime_put_autosuspend(pl330->ddma.dev);
 	pm_runtime_put_autosuspend(pl330->ddma.dev);
@@ -2347,7 +2345,6 @@ static int pl330_pause(struct dma_chan *chan)
 			desc->status = PAUSED;
 	}
 	spin_unlock_irqrestore(&pch->lock, flags);
-	pm_runtime_mark_last_busy(pl330->ddma.dev);
 	pm_runtime_put_autosuspend(pl330->ddma.dev);
 
 	return 0;
@@ -2371,7 +2368,6 @@ static void pl330_free_chan_resources(struct dma_chan *chan)
 		list_splice_tail_init(&pch->work_list, &pch->dmac->desc_pool);
 
 	spin_unlock_irqrestore(&pl330->lock, flags);
-	pm_runtime_mark_last_busy(pch->dmac->ddma.dev);
 	pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
 	pl330_unprep_slave_fifo(pch);
 }
@@ -3176,7 +3172,6 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
 	pm_runtime_irq_safe(&adev->dev);
 	pm_runtime_use_autosuspend(&adev->dev);
 	pm_runtime_set_autosuspend_delay(&adev->dev, PL330_AUTOSUSPEND_DELAY);
-	pm_runtime_mark_last_busy(&adev->dev);
 	pm_runtime_put_autosuspend(&adev->dev);
 
 	return 0;
Signature · 1 line
2.39.5
author maintainer
#20 lore raw

PATCH 11/80 dmaengine: qcom: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/dma/qcom/bam_dma.c    | 5 -----
 drivers/dma/qcom/hidma.c      | 9 ---------
 drivers/dma/qcom/hidma_dbg.c  | 1 -
 drivers/dma/qcom/hidma_mgmt.c | 2 --
 4 files changed, 17 deletions(-)
drivers/dma/qcom/bam_dma.c +0 -5
index bbc3276992bb..e6f642e8c731 100644
@@ -608,7 +608,6 @@ static void bam_free_chan(struct dma_chan *chan)
 	}
 
 err:
-	pm_runtime_mark_last_busy(bdev->dev);
 	pm_runtime_put_autosuspend(bdev->dev);
 }
 
@@ -784,7 +783,6 @@ static int bam_pause(struct dma_chan *chan)
 	writel_relaxed(1, bam_addr(bdev, bchan->id, BAM_P_HALT));
 	bchan->paused = 1;
 	spin_unlock_irqrestore(&bchan->vc.lock, flag);
-	pm_runtime_mark_last_busy(bdev->dev);
 	pm_runtime_put_autosuspend(bdev->dev);
 
 	return 0;
@@ -810,7 +808,6 @@ static int bam_resume(struct dma_chan *chan)
 	writel_relaxed(0, bam_addr(bdev, bchan->id, BAM_P_HALT));
 	bchan->paused = 0;
 	spin_unlock_irqrestore(&bchan->vc.lock, flag);
-	pm_runtime_mark_last_busy(bdev->dev);
 	pm_runtime_put_autosuspend(bdev->dev);
 
 	return 0;
@@ -927,7 +924,6 @@ static irqreturn_t bam_dma_irq(int irq, void *data)
 		writel_relaxed(clr_mask, bam_addr(bdev, 0, BAM_IRQ_CLR));
 	}
 
-	pm_runtime_mark_last_busy(bdev->dev);
 	pm_runtime_put_autosuspend(bdev->dev);
 
 	return IRQ_HANDLED;
@@ -1102,7 +1098,6 @@ static void bam_start_dma(struct bam_chan *bchan)
 	writel_relaxed(bchan->tail * sizeof(struct bam_desc_hw),
 			bam_addr(bdev, bchan->id, BAM_P_EVNT_REG));
 
-	pm_runtime_mark_last_busy(bdev->dev);
 	pm_runtime_put_autosuspend(bdev->dev);
 }
 
drivers/dma/qcom/hidma.c +0 -9
index c2b3e4452e71..ded27a674e5f 100644
@@ -185,7 +185,6 @@ static void hidma_callback(void *data)
 	hidma_process_completed(mchan);
 
 	if (queued) {
-		pm_runtime_mark_last_busy(dmadev->ddev.dev);
 		pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	}
 }
@@ -316,11 +315,9 @@ static dma_cookie_t hidma_tx_submit(struct dma_async_tx_descriptor *txd)
 
 	pm_runtime_get_sync(dmadev->ddev.dev);
 	if (!hidma_ll_isenabled(dmadev->lldev)) {
-		pm_runtime_mark_last_busy(dmadev->ddev.dev);
 		pm_runtime_put_autosuspend(dmadev->ddev.dev);
 		return -ENODEV;
 	}
-	pm_runtime_mark_last_busy(dmadev->ddev.dev);
 	pm_runtime_put_autosuspend(dmadev->ddev.dev);
 
 	mdesc = container_of(txd, struct hidma_desc, desc);
@@ -507,7 +504,6 @@ static int hidma_terminate_channel(struct dma_chan *chan)
 
 	rc = hidma_ll_enable(dmadev->lldev);
 out:
-	pm_runtime_mark_last_busy(dmadev->ddev.dev);
 	pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return rc;
 }
@@ -525,7 +521,6 @@ static int hidma_terminate_all(struct dma_chan *chan)
 	/* reinitialize the hardware */
 	pm_runtime_get_sync(dmadev->ddev.dev);
 	rc = hidma_ll_setup(dmadev->lldev);
-	pm_runtime_mark_last_busy(dmadev->ddev.dev);
 	pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return rc;
 }
@@ -569,7 +564,6 @@ static int hidma_pause(struct dma_chan *chan)
 		if (hidma_ll_disable(dmadev->lldev))
 			dev_warn(dmadev->ddev.dev, "channel did not stop\n");
 		mchan->paused = true;
-		pm_runtime_mark_last_busy(dmadev->ddev.dev);
 		pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	}
 	return 0;
@@ -591,7 +585,6 @@ static int hidma_resume(struct dma_chan *chan)
 		else
 			dev_err(dmadev->ddev.dev,
 				"failed to resume the channel");
-		pm_runtime_mark_last_busy(dmadev->ddev.dev);
 		pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	}
 	return rc;
@@ -882,7 +875,6 @@ static int hidma_probe(struct platform_device *pdev)
 	hidma_debug_init(dmadev);
 	hidma_sysfs_init(dmadev);
 	dev_info(&pdev->dev, "HI-DMA engine driver registration complete\n");
-	pm_runtime_mark_last_busy(dmadev->ddev.dev);
 	pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return 0;
 
@@ -909,7 +901,6 @@ static void hidma_shutdown(struct platform_device *pdev)
 	pm_runtime_get_sync(dmadev->ddev.dev);
 	if (hidma_ll_disable(dmadev->lldev))
 		dev_warn(dmadev->ddev.dev, "channel did not stop\n");
-	pm_runtime_mark_last_busy(dmadev->ddev.dev);
 	pm_runtime_put_autosuspend(dmadev->ddev.dev);
 
 }
drivers/dma/qcom/hidma_dbg.c +0 -1
index ce87c7937a0e..7d7594da084c 100644
@@ -103,7 +103,6 @@ static int hidma_chan_show(struct seq_file *s, void *unused)
 		hidma_ll_chstats(s, mchan->dmadev->lldev, mdesc->tre_ch);
 
 	hidma_ll_devstats(s, mchan->dmadev->lldev);
-	pm_runtime_mark_last_busy(dmadev->ddev.dev);
 	pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return 0;
 }
drivers/dma/qcom/hidma_mgmt.c +0 -2
index 4805ce390ffa..8442082bde23 100644
@@ -150,7 +150,6 @@ int hidma_mgmt_setup(struct hidma_mgmt_dev *mgmtdev)
 	val |= mgmtdev->chreset_timeout_cycles & HIDMA_CHRESET_TIMEOUT_MASK;
 	writel(val, mgmtdev->virtaddr + HIDMA_CHRESET_TIMEOUT_OFFSET);
 
-	pm_runtime_mark_last_busy(&mgmtdev->pdev->dev);
 	pm_runtime_put_autosuspend(&mgmtdev->pdev->dev);
 	return 0;
 }
@@ -305,7 +304,6 @@ static int hidma_mgmt_probe(struct platform_device *pdev)
 		 &res->start, mgmtdev->dma_channels);
 
 	platform_set_drvdata(pdev, mgmtdev);
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 	return 0;
 out:
Signature · 1 line
2.39.5
author maintainer
#21 lore raw

PATCH 12/80 dmaengine: ste_dma40: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/dma/ste_dma40.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/dma/ste_dma40.c +0 -8
index d52e1685aed5..13d91d369be2 100644
@@ -1452,7 +1452,6 @@ static int d40_pause(struct dma_chan *chan)
 
 	res = d40_channel_execute_command(d40c, D40_DMA_SUSPEND_REQ);
 
-	pm_runtime_mark_last_busy(d40c->base->dev);
 	pm_runtime_put_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return res;
@@ -1479,7 +1478,6 @@ static int d40_resume(struct dma_chan *chan)
 	if (d40_residue(d40c) || d40_tx_is_linked(d40c))
 		res = d40_channel_execute_command(d40c, D40_DMA_RUN);
 
-	pm_runtime_mark_last_busy(d40c->base->dev);
 	pm_runtime_put_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return res;
@@ -1581,7 +1579,6 @@ static void dma_tc_handle(struct d40_chan *d40c)
 		if (d40_queue_start(d40c) == NULL) {
 			d40c->busy = false;
 
-			pm_runtime_mark_last_busy(d40c->base->dev);
 			pm_runtime_put_autosuspend(d40c->base->dev);
 		}
 
@@ -2055,7 +2052,6 @@ static int d40_free_dma(struct d40_chan *d40c)
 		d40c->base->lookup_phy_chans[phy->num] = NULL;
 
 	if (d40c->busy) {
-		pm_runtime_mark_last_busy(d40c->base->dev);
 		pm_runtime_put_autosuspend(d40c->base->dev);
 	}
 
@@ -2063,7 +2059,6 @@ static int d40_free_dma(struct d40_chan *d40c)
 	d40c->phy_chan = NULL;
 	d40c->configured = false;
  mark_last_busy:
-	pm_runtime_mark_last_busy(d40c->base->dev);
 	pm_runtime_put_autosuspend(d40c->base->dev);
 	return res;
 }
@@ -2466,7 +2461,6 @@ static int d40_alloc_chan_resources(struct dma_chan *chan)
 	if (is_free_phy)
 		d40_config_write(d40c);
  mark_last_busy:
-	pm_runtime_mark_last_busy(d40c->base->dev);
 	pm_runtime_put_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return err;
@@ -2618,10 +2612,8 @@ static int d40_terminate_all(struct dma_chan *chan)
 		chan_err(d40c, "Failed to stop channel\n");
 
 	d40_term_all(d40c);
-	pm_runtime_mark_last_busy(d40c->base->dev);
 	pm_runtime_put_autosuspend(d40c->base->dev);
 	if (d40c->busy) {
-		pm_runtime_mark_last_busy(d40c->base->dev);
 		pm_runtime_put_autosuspend(d40c->base->dev);
 	}
 	d40c->busy = false;
Signature · 1 line
2.39.5
Reviewed-by on v1 12/80
#22 lore raw

Re: [PATCH 12/80] dmaengine: ste_dma40: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Yours,
Linus Walleij

author maintainer
#23 lore raw

PATCH 13/80 dmaengine: ti: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/dma/ti/cppi41.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/dma/ti/cppi41.c +0 -5
index 8d8c3d6038fc..88756dccd62c 100644
@@ -390,7 +390,6 @@ static int cppi41_dma_alloc_chan_resources(struct dma_chan *chan)
 	if (!c->is_tx)
 		cppi_writel(c->q_num, c->gcr_reg + RXHPCRA0);
 
-	pm_runtime_mark_last_busy(cdd->ddev.dev);
 	pm_runtime_put_autosuspend(cdd->ddev.dev);
 
 	return 0;
@@ -411,7 +410,6 @@ static void cppi41_dma_free_chan_resources(struct dma_chan *chan)
 
 	WARN_ON(!list_empty(&cdd->pending));
 
-	pm_runtime_mark_last_busy(cdd->ddev.dev);
 	pm_runtime_put_autosuspend(cdd->ddev.dev);
 }
 
@@ -509,7 +507,6 @@ static void cppi41_dma_issue_pending(struct dma_chan *chan)
 		cppi41_run_queue(cdd);
 	spin_unlock_irqrestore(&cdd->lock, flags);
 
-	pm_runtime_mark_last_busy(cdd->ddev.dev);
 	pm_runtime_put_autosuspend(cdd->ddev.dev);
 }
 
@@ -627,7 +624,6 @@ static struct dma_async_tx_descriptor *cppi41_dma_prep_slave_sg(
 	txd = &c->txd;
 
 err_out_not_ready:
-	pm_runtime_mark_last_busy(cdd->ddev.dev);
 	pm_runtime_put_autosuspend(cdd->ddev.dev);
 
 	return txd;
@@ -1139,7 +1135,6 @@ static int cppi41_dma_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_of;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
Signature · 1 line
2.39.5
author maintainer
#24 lore raw

PATCH 14/80 dmaengine: zynqmp_dma: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/dma/xilinx/zynqmp_dma.c | 2 --
 1 file changed, 2 deletions(-)
drivers/dma/xilinx/zynqmp_dma.c +0 -2
index d05fc5fcc77d..1e2b9f37fd40 100644
@@ -695,7 +695,6 @@ static void zynqmp_dma_free_chan_resources(struct dma_chan *dchan)
 		(2 * ZYNQMP_DMA_DESC_SIZE(chan) * ZYNQMP_DMA_NUM_DESCS),
 		chan->desc_pool_v, chan->desc_pool_p);
 	kfree(chan->sw_desc_pool);
-	pm_runtime_mark_last_busy(chan->dev);
 	pm_runtime_put_autosuspend(chan->dev);
 }
 
@@ -1145,7 +1144,6 @@ static int zynqmp_dma_probe(struct platform_device *pdev)
 		goto free_chan_resources;
 	}
 
-	pm_runtime_mark_last_busy(zdev->dev);
 	pm_runtime_put_sync_autosuspend(zdev->dev);
 
 	return 0;
Signature · 1 line
2.39.5
author maintainer
#25 lore raw

PATCH 15/80 gpio: arizona: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/gpio/gpio-arizona.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-arizona.c +0 -2
index e530c94dcce8..89ffde693019 100644
@@ -39,7 +39,6 @@ static int arizona_gpio_direction_in(struct gpio_chip *chip, unsigned offset)
 		return ret;
 
 	if (change && persistent) {
-		pm_runtime_mark_last_busy(chip->parent);
 		pm_runtime_put_autosuspend(chip->parent);
 	}
 
@@ -82,7 +81,6 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
 			return ret;
 		}
 
-		pm_runtime_mark_last_busy(chip->parent);
 		pm_runtime_put_autosuspend(chip->parent);
 	}
 
Signature · 1 line
2.39.5
Reviewed-by on v1 15/80
#26 lore raw

Re: [PATCH 15/80] gpio: arizona: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---

Thanks,
Charles

author maintainer
#27 lore raw

PATCH 16/80 drm/amd: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |  1 -
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  4 ---
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 25 -------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  4 ---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |  1 -
 .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c     |  1 -
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |  1 -
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            |  1 -
 14 files changed, 47 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +0 -1
index f5466c592d94..9e4f135b9173 100644
@@ -507,7 +507,6 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev,
 				pm_runtime_get_sync(adev_to_drm(adev)->dev);
 				/* Just fire off a uevent and let userspace tell us what to do */
 				drm_helper_hpd_irq_event(adev_to_drm(adev));
-				pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 				pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 			}
 		}
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +0 -4
index 5e375e9c4f5d..7220ecb93ff7 100644
@@ -738,7 +738,6 @@ amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force)
 	amdgpu_connector_update_scratch_regs(connector, ret);
 
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
@@ -923,7 +922,6 @@ amdgpu_connector_vga_detect(struct drm_connector *connector, bool force)
 
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
@@ -1150,7 +1148,6 @@ amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force)
 
 exit:
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
@@ -1450,7 +1447,6 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force)
 	amdgpu_connector_update_scratch_regs(connector, ret);
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +0 -25
index 83f211903425..2c724e8354de 100644
@@ -129,7 +129,6 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
 	if (use_bank) {
 		if ((sh_bank != 0xFFFFFFFF && sh_bank >= adev->gfx.config.max_sh_per_se) ||
 		    (se_bank != 0xFFFFFFFF && se_bank >= adev->gfx.config.max_shader_engines)) {
-			pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 			pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 			amdgpu_virt_disable_access_debugfs(adev);
 			return -EINVAL;
@@ -179,7 +178,6 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
 	if (pm_pg_lock)
 		mutex_unlock(&adev->pm.mutex);
 
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	amdgpu_virt_disable_access_debugfs(adev);
@@ -255,7 +253,6 @@ static ssize_t amdgpu_debugfs_regs2_op(struct file *f, char __user *buf, u32 off
 	if (rd->id.use_grbm) {
 		if ((rd->id.grbm.sh != 0xFFFFFFFF && rd->id.grbm.sh >= adev->gfx.config.max_sh_per_se) ||
 		    (rd->id.grbm.se != 0xFFFFFFFF && rd->id.grbm.se >= adev->gfx.config.max_shader_engines)) {
-			pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 			pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 			amdgpu_virt_disable_access_debugfs(adev);
 			mutex_unlock(&rd->lock);
@@ -310,7 +307,6 @@ static ssize_t amdgpu_debugfs_regs2_op(struct file *f, char __user *buf, u32 off
 
 	mutex_unlock(&rd->lock);
 
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	amdgpu_virt_disable_access_debugfs(adev);
@@ -446,7 +442,6 @@ static ssize_t amdgpu_debugfs_gprwave_read(struct file *f, char __user *buf, siz
 	amdgpu_gfx_select_se_sh(adev, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, rd->id.xcc_id);
 	mutex_unlock(&adev->grbm_idx_mutex);
 
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (!x) {
@@ -557,7 +552,6 @@ static ssize_t amdgpu_debugfs_regs_pcie_read(struct file *f, char __user *buf,
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -617,7 +611,6 @@ static ssize_t amdgpu_debugfs_regs_pcie_write(struct file *f, const char __user
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -676,7 +669,6 @@ static ssize_t amdgpu_debugfs_regs_didt_read(struct file *f, char __user *buf,
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -736,7 +728,6 @@ static ssize_t amdgpu_debugfs_regs_didt_write(struct file *f, const char __user
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -795,7 +786,6 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf,
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -855,7 +845,6 @@ static ssize_t amdgpu_debugfs_regs_smc_write(struct file *f, const char __user *
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	amdgpu_virt_disable_access_debugfs(adev);
 	return r;
@@ -1003,7 +992,6 @@ static ssize_t amdgpu_debugfs_sensor_read(struct file *f, char __user *buf,
 
 	r = amdgpu_dpm_read_sensor(adev, idx, &values[0], &valuesize);
 
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (r) {
@@ -1094,7 +1082,6 @@ static ssize_t amdgpu_debugfs_wave_read(struct file *f, char __user *buf,
 	amdgpu_gfx_select_se_sh(adev, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0);
 	mutex_unlock(&adev->grbm_idx_mutex);
 
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	if (!x) {
@@ -1192,7 +1179,6 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf,
 	amdgpu_gfx_select_se_sh(adev, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0);
 	mutex_unlock(&adev->grbm_idx_mutex);
 
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	while (size) {
@@ -1266,7 +1252,6 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_read(struct file *f, char __user
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
@@ -1315,7 +1300,6 @@ static ssize_t amdgpu_debugfs_gfxoff_residency_write(struct file *f, const char
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
@@ -1365,7 +1349,6 @@ static ssize_t amdgpu_debugfs_gfxoff_count_read(struct file *f, char __user *buf
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
@@ -1414,7 +1397,6 @@ static ssize_t amdgpu_debugfs_gfxoff_write(struct file *f, const char __user *bu
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
@@ -1460,7 +1442,6 @@ static ssize_t amdgpu_debugfs_gfxoff_read(struct file *f, char __user *buf,
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
@@ -1501,7 +1482,6 @@ static ssize_t amdgpu_debugfs_gfxoff_status_read(struct file *f, char __user *bu
 
 	r = result;
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
@@ -1701,7 +1681,6 @@ static int amdgpu_debugfs_test_ib_show(struct seq_file *m, void *unused)
 
 	up_write(&adev->reset_domain->sem);
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
@@ -1721,7 +1700,6 @@ static int amdgpu_debugfs_evict_vram(void *data, u64 *val)
 
 	*val = amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM);
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
@@ -1742,7 +1720,6 @@ static int amdgpu_debugfs_evict_gtt(void *data, u64 *val)
 
 	*val = amdgpu_ttm_evict_resources(adev, TTM_PL_TT);
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
@@ -1762,7 +1739,6 @@ static int amdgpu_debugfs_benchmark(void *data, u64 val)
 
 	r = amdgpu_benchmark(adev, val);
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return r;
@@ -2014,7 +1990,6 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 val)
 		ret = -EINVAL;
 
 out:
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return ret;
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -2
index 9e463d3ee927..d5844fee7204 100644
@@ -332,8 +332,6 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
 		if (crtc->enabled)
 			active = true;
 
-	pm_runtime_mark_last_busy(dev->dev);
-
 	adev = drm_to_adev(dev);
 	/* if we have active crtcs and we don't have a power ref,
 	 * take the current one
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -4
index b299e15bb5e5..24edb5a327c2 100644
@@ -2228,7 +2228,6 @@ static void amdgpu_get_secondary_funcs(struct amdgpu_device *adev)
 						adev->pdev->bus->number, i);
 		if (p) {
 			pm_runtime_get_sync(&p->dev);
-			pm_runtime_mark_last_busy(&p->dev);
 			pm_runtime_put_autosuspend(&p->dev);
 			pci_dev_put(p);
 		}
@@ -2469,7 +2468,6 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
 
 		pm_runtime_allow(ddev->dev);
 
-		pm_runtime_mark_last_busy(ddev->dev);
 		pm_runtime_put_autosuspend(ddev->dev);
 
 		pci_wake_from_d3(pdev, TRUE);
@@ -2907,7 +2905,6 @@ static int amdgpu_pmops_runtime_idle(struct device *dev)
 
 	ret = amdgpu_runtime_idle_check_userq(dev);
 done:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_autosuspend(dev);
 	return ret;
 }
@@ -2926,7 +2923,6 @@ long amdgpu_drm_ioctl(struct file *filp,
 
 	ret = drm_ioctl(filp, cmd, arg);
 
-	pm_runtime_mark_last_busy(dev->dev);
 out:
 	pm_runtime_put_autosuspend(dev->dev);
 	return ret;
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +0 -2
index 2c3547f4cea4..5e52ac2f9206 100644
@@ -267,7 +267,6 @@ bool amdgpu_fence_process(struct amdgpu_ring *ring)
 
 		dma_fence_signal(fence);
 		dma_fence_put(fence);
-		pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	} while (last_seq != seq);
 
@@ -920,7 +919,6 @@ static int gpu_recover_get(void *data, u64 *val)
 
 	*val = atomic_read(&adev->reset_domain->reset_res);
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +0 -1
index c80c8f543532..c922e141f4c6 100644
@@ -1594,7 +1594,6 @@ static ssize_t amdgpu_gfx_set_run_cleaner_shader(struct device *dev,
 
 	ret = amdgpu_gfx_run_cleaner_shader(adev, value);
 
-	pm_runtime_mark_last_busy(ddev->dev);
 	pm_runtime_put_autosuspend(ddev->dev);
 
 	if (ret)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0 -2
index 195ed81d39ff..c7233f30a29f 100644
@@ -1450,7 +1450,6 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 	kfree(fpriv);
 
 out_suspend:
-	pm_runtime_mark_last_busy(dev->dev);
 pm_put:
 	pm_runtime_put_autosuspend(dev->dev);
 
@@ -1521,7 +1520,6 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
 	kfree(fpriv);
 	file_priv->driver_priv = NULL;
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 }
 
drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c +0 -1
index 123bcf5c2bb1..bacf888735db 100644
@@ -101,7 +101,6 @@ static ssize_t amdgpu_rap_debugfs_write(struct file *f, const char __user *buf,
 	}
 
 	amdgpu_gfx_off_ctrl(adev, true);
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return size;
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -1
index dd37d8815ba5..258acce7db8f 100644
@@ -3869,7 +3869,6 @@ static void amdgpu_ras_counte_dw(struct work_struct *work)
 		atomic_set(&con->ras_ue_count, ue_count);
 	}
 
-	pm_runtime_mark_last_busy(dev->dev);
 Out:
 	pm_runtime_put_autosuspend(dev->dev);
 }
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c +0 -1
index 41ebe690eeff..3739be1b71e0 100644
@@ -159,7 +159,6 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __u
 		dev_err(adev->dev, "Invalid input: %s\n", str);
 	}
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return size;
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +0 -1
index 295e7186e156..5e939ea8ea42 100644
@@ -322,7 +322,6 @@ amdgpu_userq_destroy(struct drm_file *filp, int queue_id)
 	amdgpu_userq_cleanup(uq_mgr, queue, queue_id);
 	mutex_unlock(&uq_mgr->userq_mutex);
 
-	pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 
 	return r;
drivers/gpu/drm/amd/amdkfd/kfd_process.c +0 -1
index 5be28c6c4f6a..04b1abd8e80a 100644
@@ -1083,7 +1083,6 @@ static void kfd_process_destroy_pdds(struct kfd_process *p)
 		 * for auto suspend
 		 */
 		if (pdd->runtime_inuse) {
-			pm_runtime_mark_last_busy(adev_to_drm(pdd->dev->adev)->dev);
 			pm_runtime_put_autosuspend(adev_to_drm(pdd->dev->adev)->dev);
 			pdd->runtime_inuse = false;
 		}
drivers/gpu/drm/amd/pm/amdgpu_pm.c +0 -1
index edd9895b46c0..728b3982df57 100644
@@ -172,7 +172,6 @@ static int amdgpu_pm_get_access_if_active(struct amdgpu_device *adev)
  */
 static inline void amdgpu_pm_put_access(struct amdgpu_device *adev)
 {
-	pm_runtime_mark_last_busy(adev->dev);
 	pm_runtime_put_autosuspend(adev->dev);
 }
 
Signature · 1 line
2.39.5
author maintainer
#28 lore raw

PATCH 17/80 drm/nouveau: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/gpu/drm/nouveau/dispnv50/disp.c     | 2 --
 drivers/gpu/drm/nouveau/nouveau_connector.c | 1 -
 drivers/gpu/drm/nouveau/nouveau_debugfs.c   | 1 -
 drivers/gpu/drm/nouveau/nouveau_display.c   | 1 -
 drivers/gpu/drm/nouveau/nouveau_drm.c       | 4 ----
 drivers/gpu/drm/nouveau/nouveau_gem.c       | 3 ---
 6 files changed, 12 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/disp.c +0 -2
index e97e39abf3a2..682d21a8a82d 100644
@@ -1222,7 +1222,6 @@ nv50_mstc_detect(struct drm_connector *connector,
 		goto out;
 
 out:
-	pm_runtime_mark_last_busy(connector->dev->dev);
 	pm_runtime_put_autosuspend(connector->dev->dev);
 	return ret;
 }
@@ -2411,7 +2410,6 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state)
 	drm_atomic_state_put(state);
 
 	/* Drop the RPM ref we got from nv50_disp_atomic_commit() */
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 }
 
drivers/gpu/drm/nouveau/nouveau_connector.c +0 -1
index 63621b1510f6..7d0c5e42d1dd 100644
@@ -673,7 +673,6 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
 	if (!nv_connector->edid)
 		drm_dp_cec_unset_edid(&nv_connector->aux);
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return conn_status;
drivers/gpu/drm/nouveau/nouveau_debugfs.c +0 -1
index 200e65a7cefc..40eedb349c6c 100644
@@ -62,7 +62,6 @@ nouveau_debugfs_strap_peek(struct seq_file *m, void *data)
 	seq_printf(m, "0x%08x\n",
 		   nvif_rd32(&drm->client.device.object, 0x101000));
 
-	pm_runtime_mark_last_busy(drm->dev->dev);
 	pm_runtime_put_autosuspend(drm->dev->dev);
 
 	return 0;
drivers/gpu/drm/nouveau/nouveau_display.c +0 -1
index c50ec347b30a..c74f5ef315a7 100644
@@ -495,7 +495,6 @@ nouveau_display_hpd_work(struct work_struct *work)
 	if (first_changed_connector)
 		drm_connector_put(first_changed_connector);
 
-	pm_runtime_mark_last_busy(dev->dev);
 noop:
 	pm_runtime_put_autosuspend(dev->dev);
 }
drivers/gpu/drm/nouveau/nouveau_drm.c +0 -4
index 0c82a63cd49d..1dccd4af1bea 100644
@@ -1177,7 +1177,6 @@ nouveau_pmops_runtime_idle(struct device *dev)
 		return -EBUSY;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_autosuspend(dev);
 	/* we don't want the main rpm_idle to call suspend - we want to autosuspend */
 	return 1;
@@ -1224,7 +1223,6 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
 		kfree(cli);
 	}
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
@@ -1258,7 +1256,6 @@ nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
 
 	nouveau_cli_fini(cli);
 	kfree(cli);
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 	drm_dev_exit(dev_index);
 }
@@ -1306,7 +1303,6 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
drivers/gpu/drm/nouveau/nouveau_gem.c +0 -3
index 690e10fbf0bd..d0f034b4a67c 100644
@@ -89,7 +89,6 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
 
 	ttm_bo_put(&nvbo->bo);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 }
 
@@ -127,7 +126,6 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
 		ret = nouveau_vma_new(nvbo, vmm, &vma);
 	else
 		ret = 0;
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 out:
 	ttm_bo_unreserve(&nvbo->bo);
@@ -206,7 +204,6 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
 			ret = pm_runtime_get_sync(dev);
 			if (!WARN_ON(ret < 0 && ret != -EACCES)) {
 				nouveau_gem_object_unmap(nvbo, vma);
-				pm_runtime_mark_last_busy(dev);
 			}
 			pm_runtime_put_autosuspend(dev);
 		}
Signature · 1 line
2.39.5
maintainer Acked-by on v1 17/80
#29 lore raw

Re: [PATCH 17/80] drm/nouveau: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

author maintainer
#30 lore raw

PATCH 18/80 drm/radeon: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/gpu/drm/radeon/radeon_acpi.c       | 1 -
 drivers/gpu/drm/radeon/radeon_connectors.c | 5 -----
 drivers/gpu/drm/radeon/radeon_display.c    | 2 --
 drivers/gpu/drm/radeon/radeon_drv.c        | 2 --
 drivers/gpu/drm/radeon/radeon_fbdev.c      | 2 --
 drivers/gpu/drm/radeon/radeon_kms.c        | 4 ----
 6 files changed, 16 deletions(-)
drivers/gpu/drm/radeon/radeon_acpi.c +0 -1
index 22ce61bdfc06..08f8ba4fd148 100644
@@ -408,7 +408,6 @@ static int radeon_atif_handler(struct radeon_device *rdev,
 			pm_runtime_get_sync(rdev_to_drm(rdev)->dev);
 			/* Just fire off a uevent and let userspace tell us what to do */
 			drm_helper_hpd_irq_event(rdev_to_drm(rdev));
-			pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
 			pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
 		}
 	}
drivers/gpu/drm/radeon/radeon_connectors.c +0 -5
index 9f6a3df951ba..7a4f05dbd6f7 100644
@@ -876,7 +876,6 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)
 	radeon_connector_update_scratch_regs(connector, ret);
 
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
@@ -1067,7 +1066,6 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
 
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
@@ -1155,7 +1153,6 @@ radeon_tv_detect(struct drm_connector *connector, bool force)
 	radeon_connector_update_scratch_regs(connector, ret);
 
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
@@ -1403,7 +1400,6 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
 
 exit:
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
@@ -1715,7 +1711,6 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
 
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
 		pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
drivers/gpu/drm/radeon/radeon_display.c +0 -2
index 8f5f8abcb1b4..89c3f83561d6 100644
@@ -644,8 +644,6 @@ radeon_crtc_set_config(struct drm_mode_set *set,
 		if (crtc->enabled)
 			active = true;
 
-	pm_runtime_mark_last_busy(dev->dev);
-
 	rdev = dev->dev_private;
 	/* if we have active crtcs and we don't have a power ref,
 	   take the current one */
drivers/gpu/drm/radeon/radeon_drv.c +0 -2
index 88e821d67af7..d0af0cef178a 100644
@@ -477,7 +477,6 @@ static int radeon_pmops_runtime_idle(struct device *dev)
 		}
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_autosuspend(dev);
 	/* we don't want the main rpm_idle to call suspend - we want to autosuspend */
 	return 1;
@@ -499,7 +498,6 @@ long radeon_drm_ioctl(struct file *filp,
 
 	ret = drm_ioctl(filp, cmd, arg);
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
drivers/gpu/drm/radeon/radeon_fbdev.c +0 -2
index d4a58bd679db..419fcad8d283 100644
@@ -155,7 +155,6 @@ static int radeon_fbdev_fb_open(struct fb_info *info, int user)
 	return 0;
 
 err_pm_runtime_mark_last_busy:
-	pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
 	pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
 	return ret;
 }
@@ -165,7 +164,6 @@ static int radeon_fbdev_fb_release(struct fb_info *info, int user)
 	struct drm_fb_helper *fb_helper = info->par;
 	struct radeon_device *rdev = fb_helper->dev->dev_private;
 
-	pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
 	pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
 
 	return 0;
drivers/gpu/drm/radeon/radeon_kms.c +0 -4
index 645e33bf7947..3144890b6007 100644
@@ -170,7 +170,6 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
 		pm_runtime_set_autosuspend_delay(dev->dev, 5000);
 		pm_runtime_set_active(dev->dev);
 		pm_runtime_allow(dev->dev);
-		pm_runtime_mark_last_busy(dev->dev);
 		pm_runtime_put_autosuspend(dev->dev);
 	}
 
@@ -677,7 +676,6 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 		file_priv->driver_priv = fpriv;
 	}
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 	return 0;
 
@@ -687,7 +685,6 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 	kfree(fpriv);
 
 err_suspend:
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 	return r;
 }
@@ -737,7 +734,6 @@ void radeon_driver_postclose_kms(struct drm_device *dev,
 		kfree(fpriv);
 		file_priv->driver_priv = NULL;
 	}
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 }
 
Signature · 1 line
2.39.5
author maintainer
#31 lore raw

PATCH 19/80 drm/panfrost: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/panfrost/panfrost_perfcnt.c +0 -2
index 563f16bae543..0dd62e8b2fa7 100644
@@ -203,7 +203,6 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
 	panfrost_mmu_as_put(pfdev, perfcnt->mapping->mmu);
 	panfrost_gem_mapping_put(perfcnt->mapping);
 	perfcnt->mapping = NULL;
-	pm_runtime_mark_last_busy(pfdev->dev);
 	pm_runtime_put_autosuspend(pfdev->dev);
 
 	return 0;
@@ -279,7 +278,6 @@ void panfrost_perfcnt_close(struct drm_file *file_priv)
 	if (perfcnt->user == pfile)
 		panfrost_perfcnt_disable_locked(pfdev, file_priv);
 	mutex_unlock(&perfcnt->lock);
-	pm_runtime_mark_last_busy(pfdev->dev);
 	pm_runtime_put_autosuspend(pfdev->dev);
 }
 
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 19/80
#32 lore raw

Re: [PATCH 19/80] drm/panfrost: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

But this can't be merged via drm-misc until the PM changes have hit Linus' tree and been backmerged to drm-misc-next.

Thanks,
Steve

Quoted 34 lines

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/panfrost/panfrost_perfcnt.c +0 -2
index 563f16bae543..0dd62e8b2fa7 100644
@@ -203,7 +203,6 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
 	panfrost_mmu_as_put(pfdev, perfcnt->mapping->mmu);
 	panfrost_gem_mapping_put(perfcnt->mapping);
 	perfcnt->mapping = NULL;
-	pm_runtime_mark_last_busy(pfdev->dev);
 	pm_runtime_put_autosuspend(pfdev->dev);
 
 	return 0;
@@ -279,7 +278,6 @@ void panfrost_perfcnt_close(struct drm_file *file_priv)
 	if (perfcnt->user == pfile)
 		panfrost_perfcnt_disable_locked(pfdev, file_priv);
 	mutex_unlock(&perfcnt->lock);
-	pm_runtime_mark_last_busy(pfdev->dev);
 	pm_runtime_put_autosuspend(pfdev->dev);
 }
 
maintainer
#33 lore raw

Re: [PATCH 19/80] drm/panfrost: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 6 lines · Steven Price
Quoted 5 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Quoted 6 lines
Quoted 1 line

But this can't be merged via drm-misc until the PM changes have hit Linus' tree and been backmerged to drm-misc-next.

The back merged of -rc1 happened, so I've now merged this to drm-misc-next.

Thanks,
Steve

Quoted 38 lines

Thanks,
Steve

Quoted 34 lines

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/panfrost/panfrost_perfcnt.c +0 -2
index 563f16bae543..0dd62e8b2fa7 100644
@@ -203,7 +203,6 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
 	panfrost_mmu_as_put(pfdev, perfcnt->mapping->mmu);
 	panfrost_gem_mapping_put(perfcnt->mapping);
 	perfcnt->mapping = NULL;
-	pm_runtime_mark_last_busy(pfdev->dev);
 	pm_runtime_put_autosuspend(pfdev->dev);
 
 	return 0;
@@ -279,7 +278,6 @@ void panfrost_perfcnt_close(struct drm_file *file_priv)
 	if (perfcnt->user == pfile)
 		panfrost_perfcnt_disable_locked(pfdev, file_priv);
 	mutex_unlock(&perfcnt->lock);
-	pm_runtime_mark_last_busy(pfdev->dev);
 	pm_runtime_put_autosuspend(pfdev->dev);
 }
 
author maintainer
#34 lore raw

PATCH 20/80 drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 --
 drivers/gpu/drm/bridge/analogix/anx7625.c          | 2 --
 drivers/gpu/drm/bridge/parade-ps8640.c             | 2 --
 drivers/gpu/drm/bridge/ti-sn65dsi86.c              | 1 -
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c              | 4 ----
 drivers/gpu/drm/exynos/exynos_drm_fimc.c           | 2 --
 drivers/gpu/drm/exynos/exynos_drm_g2d.c            | 2 --
 drivers/gpu/drm/exynos/exynos_drm_gsc.c            | 2 --
 drivers/gpu/drm/exynos/exynos_drm_rotator.c        | 1 -
 drivers/gpu/drm/exynos/exynos_drm_scaler.c         | 1 -
 drivers/gpu/drm/i915/intel_runtime_pm.c            | 2 --
 drivers/gpu/drm/imx/dcss/dcss-crtc.c               | 1 -
 drivers/gpu/drm/lima/lima_sched.c                  | 1 -
 drivers/gpu/drm/panel/panel-edp.c                  | 3 ---
 drivers/gpu/drm/panel/panel-samsung-atna33xc20.c   | 2 --
 drivers/gpu/drm/panel/panel-simple.c               | 2 --
 drivers/gpu/drm/panthor/panthor_sched.c            | 2 --
 drivers/gpu/drm/tegra/submit.c                     | 1 -
 drivers/gpu/drm/tidss/tidss_drv.c                  | 2 --
 drivers/gpu/drm/vc4/vc4_v3d.c                      | 1 -
 20 files changed, 36 deletions(-)
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +0 -2
index a1bc3e96dd35..2f815e2e02ca 100644
@@ -1452,7 +1452,6 @@ static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux,
 
 	ret = analogix_dp_transfer(dp, msg);
 out:
-	pm_runtime_mark_last_busy(dp->dev);
 	pm_runtime_put_autosuspend(dp->dev);
 
 	return ret;
@@ -1472,7 +1471,6 @@ static int analogix_dpaux_wait_hpd_asserted(struct drm_dp_aux *aux, unsigned lon
 	ret = readx_poll_timeout(analogix_dp_get_plug_in_status, dp, val, !val,
 				 wait_us / 100, wait_us);
 
-	pm_runtime_mark_last_busy(dp->dev);
 	pm_runtime_put_autosuspend(dp->dev);
 
 	return ret;
drivers/gpu/drm/bridge/analogix/anx7625.c +0 -2
index 0ac4a82c5a6e..9577409a2eb2 100644
@@ -1520,7 +1520,6 @@ static int anx7625_wait_hpd_asserted(struct drm_dp_aux *aux,
 
 	pm_runtime_get_sync(dev);
 	ret = _anx7625_hpd_polling(ctx, wait_us);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -1770,7 +1769,6 @@ static ssize_t anx7625_aux_transfer(struct drm_dp_aux *aux,
 	if (!ret)
 		ret = anx7625_aux_trans(ctx, msg->request, msg->address,
 					msg->size, msg->buffer);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	mutex_unlock(&ctx->aux_lock);
 
drivers/gpu/drm/bridge/parade-ps8640.c +0 -2
index 825777a5758f..4f46ce2c908e 100644
@@ -198,7 +198,6 @@ static int ps8640_wait_hpd_asserted(struct drm_dp_aux *aux, unsigned long wait_u
 	 */
 	pm_runtime_get_sync(dev);
 	ret = _ps8640_wait_hpd_asserted(ps_bridge, wait_us);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -353,7 +352,6 @@ static ssize_t ps8640_aux_transfer(struct drm_dp_aux *aux,
 		goto exit;
 	}
 	ret = ps8640_aux_transfer_msg(aux, msg);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 exit:
drivers/gpu/drm/bridge/ti-sn65dsi86.c +0 -1
index db5cc4030238..fc100d4a6276 100644
@@ -587,7 +587,6 @@ static ssize_t ti_sn_aux_transfer(struct drm_dp_aux *aux,
 
 exit:
 	mutex_unlock(&pdata->comms_mutex);
-	pm_runtime_mark_last_busy(pdata->dev);
 	pm_runtime_put_autosuspend(pdata->dev);
 
 	if (ret)
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +0 -4
index cf0d9049bcf1..bc5a94dba2d4 100644
@@ -916,13 +916,11 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 	etnaviv_gpu_hw_init(gpu);
 	mutex_unlock(&gpu->lock);
 
-	pm_runtime_mark_last_busy(gpu->dev);
 	pm_runtime_put_autosuspend(gpu->dev);
 
 	return 0;
 
 fail:
-	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
 	pm_runtime_put_autosuspend(gpu->dev);
 
@@ -1109,7 +1107,6 @@ int etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m)
 
 	ret = 0;
 
-	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
 	pm_runtime_put_autosuspend(gpu->dev);
 
@@ -1509,7 +1506,6 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gem_submit *submit)
 	etnaviv_gpu_hw_init(gpu);
 
 	mutex_unlock(&gpu->lock);
-	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
 	pm_runtime_put_autosuspend(gpu->dev);
 }
drivers/gpu/drm/exynos/exynos_drm_fimc.c +0 -2
index 09e33a26caaf..13ce35443206 100644
@@ -967,7 +967,6 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
 		struct exynos_drm_ipp_task *task = ctx->task;
 
 		ctx->task = NULL;
-		pm_runtime_mark_last_busy(ctx->dev);
 		pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, 0);
 	}
@@ -1119,7 +1118,6 @@ static void fimc_abort(struct exynos_drm_ipp *ipp,
 		struct exynos_drm_ipp_task *task = ctx->task;
 
 		ctx->task = NULL;
-		pm_runtime_mark_last_busy(ctx->dev);
 		pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, -EIO);
 	}
drivers/gpu/drm/exynos/exynos_drm_g2d.c +0 -2
index d32f2474cbaa..58a830ffdcd7 100644
@@ -881,7 +881,6 @@ static void g2d_runqueue_worker(struct work_struct *work)
 	g2d->runqueue_node = NULL;
 
 	if (runqueue_node) {
-		pm_runtime_mark_last_busy(g2d->dev);
 		pm_runtime_put_autosuspend(g2d->dev);
 
 		complete(&runqueue_node->complete);
@@ -1009,7 +1008,6 @@ static void g2d_wait_finish(struct g2d_data *g2d, struct drm_file *file)
 	 * the IRQ which triggers the PM runtime put().
 	 * So do this manually here.
 	 */
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	complete(&runqueue_node->complete);
drivers/gpu/drm/exynos/exynos_drm_gsc.c +0 -2
index e6d516e1976d..3b02126b7174 100644
@@ -1053,7 +1053,6 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id)
 		struct exynos_drm_ipp_task *task = ctx->task;
 
 		ctx->task = NULL;
-		pm_runtime_mark_last_busy(ctx->dev);
 		pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, err);
 	}
@@ -1156,7 +1155,6 @@ static void gsc_abort(struct exynos_drm_ipp *ipp,
 		struct exynos_drm_ipp_task *task = ctx->task;
 
 		ctx->task = NULL;
-		pm_runtime_mark_last_busy(ctx->dev);
 		pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, -EIO);
 	}
drivers/gpu/drm/exynos/exynos_drm_rotator.c +0 -1
index 7b0f4a98a70a..06a064f5d8b4 100644
@@ -107,7 +107,6 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg)
 		struct exynos_drm_ipp_task *task = rot->task;
 
 		rot->task = NULL;
-		pm_runtime_mark_last_busy(rot->dev);
 		pm_runtime_put_autosuspend(rot->dev);
 		exynos_drm_ipp_task_done(task,
 			irq_status == ROT_IRQ_STATUS_COMPLETE ? 0 : -EINVAL);
drivers/gpu/drm/exynos/exynos_drm_scaler.c +0 -1
index c8a1b6b0a29c..b59fa9973beb 100644
@@ -438,7 +438,6 @@ static irqreturn_t scaler_irq_handler(int irq, void *arg)
 		struct exynos_drm_ipp_task *task = scaler->task;
 
 		scaler->task = NULL;
-		pm_runtime_mark_last_busy(scaler->dev);
 		pm_runtime_put_autosuspend(scaler->dev);
 		exynos_drm_ipp_task_done(task, scaler_task_done(val));
 	}
drivers/gpu/drm/i915/intel_runtime_pm.c +0 -2
index 7ce3e6de0c19..8e95afced2ce 100644
@@ -305,7 +305,6 @@ static void __intel_runtime_pm_put(struct intel_runtime_pm *rpm,
 
 	intel_runtime_pm_release(rpm, wakelock);
 
-	pm_runtime_mark_last_busy(kdev);
 	pm_runtime_put_autosuspend(kdev);
 }
 
@@ -383,7 +382,6 @@ void intel_runtime_pm_enable(struct intel_runtime_pm *rpm)
 	dev_pm_set_driver_flags(kdev, DPM_FLAG_NO_DIRECT_COMPLETE);
 
 	pm_runtime_set_autosuspend_delay(kdev, 10000); /* 10s */
-	pm_runtime_mark_last_busy(kdev);
 
 	/*
 	 * Take a permanent reference to disable the RPM functionality and drop
drivers/gpu/drm/imx/dcss/dcss-crtc.c +0 -1
index af91e45b5d13..7ad8dfd4367f 100644
@@ -154,7 +154,6 @@ static void dcss_crtc_atomic_disable(struct drm_crtc *crtc,
 
 	drm_crtc_vblank_off(crtc);
 
-	pm_runtime_mark_last_busy(dcss->dev);
 	pm_runtime_put_autosuspend(dcss->dev);
 }
 
drivers/gpu/drm/lima/lima_sched.c +0 -1
index 954f4325b859..267d5b68031d 100644
@@ -197,7 +197,6 @@ static void lima_pm_idle(struct lima_device *ldev)
 	lima_devfreq_record_idle(&ldev->devfreq);
 
 	/* GPU can do auto runtime suspend */
-	pm_runtime_mark_last_busy(ldev->dev);
 	pm_runtime_put_autosuspend(ldev->dev);
 }
 
drivers/gpu/drm/panel/panel-edp.c +0 -3
index 3796c41629cc..2de51e3ccca2 100644
@@ -613,7 +613,6 @@ static int panel_edp_get_modes(struct drm_panel *panel,
 			}
 		}
 
-		pm_runtime_mark_last_busy(panel->dev);
 		pm_runtime_put_autosuspend(panel->dev);
 	}
 
@@ -825,7 +824,6 @@ static int generic_edp_panel_probe(struct device *dev, struct panel_edp *panel)
 	}
 
 exit:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -917,7 +915,6 @@ static int panel_edp_probe(struct device *dev, const struct panel_desc *desc,
 	if (!panel->base.backlight && panel->aux) {
 		pm_runtime_get_sync(dev);
 		err = drm_panel_dp_aux_backlight(&panel->base, panel->aux);
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 
 		/*
drivers/gpu/drm/panel/panel-samsung-atna33xc20.c +0 -2
index 20ec27d2d6c2..34a90ea4ba7b 100644
@@ -236,7 +236,6 @@ static int atana33xc20_get_modes(struct drm_panel *panel,
 
 	num = drm_edid_connector_add_modes(connector);
 
-	pm_runtime_mark_last_busy(panel->dev);
 	pm_runtime_put_autosuspend(panel->dev);
 
 	return num;
@@ -306,7 +305,6 @@ static int atana33xc20_probe(struct dp_aux_ep_device *aux_ep)
 
 	pm_runtime_get_sync(dev);
 	ret = drm_panel_dp_aux_backlight(&panel->base, aux_ep->aux);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	/*
drivers/gpu/drm/panel/panel-simple.c +0 -2
index 3333d4a07504..d6bdee56b32f 100644
@@ -320,7 +320,6 @@ static int panel_simple_unprepare(struct drm_panel *panel)
 {
 	int ret;
 
-	pm_runtime_mark_last_busy(panel->dev);
 	ret = pm_runtime_put_autosuspend(panel->dev);
 	if (ret < 0)
 		return ret;
@@ -389,7 +388,6 @@ static int panel_simple_get_modes(struct drm_panel *panel,
 
 		num += drm_edid_connector_add_modes(connector);
 
-		pm_runtime_mark_last_busy(panel->dev);
 		pm_runtime_put_autosuspend(panel->dev);
 	}
 
drivers/gpu/drm/panthor/panthor_sched.c +0 -2
index a2248f692a03..f635f26a23f4 100644
@@ -2446,7 +2446,6 @@ static void tick_work(struct work_struct *work)
 
 out_unlock:
 	mutex_unlock(&sched->lock);
-	pm_runtime_mark_last_busy(ptdev->base.dev);
 	pm_runtime_put_autosuspend(ptdev->base.dev);
 
 out_dev_exit:
@@ -3203,7 +3202,6 @@ queue_run_job(struct drm_sched_job *sched_job)
 
 out_unlock:
 	mutex_unlock(&sched->lock);
-	pm_runtime_mark_last_busy(ptdev->base.dev);
 	pm_runtime_put_autosuspend(ptdev->base.dev);
 
 	return done_fence;
drivers/gpu/drm/tegra/submit.c +0 -1
index 2430fcc97448..5e0e76ebc5be 100644
@@ -502,7 +502,6 @@ static void release_job(struct host1x_job *job)
 	kfree(job_data->used_mappings);
 	kfree(job_data);
 
-	pm_runtime_mark_last_busy(client->base.dev);
 	pm_runtime_put_autosuspend(client->base.dev);
 }
 
drivers/gpu/drm/tidss/tidss_drv.c +0 -2
index a1b12e52aca4..e7e02d6017b4 100644
@@ -45,8 +45,6 @@ void tidss_runtime_put(struct tidss_device *tidss)
 
 	dev_dbg(tidss->dev, "%s\n", __func__);
 
-	pm_runtime_mark_last_busy(tidss->dev);
-
 	r = pm_runtime_put_autosuspend(tidss->dev);
 	WARN_ON(r < 0);
 }
drivers/gpu/drm/vc4/vc4_v3d.c +0 -1
index bb09df5000bd..11ec7e913974 100644
@@ -153,7 +153,6 @@ vc4_v3d_pm_put(struct vc4_dev *vc4)
 
 	mutex_lock(&vc4->power_lock);
 	if (--vc4->power_refcount == 0) {
-		pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev);
 		pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
 	}
 	mutex_unlock(&vc4->power_lock);
Signature · 1 line
2.39.5
maintainer Acked-by on v1 20/80
#35 lore raw

Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 10 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

Quoted 6 lines

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

I would think it's better to wait for linux-pm to get merged to Linus' tree and then backmerged to drm after -rc1 instead of cross-merging that directly to drm.

Regardless, for merging the i915 changes via whichever tree,

Signature · 1 line
Jani Nikula, Intel
maintainer Reviewed-by on v1 20/80
#36 lore raw

Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

Hi Sakari,

Thank you for the patch.

Quoted 38 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 --
 drivers/gpu/drm/bridge/analogix/anx7625.c          | 2 --
 drivers/gpu/drm/bridge/parade-ps8640.c             | 2 --
 drivers/gpu/drm/bridge/ti-sn65dsi86.c              | 1 -
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c              | 4 ----
 drivers/gpu/drm/exynos/exynos_drm_fimc.c           | 2 --
 drivers/gpu/drm/exynos/exynos_drm_g2d.c            | 2 --
 drivers/gpu/drm/exynos/exynos_drm_gsc.c            | 2 --
 drivers/gpu/drm/exynos/exynos_drm_rotator.c        | 1 -
 drivers/gpu/drm/exynos/exynos_drm_scaler.c         | 1 -
 drivers/gpu/drm/i915/intel_runtime_pm.c            | 2 --
 drivers/gpu/drm/imx/dcss/dcss-crtc.c               | 1 -
 drivers/gpu/drm/lima/lima_sched.c                  | 1 -
 drivers/gpu/drm/panel/panel-edp.c                  | 3 ---
 drivers/gpu/drm/panel/panel-samsung-atna33xc20.c   | 2 --
 drivers/gpu/drm/panel/panel-simple.c               | 2 --
 drivers/gpu/drm/panthor/panthor_sched.c            | 2 --
 drivers/gpu/drm/tegra/submit.c                     | 1 -
 drivers/gpu/drm/tidss/tidss_drv.c                  | 2 --
 drivers/gpu/drm/vc4/vc4_v3d.c                      | 1 -
 20 files changed, 36 deletions(-)

[snip]

Quoted 5 lines
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +0 -0
index cf0d9049bcf1..bc5a94dba2d4 100644

drivers/gpu/drm/etnaviv/etnaviv_gpu.c int etnaviv_gpu_init(struct etnaviv_gpu *gpu) · line 923

Quoted 9 lines
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +0 -1
@@ -916,13 +916,11 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 	etnaviv_gpu_hw_init(gpu);
 	mutex_unlock(&gpu->lock);
 
-	pm_runtime_mark_last_busy(gpu->dev);
 	pm_runtime_put_autosuspend(gpu->dev);
 
 	return 0;
 
 fail:

You can drop the fail error later and replace it with pm_put.

Quoted 20 lines
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +0 -3
-	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
 	pm_runtime_put_autosuspend(gpu->dev);
 
@@ -1109,7 +1107,6 @@ int etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m)
 
 	ret = 0;
 
-	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
 	pm_runtime_put_autosuspend(gpu->dev);
 
@@ -1509,7 +1506,6 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gem_submit *submit)
 	etnaviv_gpu_hw_init(gpu);
 
 	mutex_unlock(&gpu->lock);
-	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
 	pm_runtime_put_autosuspend(gpu->dev);
 }

[snip]

drivers/gpu/drm/vc4/vc4_v3d.c vc4_v3d_pm_put(struct vc4_dev *vc4) · line 157

Quoted 11 lines
drivers/gpu/drm/vc4/vc4_v3d.c +0 -1
index bb09df5000bd..11ec7e913974 100644
@@ -153,7 +153,6 @@ vc4_v3d_pm_put(struct vc4_dev *vc4)
 
 	mutex_lock(&vc4->power_lock);
 	if (--vc4->power_refcount == 0) {
-		pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev);
 		pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
 	}

And here you can drop the curly braces. With that,

Quoted 1 line
drivers/gpu/drm/vc4/vc4_v3d.c +0 -0
 	mutex_unlock(&vc4->power_lock);
Signature · 3 lines
Regards,

Laurent Pinchart
Acked-by on v1 20/80
#37 lore raw

Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

[...]

drivers/gpu/drm/tegra/submit.c static void release_job(struct host1x_job *job) · line 507

Quoted 12 lines
drivers/gpu/drm/tegra/submit.c +0 -1
index 2430fcc97448..5e0e76ebc5be 100644
@@ -502,7 +502,6 @@ static void release_job(struct host1x_job *job)
 	kfree(job_data->used_mappings);
 	kfree(job_data);
 
-	pm_runtime_mark_last_busy(client->base.dev);
 	pm_runtime_put_autosuspend(client->base.dev);
 }
 
maintainer Reviewed-by on v1 20/80
#38 lore raw

Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 26 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 --
 drivers/gpu/drm/bridge/analogix/anx7625.c          | 2 --
 drivers/gpu/drm/bridge/parade-ps8640.c             | 2 --
 drivers/gpu/drm/bridge/ti-sn65dsi86.c              | 1 -
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c              | 4 ----
 drivers/gpu/drm/exynos/exynos_drm_fimc.c           | 2 --
 drivers/gpu/drm/exynos/exynos_drm_g2d.c            | 2 --
 drivers/gpu/drm/exynos/exynos_drm_gsc.c            | 2 --
 drivers/gpu/drm/exynos/exynos_drm_rotator.c        | 1 -
Quoted 8 lines
 drivers/gpu/drm/exynos/exynos_drm_scaler.c         | 1 -
 drivers/gpu/drm/i915/intel_runtime_pm.c            | 2 --
 drivers/gpu/drm/imx/dcss/dcss-crtc.c               | 1 -
 drivers/gpu/drm/lima/lima_sched.c                  | 1 -
 drivers/gpu/drm/panel/panel-edp.c                  | 3 ---
 drivers/gpu/drm/panel/panel-samsung-atna33xc20.c   | 2 --
 drivers/gpu/drm/panel/panel-simple.c               | 2 --
 drivers/gpu/drm/panthor/panthor_sched.c            | 2 --

Panthor changes are:

Thanks,
Steve

Quoted 5 lines
 drivers/gpu/drm/tegra/submit.c                     | 1 -
 drivers/gpu/drm/tidss/tidss_drv.c                  | 2 --
 drivers/gpu/drm/vc4/vc4_v3d.c                      | 1 -
 20 files changed, 36 deletions(-)

[...]

Quoted 20 lines
drivers/gpu/drm/panthor/panthor_sched.c +0 -2
index a2248f692a03..f635f26a23f4 100644
@@ -2446,7 +2446,6 @@ static void tick_work(struct work_struct *work)
 
 out_unlock:
 	mutex_unlock(&sched->lock);
-	pm_runtime_mark_last_busy(ptdev->base.dev);
 	pm_runtime_put_autosuspend(ptdev->base.dev);
 
 out_dev_exit:
@@ -3203,7 +3202,6 @@ queue_run_job(struct drm_sched_job *sched_job)
 
 out_unlock:
 	mutex_unlock(&sched->lock);
-	pm_runtime_mark_last_busy(ptdev->base.dev);
 	pm_runtime_put_autosuspend(ptdev->base.dev);
 
 	return done_fence;
reviewer Reviewed-by on v1 20/80
#39 lore raw

Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

Hi Sakari,

Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---

[...]

drivers/gpu/drm/vc4/vc4_v3d.c vc4_v3d_pm_put(struct vc4_dev *vc4) · line 157

Quoted 11 lines
drivers/gpu/drm/vc4/vc4_v3d.c +0 -1
index bb09df5000bd..11ec7e913974 100644
@@ -153,7 +153,6 @@ vc4_v3d_pm_put(struct vc4_dev *vc4)
 
  	mutex_lock(&vc4->power_lock);
  	if (--vc4->power_refcount == 0) {
-		pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev);
  		pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
  	}

Nit: please, drop the curly braces.

drivers/gpu/drm/vc4/vc4_v3d.c vc4_v3d_pm_put(struct vc4_dev *vc4) · line 158

Quoted 1 line
drivers/gpu/drm/vc4/vc4_v3d.c +0 -0
  	mutex_unlock(&vc4->power_lock);

For vc4,

Best Regards,
- Maíra

reviewer Reviewed-by on v1 20/80
#40 lore raw

Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 6 lines · On Fri, 4 Jul 2025 10:54:13 +0300 Sakari Ailus <[email protected]>…

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

With the cleanups required by Laurent and Maíra:

Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author maintainer
#41 lore raw

PATCH 21/80 HSI: omap_ssi_port: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/hsi/controllers/omap_ssi_port.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/hsi/controllers/omap_ssi_port.c +0 -11
index aeb92b803a17..50dde968febe 100644
@@ -362,7 +362,6 @@ static int ssi_async_break(struct hsi_msg *msg)
 		spin_unlock_bh(&omap_port->lock);
 	}
 out:
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return err;
@@ -401,7 +400,6 @@ static int ssi_async(struct hsi_msg *msg)
 		msg->status = HSI_STATUS_ERROR;
 	}
 	spin_unlock_bh(&omap_port->lock);
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 	dev_dbg(&port->device, "msg status %d ttype %d ch %d\n",
 				msg->status, msg->ttype, msg->channel);
@@ -504,7 +502,6 @@ static int ssi_setup(struct hsi_client *cl)
 	omap_port->ssr.mode = cl->rx_cfg.mode;
 out:
 	spin_unlock_bh(&omap_port->lock);
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return err;
@@ -570,7 +567,6 @@ static int ssi_flush(struct hsi_client *cl)
 	pinctrl_pm_select_default_state(omap_port->pdev);
 
 	spin_unlock_bh(&omap_port->lock);
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return 0;
@@ -625,7 +621,6 @@ static int ssi_stop_tx(struct hsi_client *cl)
 	writel(SSI_WAKE(0), omap_ssi->sys + SSI_CLEAR_WAKE_REG(port->num));
 	spin_unlock_bh(&omap_port->wk_lock);
 
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev); /* Release clocks */
 
 
@@ -653,7 +648,6 @@ static void ssi_transfer(struct omap_ssi_port *omap_port,
 		}
 	}
 	spin_unlock_bh(&omap_port->lock);
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 }
 
@@ -683,7 +677,6 @@ static void ssi_cleanup_queues(struct hsi_client *cl)
 			txbufstate |= (1 << i);
 			status |= SSI_DATAACCEPT(i);
 			/* Release the clocks writes, also GDD ones */
-			pm_runtime_mark_last_busy(omap_port->pdev);
 			pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 		ssi_flush_queue(&omap_port->txqueue[i], cl);
@@ -739,7 +732,6 @@ static void ssi_cleanup_gdd(struct hsi_controller *ssi, struct hsi_client *cl)
 		 * ssi_cleanup_queues
 		 */
 		if (msg->ttype == HSI_MSG_READ) {
-			pm_runtime_mark_last_busy(omap_port->pdev);
 			pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 		omap_ssi->gdd_trn[i].msg = NULL;
@@ -936,7 +928,6 @@ static void ssi_pio_complete(struct hsi_port *port, struct list_head *queue)
 	reg = readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0));
 	if (msg->ttype == HSI_MSG_WRITE) {
 		/* Release clocks for write transfer */
-		pm_runtime_mark_last_busy(omap_port->pdev);
 		pm_runtime_put_autosuspend(omap_port->pdev);
 	}
 	reg &= ~val;
@@ -981,7 +972,6 @@ static irqreturn_t ssi_pio_thread(int irq, void *ssi_port)
 		/* TODO: sleep if we retry? */
 	} while (status_reg);
 
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return IRQ_HANDLED;
@@ -1018,7 +1008,6 @@ static irqreturn_t ssi_wake_thread(int irq __maybe_unused, void *ssi_port)
 		}
 		hsi_event(port, HSI_EVENT_STOP_RX);
 		if (test_and_clear_bit(SSI_WAKE_EN, &omap_port->flags)) {
-			pm_runtime_mark_last_busy(omap_port->pdev);
 			pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 	}
Signature · 1 line
2.39.5
maintainer Acked-by on v1 21/80
#42 lore raw

Re: [PATCH 21/80] HSI: omap_ssi_port: Remove redundant pm_runtime_mark_last_busy() calls

Hi,

Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---

-- Sebastian

Quoted 108 lines

The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/hsi/controllers/omap_ssi_port.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/hsi/controllers/omap_ssi_port.c +0 -11
index aeb92b803a17..50dde968febe 100644
@@ -362,7 +362,6 @@ static int ssi_async_break(struct hsi_msg *msg)
 		spin_unlock_bh(&omap_port->lock);
 	}
 out:
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return err;
@@ -401,7 +400,6 @@ static int ssi_async(struct hsi_msg *msg)
 		msg->status = HSI_STATUS_ERROR;
 	}
 	spin_unlock_bh(&omap_port->lock);
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 	dev_dbg(&port->device, "msg status %d ttype %d ch %d\n",
 				msg->status, msg->ttype, msg->channel);
@@ -504,7 +502,6 @@ static int ssi_setup(struct hsi_client *cl)
 	omap_port->ssr.mode = cl->rx_cfg.mode;
 out:
 	spin_unlock_bh(&omap_port->lock);
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return err;
@@ -570,7 +567,6 @@ static int ssi_flush(struct hsi_client *cl)
 	pinctrl_pm_select_default_state(omap_port->pdev);
 
 	spin_unlock_bh(&omap_port->lock);
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return 0;
@@ -625,7 +621,6 @@ static int ssi_stop_tx(struct hsi_client *cl)
 	writel(SSI_WAKE(0), omap_ssi->sys + SSI_CLEAR_WAKE_REG(port->num));
 	spin_unlock_bh(&omap_port->wk_lock);
 
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev); /* Release clocks */
 
 
@@ -653,7 +648,6 @@ static void ssi_transfer(struct omap_ssi_port *omap_port,
 		}
 	}
 	spin_unlock_bh(&omap_port->lock);
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 }
 
@@ -683,7 +677,6 @@ static void ssi_cleanup_queues(struct hsi_client *cl)
 			txbufstate |= (1 << i);
 			status |= SSI_DATAACCEPT(i);
 			/* Release the clocks writes, also GDD ones */
-			pm_runtime_mark_last_busy(omap_port->pdev);
 			pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 		ssi_flush_queue(&omap_port->txqueue[i], cl);
@@ -739,7 +732,6 @@ static void ssi_cleanup_gdd(struct hsi_controller *ssi, struct hsi_client *cl)
 		 * ssi_cleanup_queues
 		 */
 		if (msg->ttype == HSI_MSG_READ) {
-			pm_runtime_mark_last_busy(omap_port->pdev);
 			pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 		omap_ssi->gdd_trn[i].msg = NULL;
@@ -936,7 +928,6 @@ static void ssi_pio_complete(struct hsi_port *port, struct list_head *queue)
 	reg = readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0));
 	if (msg->ttype == HSI_MSG_WRITE) {
 		/* Release clocks for write transfer */
-		pm_runtime_mark_last_busy(omap_port->pdev);
 		pm_runtime_put_autosuspend(omap_port->pdev);
 	}
 	reg &= ~val;
@@ -981,7 +972,6 @@ static irqreturn_t ssi_pio_thread(int irq, void *ssi_port)
 		/* TODO: sleep if we retry? */
 	} while (status_reg);
 
-	pm_runtime_mark_last_busy(omap_port->pdev);
 	pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return IRQ_HANDLED;
@@ -1018,7 +1008,6 @@ static irqreturn_t ssi_wake_thread(int irq __maybe_unused, void *ssi_port)
 		}
 		hsi_event(port, HSI_EVENT_STOP_RX);
 		if (test_and_clear_bit(SSI_WAKE_EN, &omap_port->flags)) {
-			pm_runtime_mark_last_busy(omap_port->pdev);
 			pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 	}
Signature · 1 line
2.39.5
author maintainer
#43 lore raw

PATCH 22/80 stm class: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/hwtracing/stm/core.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/hwtracing/stm/core.c +0 -3
index cdba4e875b28..f75d06e3787a 100644
@@ -659,7 +659,6 @@ static ssize_t stm_char_write(struct file *file, const char __user *buf,
 
 	count = stm_write(stm, &stmf->output, 0, kbuf, count, NULL);
 
-	pm_runtime_mark_last_busy(&stm->dev);
 	pm_runtime_put_autosuspend(&stm->dev);
 	kfree(kbuf);
 
@@ -679,7 +678,6 @@ static void stm_mmap_close(struct vm_area_struct *vma)
 	struct stm_file *stmf = vma->vm_file->private_data;
 	struct stm_device *stm = stmf->stm;
 
-	pm_runtime_mark_last_busy(&stm->dev);
 	pm_runtime_put_autosuspend(&stm->dev);
 }
 
@@ -1082,7 +1080,6 @@ static int __stm_source_link_drop(struct stm_source_device *src,
 
 	stm_output_free(link, &src->output);
 	list_del_init(&src->link_entry);
-	pm_runtime_mark_last_busy(&link->dev);
 	pm_runtime_put_autosuspend(&link->dev);
 	/* matches stm_find_device() from stm_source_link_store() */
 	stm_put_device(link);
Signature · 1 line
2.39.5
author maintainer
#44 lore raw

PATCH 23/80 i2c: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/i2c/busses/i2c-amd-mp2.h           | 1 -
 drivers/i2c/busses/i2c-at91-core.c         | 1 -
 drivers/i2c/busses/i2c-at91-master.c       | 1 -
 drivers/i2c/busses/i2c-cadence.c           | 1 -
 drivers/i2c/busses/i2c-davinci.c           | 2 --
 drivers/i2c/busses/i2c-designware-master.c | 1 -
 drivers/i2c/busses/i2c-hix5hd2.c           | 1 -
 drivers/i2c/busses/i2c-i801.c              | 1 -
 drivers/i2c/busses/i2c-img-scb.c           | 3 ---
 drivers/i2c/busses/i2c-imx-lpi2c.c         | 4 ----
 drivers/i2c/busses/i2c-imx.c               | 3 ---
 drivers/i2c/busses/i2c-mv64xxx.c           | 1 -
 drivers/i2c/busses/i2c-nvidia-gpu.c        | 1 -
 drivers/i2c/busses/i2c-omap.c              | 3 ---
 drivers/i2c/busses/i2c-qcom-cci.c          | 2 --
 drivers/i2c/busses/i2c-qcom-geni.c         | 1 -
 drivers/i2c/busses/i2c-qup.c               | 3 ---
 drivers/i2c/busses/i2c-riic.c              | 2 --
 drivers/i2c/busses/i2c-rzv2m.c             | 1 -
 drivers/i2c/busses/i2c-sprd.c              | 2 --
 drivers/i2c/busses/i2c-stm32f7.c           | 5 -----
 drivers/i2c/busses/i2c-xiic.c              | 1 -
 22 files changed, 41 deletions(-)
drivers/i2c/busses/i2c-amd-mp2.h +0 -1
index 018a42de8b1e..9b7e9494dd12 100644
@@ -207,7 +207,6 @@ static inline void amd_mp2_pm_runtime_get(struct amd_mp2_dev *mp2_dev)
 
 static inline void amd_mp2_pm_runtime_put(struct amd_mp2_dev *mp2_dev)
 {
-	pm_runtime_mark_last_busy(&mp2_dev->pci_dev->dev);
 	pm_runtime_put_autosuspend(&mp2_dev->pci_dev->dev);
 }
 
drivers/i2c/busses/i2c-at91-core.c +0 -1
index edc047e3e535..b64adef778d4 100644
@@ -313,7 +313,6 @@ static int __maybe_unused at91_twi_resume_noirq(struct device *dev)
 			return ret;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_request_autosuspend(dev);
 
 	at91_init_twi_bus(twi_dev);
drivers/i2c/busses/i2c-at91-master.c +0 -1
index 59795c1c24ff..894cedbca99f 100644
@@ -717,7 +717,6 @@ static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num)
 
 	ret = (ret < 0) ? ret : num;
 out:
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return ret;
drivers/i2c/busses/i2c-cadence.c +0 -1
index 697d095afbe4..0fb728ade92e 100644
@@ -1128,7 +1128,6 @@ static int cdns_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 		cdns_i2c_set_mode(CDNS_I2C_MODE_SLAVE, id);
 #endif
 
-	pm_runtime_mark_last_busy(id->dev);
 	pm_runtime_put_autosuspend(id->dev);
 	return ret;
 }
drivers/i2c/busses/i2c-davinci.c +0 -2
index 6a3d4e9e07f4..a773ba082321 100644
@@ -543,7 +543,6 @@ i2c_davinci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 	ret = num;
 
 out:
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return ret;
@@ -821,7 +820,6 @@ static int davinci_i2c_probe(struct platform_device *pdev)
 	if (r)
 		goto err_unuse_clocks;
 
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
drivers/i2c/busses/i2c-designware-master.c +0 -1
index cbd88ffa5610..181ca0938fb2 100644
@@ -901,7 +901,6 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 	i2c_dw_release_lock(dev);
 
 done_nolock:
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return ret;
drivers/i2c/busses/i2c-hix5hd2.c +0 -1
index 370f32974763..f8aa1ea0f9a6 100644
@@ -373,7 +373,6 @@ static int hix5hd2_i2c_xfer(struct i2c_adapter *adap,
 	ret = num;
 
 out:
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_autosuspend(priv->dev);
 	return ret;
 }
drivers/i2c/busses/i2c-i801.c +0 -1
index a7f89946dad4..58088e9121a1 100644
@@ -928,7 +928,6 @@ static s32 i801_access(struct i2c_adapter *adap, u16 addr,
 	 */
 	iowrite8(SMBHSTSTS_INUSE_STS | STATUS_FLAGS, SMBHSTSTS(priv));
 
-	pm_runtime_mark_last_busy(&priv->pci_dev->dev);
 	pm_runtime_put_autosuspend(&priv->pci_dev->dev);
 	return ret;
 }
drivers/i2c/busses/i2c-img-scb.c +0 -3
index a454f9f25146..88192c25c44c 100644
@@ -1131,7 +1131,6 @@ static int img_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 			break;
 	}
 
-	pm_runtime_mark_last_busy(adap->dev.parent);
 	pm_runtime_put_autosuspend(adap->dev.parent);
 
 	return i2c->msg_status ? i2c->msg_status : num;
@@ -1165,7 +1164,6 @@ static int img_i2c_init(struct img_i2c *i2c)
 			 "Unknown hardware revision (%d.%d.%d.%d)\n",
 			 (rev >> 24) & 0xff, (rev >> 16) & 0xff,
 			 (rev >> 8) & 0xff, rev & 0xff);
-		pm_runtime_mark_last_busy(i2c->adap.dev.parent);
 		pm_runtime_put_autosuspend(i2c->adap.dev.parent);
 		return -EINVAL;
 	}
@@ -1317,7 +1315,6 @@ static int img_i2c_init(struct img_i2c *i2c)
 	/* Perform a synchronous sequence to reset the bus */
 	ret = img_i2c_reset_bus(i2c);
 
-	pm_runtime_mark_last_busy(i2c->adap.dev.parent);
 	pm_runtime_put_autosuspend(i2c->adap.dev.parent);
 
 	return ret;
drivers/i2c/busses/i2c-imx-lpi2c.c +0 -4
index 064bc83840a6..6d97998859b1 100644
@@ -362,7 +362,6 @@ static int lpi2c_imx_master_enable(struct lpi2c_imx_struct *lpi2c_imx)
 	return 0;
 
 rpm_put:
-	pm_runtime_mark_last_busy(lpi2c_imx->adapter.dev.parent);
 	pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
 
 	return ret;
@@ -376,7 +375,6 @@ static int lpi2c_imx_master_disable(struct lpi2c_imx_struct *lpi2c_imx)
 	temp &= ~MCR_MEN;
 	writel(temp, lpi2c_imx->base + LPI2C_MCR);
 
-	pm_runtime_mark_last_busy(lpi2c_imx->adapter.dev.parent);
 	pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
 
 	return 0;
@@ -1372,7 +1370,6 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
 	if (ret)
 		goto rpm_disable;
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_info(&lpi2c_imx->adapter.dev, "LPI2C adapter registered\n");
@@ -1474,7 +1471,6 @@ static int lpi2c_suspend(struct device *dev)
 
 static int lpi2c_resume(struct device *dev)
 {
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/i2c/busses/i2c-imx.c +0 -3
index 60f5c790ad7c..dcce882f3eba 100644
@@ -1637,7 +1637,6 @@ static int i2c_imx_xfer(struct i2c_adapter *adapter,
 
 	result = i2c_imx_xfer_common(adapter, msgs, num, false);
 
-	pm_runtime_mark_last_busy(i2c_imx->adapter.dev.parent);
 	pm_runtime_put_autosuspend(i2c_imx->adapter.dev.parent);
 
 	return result;
@@ -1822,7 +1821,6 @@ static int i2c_imx_probe(struct platform_device *pdev)
 	if (ret < 0)
 		goto clk_notifier_unregister;
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_dbg(&i2c_imx->adapter.dev, "claimed irq %d\n", irq);
@@ -1928,7 +1926,6 @@ static int i2c_imx_suspend(struct device *dev)
 
 static int i2c_imx_resume(struct device *dev)
 {
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/i2c/busses/i2c-mv64xxx.c +0 -1
index 8fc26a511320..1acba628e16c 100644
@@ -766,7 +766,6 @@ mv64xxx_i2c_xfer_core(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 	drv_data->num_msgs = 0;
 	drv_data->msgs = NULL;
 
-	pm_runtime_mark_last_busy(&adap->dev);
 	pm_runtime_put_autosuspend(&adap->dev);
 
 	return ret;
drivers/i2c/busses/i2c-nvidia-gpu.c +0 -1
index 541d808d62d0..14c059b03945 100644
@@ -216,7 +216,6 @@ static int gpu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 		if (status2 < 0)
 			dev_err(i2cd->dev, "i2c stop failed %d\n", status2);
 	}
-	pm_runtime_mark_last_busy(i2cd->dev);
 	pm_runtime_put_autosuspend(i2cd->dev);
 	return status;
 }
drivers/i2c/busses/i2c-omap.c +0 -3
index 8b01df3cc8e9..d62f15d1acfe 100644
@@ -828,7 +828,6 @@ omap_i2c_xfer_common(struct i2c_adapter *adap, struct i2c_msg msgs[], int num,
 		omap->set_mpu_wkup_lat(omap->dev, -1);
 
 out:
-	pm_runtime_mark_last_busy(omap->dev);
 	pm_runtime_put_autosuspend(omap->dev);
 	return r;
 }
@@ -1508,7 +1507,6 @@ omap_i2c_probe(struct platform_device *pdev)
 	dev_info(omap->dev, "bus %d rev%d.%d at %d kHz\n", adap->nr,
 		 major, minor, omap->speed);
 
-	pm_runtime_mark_last_busy(omap->dev);
 	pm_runtime_put_autosuspend(omap->dev);
 
 	return 0;
@@ -1602,7 +1600,6 @@ static int omap_i2c_suspend(struct device *dev)
 
 static int omap_i2c_resume(struct device *dev)
 {
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/i2c/busses/i2c-qcom-cci.c +0 -2
index a3afa11a71a1..e631d79baf14 100644
@@ -450,7 +450,6 @@ static int cci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 		ret = num;
 
 err:
-	pm_runtime_mark_last_busy(cci->dev);
 	pm_runtime_put_autosuspend(cci->dev);
 
 	return ret;
@@ -508,7 +507,6 @@ static int __maybe_unused cci_suspend(struct device *dev)
 static int __maybe_unused cci_resume(struct device *dev)
 {
 	cci_resume_runtime(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_request_autosuspend(dev);
 
 	return 0;
drivers/i2c/busses/i2c-qcom-geni.c +0 -1
index 13889f52b6f7..30921e80d30f 100644
@@ -714,7 +714,6 @@ static int geni_i2c_xfer(struct i2c_adapter *adap,
 	else
 		ret = geni_i2c_fifo_xfer(gi2c, msgs, num);
 
-	pm_runtime_mark_last_busy(gi2c->se.dev);
 	pm_runtime_put_autosuspend(gi2c->se.dev);
 	gi2c->cur = NULL;
 	gi2c->err = 0;
drivers/i2c/busses/i2c-qup.c +0 -3
index 6059f585843e..61207ca13890 100644
@@ -1137,7 +1137,6 @@ static int qup_i2c_xfer(struct i2c_adapter *adap,
 		ret = num;
 out:
 
-	pm_runtime_mark_last_busy(qup->dev);
 	pm_runtime_put_autosuspend(qup->dev);
 
 	return ret;
@@ -1622,7 +1621,6 @@ static int qup_i2c_xfer_v2(struct i2c_adapter *adap,
 	if (ret == 0)
 		ret = num;
 out:
-	pm_runtime_mark_last_busy(qup->dev);
 	pm_runtime_put_autosuspend(qup->dev);
 
 	return ret;
@@ -1989,7 +1987,6 @@ static int qup_i2c_suspend(struct device *device)
 static int qup_i2c_resume(struct device *device)
 {
 	qup_i2c_pm_resume_runtime(device);
-	pm_runtime_mark_last_busy(device);
 	pm_request_autosuspend(device);
 	return 0;
 }
drivers/i2c/busses/i2c-riic.c +0 -2
index 9c164a4b9bb9..2b7893b6152e 100644
@@ -206,7 +206,6 @@ static int riic_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 	}
 
  out:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return riic->err ?: num;
@@ -452,7 +451,6 @@ static int riic_init_hw(struct riic_dev *riic)
 
 	riic_clear_set_bit(riic, ICCR1_IICRST, 0, RIIC_ICCR1);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return 0;
 }
drivers/i2c/busses/i2c-rzv2m.c +0 -1
index b0e9c0b62429..238714850673 100644
@@ -372,7 +372,6 @@ static int rzv2m_i2c_xfer(struct i2c_adapter *adap,
 	ret = num;
 
 out:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
drivers/i2c/busses/i2c-sprd.c +0 -2
index 56b2e5c5fb49..2eddddbc84a1 100644
@@ -302,7 +302,6 @@ static int sprd_i2c_xfer(struct i2c_adapter *i2c_adap,
 	ret = sprd_i2c_handle_msg(i2c_adap, &msgs[im++], 1);
 
 err_msg:
-	pm_runtime_mark_last_busy(i2c_dev->dev);
 	pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return ret < 0 ? ret : im;
@@ -559,7 +558,6 @@ static int sprd_i2c_probe(struct platform_device *pdev)
 		goto err_rpm_put;
 	}
 
-	pm_runtime_mark_last_busy(i2c_dev->dev);
 	pm_runtime_put_autosuspend(i2c_dev->dev);
 	return 0;
 
drivers/i2c/busses/i2c-stm32f7.c +0 -5
index ef15475a7ee1..36843ac5d024 100644
@@ -1757,7 +1757,6 @@ static int stm32f7_i2c_xfer_core(struct i2c_adapter *i2c_adap,
 	}
 
 pm_free:
-	pm_runtime_mark_last_busy(i2c_dev->dev);
 	pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return (ret < 0) ? ret : num;
@@ -1866,7 +1865,6 @@ static int stm32f7_i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
 	}
 
 pm_free:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return ret;
 }
@@ -1973,7 +1971,6 @@ static int stm32f7_i2c_reg_slave(struct i2c_client *slave)
 	if (!stm32f7_i2c_is_slave_registered(i2c_dev))
 		stm32f7_i2c_enable_wakeup(i2c_dev, false);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -2011,7 +2008,6 @@ static int stm32f7_i2c_unreg_slave(struct i2c_client *slave)
 		stm32f7_i2c_enable_wakeup(i2c_dev, false);
 	}
 
-	pm_runtime_mark_last_busy(i2c_dev->dev);
 	pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return 0;
@@ -2324,7 +2320,6 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
 
 	dev_info(i2c_dev->dev, "STM32F7 I2C-%d bus adapter\n", adap->nr);
 
-	pm_runtime_mark_last_busy(i2c_dev->dev);
 	pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return 0;
drivers/i2c/busses/i2c-xiic.c +0 -1
index 607026c921d6..28015d77599d 100644
@@ -1349,7 +1349,6 @@ static int xiic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 	mutex_unlock(&i2c->lock);
 
 out:
-	pm_runtime_mark_last_busy(i2c->dev);
 	pm_runtime_put_autosuspend(i2c->dev);
 	return err;
 }
Signature · 1 line
2.39.5
maintainer Acked-by on v1 23/80
#45 lore raw

Re: [PATCH 23/80] i2c: Remove redundant pm_runtime_mark_last_busy() calls

Hi Sakari,

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Thanks,
Andi

maintainer
#46 lore raw

Re: [PATCH 23/80] i2c: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

With the dependencies being upstream now, applied to for-current, thanks!

author maintainer
#47 lore raw

PATCH 24/80 i3c: master: svc: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/i3c/master/svc-i3c-master.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/i3c/master/svc-i3c-master.c +0 -8
index 7e1a7cb94b43..4f68005c47d9 100644
@@ -664,7 +664,6 @@ static int svc_i3c_master_set_speed(struct i3c_master_controller *m,
 	}
 
 rpm_out:
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
@@ -779,7 +778,6 @@ static int svc_i3c_master_bus_init(struct i3c_master_controller *m)
 		goto rpm_out;
 
 rpm_out:
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
@@ -801,7 +799,6 @@ static void svc_i3c_master_bus_cleanup(struct i3c_master_controller *m)
 	/* Disable master */
 	writel(0, master->regs + SVC_I3C_MCONFIG);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 }
 
@@ -1207,7 +1204,6 @@ static int svc_i3c_master_do_daa(struct i3c_master_controller *m)
 		dev_err(master->dev, "Cannot handle such a list of devices");
 
 rpm_out:
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
@@ -1511,7 +1507,6 @@ static void svc_i3c_master_enqueue_xfer(struct svc_i3c_master *master,
 	}
 	spin_unlock_irqrestore(&master->xferqueue.lock, flags);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 }
 
@@ -1801,7 +1796,6 @@ static int svc_i3c_master_disable_ibi(struct i3c_dev_desc *dev)
 
 	ret = i3c_master_disec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
@@ -1834,7 +1828,6 @@ static int svc_i3c_master_disable_hotjoin(struct i3c_master_controller *m)
 	if (!master->enabled_events)
 		svc_i3c_master_disable_interrupts(master);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 
 	return 0;
@@ -1954,7 +1947,6 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
 	if (ret)
 		goto rpm_disable;
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 24/80
#48 lore raw

Re: [PATCH 24/80] i3c: master: svc: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---

Quoted 84 lines

The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/i3c/master/svc-i3c-master.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/i3c/master/svc-i3c-master.c +0 -9
index 7e1a7cb94b43..4f68005c47d9 100644
@@ -664,7 +664,6 @@ static int svc_i3c_master_set_speed(struct i3c_master_controller *m,
 	}
 
 rpm_out:
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
@@ -779,7 +778,6 @@ static int svc_i3c_master_bus_init(struct i3c_master_controller *m)
 		goto rpm_out;
 
 rpm_out:
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
@@ -801,7 +799,6 @@ static void svc_i3c_master_bus_cleanup(struct i3c_master_controller *m)
 	/* Disable master */
 	writel(0, master->regs + SVC_I3C_MCONFIG);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 }
 
@@ -1207,7 +1204,6 @@ static int svc_i3c_master_do_daa(struct i3c_master_controller *m)
 		dev_err(master->dev, "Cannot handle such a list of devices");
 
 rpm_out:
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
@@ -1511,7 +1507,6 @@ static void svc_i3c_master_enqueue_xfer(struct svc_i3c_master *master,
 	}
 	spin_unlock_irqrestore(&master->xferqueue.lock, flags);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 }
 
@@ -1801,7 +1796,6 @@ static int svc_i3c_master_disable_ibi(struct i3c_dev_desc *dev)
 
 	ret = i3c_master_disec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
@@ -1834,7 +1828,6 @@ static int svc_i3c_master_disable_hotjoin(struct i3c_master_controller *m)
 	if (!master->enabled_events)
 		svc_i3c_master_disable_interrupts(master);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 
 	return 0;
@@ -1954,7 +1947,6 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
 	if (ret)
 		goto rpm_disable;
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
--

2.39.5

author maintainer
#49 lore raw

PATCH 25/80 i3c: dw: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/i3c/master/dw-i3c-master.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/i3c/master/dw-i3c-master.c +0 -8
index 611c22b72c15..37bee9c21736 100644
@@ -699,7 +699,6 @@ static int dw_i3c_master_bus_init(struct i3c_master_controller *m)
 	dw_i3c_master_enable(master);
 
 rpm_out:
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
@@ -829,7 +828,6 @@ static int dw_i3c_master_send_ccc_cmd(struct i3c_master_controller *m,
 	else
 		ret = dw_i3c_ccc_set(master, ccc);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
@@ -912,7 +910,6 @@ static int dw_i3c_master_daa(struct i3c_master_controller *m)
 	dw_i3c_master_free_xfer(xfer);
 
 rpm_out:
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
@@ -998,7 +995,6 @@ static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev,
 	ret = xfer->ret;
 	dw_i3c_master_free_xfer(xfer);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
@@ -1148,7 +1144,6 @@ static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev,
 	ret = xfer->ret;
 	dw_i3c_master_free_xfer(xfer);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
@@ -1316,7 +1311,6 @@ static int dw_i3c_master_disable_hotjoin(struct i3c_master_controller *m)
 	writel(readl(master->regs + DEVICE_CTRL) | DEV_CTRL_HOT_JOIN_NACK,
 	       master->regs + DEVICE_CTRL);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 	return 0;
 }
@@ -1342,7 +1336,6 @@ static int dw_i3c_master_enable_ibi(struct i3c_dev_desc *dev)
 
 	if (rc) {
 		dw_i3c_master_set_sir_enabled(master, dev, data->index, false);
-		pm_runtime_mark_last_busy(master->dev);
 		pm_runtime_put_autosuspend(master->dev);
 	}
 
@@ -1362,7 +1355,6 @@ static int dw_i3c_master_disable_ibi(struct i3c_dev_desc *dev)
 
 	dw_i3c_master_set_sir_enabled(master, dev, data->index, false);
 
-	pm_runtime_mark_last_busy(master->dev);
 	pm_runtime_put_autosuspend(master->dev);
 	return 0;
 }
Signature · 1 line
2.39.5
author maintainer
#50 lore raw

PATCH 26/80 HID: intel-thc-hid: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 2 --
 drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c | 1 -
 drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c | 2 --
 drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c | 1 -
 4 files changed, 6 deletions(-)
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c +0 -2
index e944a6ccb776..599f12d3e657 100644
@@ -328,7 +328,6 @@ static irqreturn_t quicki2c_irq_thread_handler(int irq, void *dev_id)
 		if (try_recover(qcdev))
 			qcdev->state = QUICKI2C_DISABLED;
 
-	pm_runtime_mark_last_busy(qcdev->dev);
 	pm_runtime_put_autosuspend(qcdev->dev);
 
 	return IRQ_HANDLED;
@@ -711,7 +710,6 @@ static int quicki2c_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	/* Enable runtime power management */
 	pm_runtime_use_autosuspend(qcdev->dev);
 	pm_runtime_set_autosuspend_delay(qcdev->dev, DEFAULT_AUTO_SUSPEND_DELAY_MS);
-	pm_runtime_mark_last_busy(qcdev->dev);
 	pm_runtime_put_noidle(qcdev->dev);
 	pm_runtime_put_autosuspend(qcdev->dev);
 
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c +0 -1
index 5c3ec95bb3fd..834a537b6780 100644
@@ -72,7 +72,6 @@ static int quicki2c_hid_raw_request(struct hid_device *hid,
 		break;
 	}
 
-	pm_runtime_mark_last_busy(qcdev->dev);
 	pm_runtime_put_autosuspend(qcdev->dev);
 
 	return ret;
drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c +0 -2
index 5e5f179dd113..2b518d88645a 100644
@@ -335,7 +335,6 @@ static irqreturn_t quickspi_irq_thread_handler(int irq, void *dev_id)
 		if (try_recover(qsdev))
 			qsdev->state = QUICKSPI_DISABLED;
 
-	pm_runtime_mark_last_busy(qsdev->dev);
 	pm_runtime_put_autosuspend(qsdev->dev);
 
 	return IRQ_HANDLED;
@@ -670,7 +669,6 @@ static int quickspi_probe(struct pci_dev *pdev,
 	/* Enable runtime power management */
 	pm_runtime_use_autosuspend(qsdev->dev);
 	pm_runtime_set_autosuspend_delay(qsdev->dev, DEFAULT_AUTO_SUSPEND_DELAY_MS);
-	pm_runtime_mark_last_busy(qsdev->dev);
 	pm_runtime_put_noidle(qsdev->dev);
 	pm_runtime_put_autosuspend(qsdev->dev);
 
drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c +0 -1
index ad52e402c28a..82c72bfa2795 100644
@@ -71,7 +71,6 @@ static int quickspi_hid_raw_request(struct hid_device *hid,
 		break;
 	}
 
-	pm_runtime_mark_last_busy(qsdev->dev);
 	pm_runtime_put_autosuspend(qsdev->dev);
 
 	return ret;
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 26/80
#51 lore raw

RE: [PATCH 26/80] HID: intel-thc-hid: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 24 lines

-----Original Message-----
From: Sakari Ailus <[email protected]>
Sent: Friday, July 4, 2025 3:54 PM
To: Xu, Even <[email protected]>; Sun, Xinpeng <[email protected]>; Jiri Kosina <[email protected]>; Benjamin Tissoires <[email protected]>; Srinivas Pandruvada <[email protected]>; Mark Pearson <mpearson- [email protected]>; Sakari Ailus <[email protected]>; Wentao Guan <[email protected]>; Philipp Stanner <[email protected]>
Cc: [email protected]; [email protected]
Subject: [PATCH 26/80] HID: intel-thc-hid: Remove redundant pm_runtime_mark_last_busy() calls

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux- pm/[email protected]>.

Quoted 7 lines

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

Make sense, Thanks for the change!

Quoted 81 lines

drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 2 -- drivers/hid/intel-
thc-hid/intel-quicki2c/quicki2c-hid.c | 1 - drivers/hid/intel-thc-hid/intel- quickspi/pci-quickspi.c | 2 -- drivers/hid/intel-thc-hid/intel-quickspi/quickspi- hid.c | 1 -

 4 files changed, 6 deletions(-)
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c +0 -1
index e944a6ccb776..599f12d3e657 100644
@@ -328,7 +328,6 @@ static irqreturn_t quicki2c_irq_thread_handler(int irq,
 void *dev_id)
 		if (try_recover(qcdev))
 			qcdev->state = QUICKI2C_DISABLED;
 
-	pm_runtime_mark_last_busy(qcdev->dev);
 	pm_runtime_put_autosuspend(qcdev->dev);
 
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c +0 -1
 	return IRQ_HANDLED;
@@ -711,7 +710,6 @@ static int quicki2c_probe(struct pci_dev *pdev, const
 struct pci_device_id *id)
 	/* Enable runtime power management */
 	pm_runtime_use_autosuspend(qcdev->dev);
 	pm_runtime_set_autosuspend_delay(qcdev->dev,
 DEFAULT_AUTO_SUSPEND_DELAY_MS);
-	pm_runtime_mark_last_busy(qcdev->dev);
 	pm_runtime_put_noidle(qcdev->dev);
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c +0 -0
 	pm_runtime_put_autosuspend(qcdev->dev);
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c +0 -1
index 5c3ec95bb3fd..834a537b6780 100644
@@ -72,7 +72,6 @@ static int quicki2c_hid_raw_request(struct hid_device *hid,
 		break;
 	}
 
-	pm_runtime_mark_last_busy(qcdev->dev);
 	pm_runtime_put_autosuspend(qcdev->dev);
 
 	return ret;
drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c +0 -1
index 5e5f179dd113..2b518d88645a 100644
@@ -335,7 +335,6 @@ static irqreturn_t quickspi_irq_thread_handler(int irq,
 void *dev_id)
 		if (try_recover(qsdev))
 			qsdev->state = QUICKSPI_DISABLED;
 
-	pm_runtime_mark_last_busy(qsdev->dev);
 	pm_runtime_put_autosuspend(qsdev->dev);
 
drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c +0 -1
 	return IRQ_HANDLED;
@@ -670,7 +669,6 @@ static int quickspi_probe(struct pci_dev *pdev,
 	/* Enable runtime power management */
 	pm_runtime_use_autosuspend(qsdev->dev);
 	pm_runtime_set_autosuspend_delay(qsdev->dev,
 DEFAULT_AUTO_SUSPEND_DELAY_MS);
-	pm_runtime_mark_last_busy(qsdev->dev);
 	pm_runtime_put_noidle(qsdev->dev);
 	pm_runtime_put_autosuspend(qsdev->dev);
drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c +0 -2
index ad52e402c28a..82c72bfa2795 100644
@@ -71,7 +71,6 @@ static int quickspi_hid_raw_request(struct hid_device *hid,
 		break;
 	}
 
-	pm_runtime_mark_last_busy(qsdev->dev);
 	pm_runtime_put_autosuspend(qsdev->dev);
 
 	return ret;
--

2.39.5

author maintainer
#52 lore raw

PATCH 27/80 iio: accel: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/accel/bmc150-accel-core.c | 1 -
 drivers/iio/accel/bmi088-accel-core.c | 3 ---
 drivers/iio/accel/fxls8962af-core.c   | 1 -
 drivers/iio/accel/kxcjk-1013.c        | 1 -
 drivers/iio/accel/kxsd9.c             | 3 ---
 drivers/iio/accel/mma8452.c           | 1 -
 drivers/iio/accel/mma9551_core.c      | 1 -
 drivers/iio/accel/msa311.c            | 6 ------
 8 files changed, 17 deletions(-)
drivers/iio/accel/bmc150-accel-core.c +0 -1
index be5fbb0c5d29..f45beae83f8b 100644
@@ -335,7 +335,6 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}
 
drivers/iio/accel/bmi088-accel-core.c +0 -3
index dea126f993c1..c7da90af0d2d 100644
@@ -375,7 +375,6 @@ static int bmi088_accel_read_raw(struct iio_dev *indio_dev,
 	return -EINVAL;
 
 out_read_raw_pm_put:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -419,7 +418,6 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
 			return ret;
 
 		ret = bmi088_accel_set_scale(data, val, val2);
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 		return ret;
 	case IIO_CHAN_INFO_SAMP_FREQ:
@@ -428,7 +426,6 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
 			return ret;
 
 		ret = bmi088_accel_set_sample_freq(data, val);
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 		return ret;
 	default:
drivers/iio/accel/fxls8962af-core.c +0 -1
index 12598feaa693..8afd151c03ad 100644
@@ -222,7 +222,6 @@ static int fxls8962af_power_off(struct fxls8962af_data *data)
 	struct device *dev = regmap_get_device(data->regmap);
 	int ret;
 
-	pm_runtime_mark_last_busy(dev);
 	ret = pm_runtime_put_autosuspend(dev);
 	if (ret)
 		dev_err(dev, "failed to power off\n");
drivers/iio/accel/kxcjk-1013.c +0 -1
index 6aefe8221296..44d770729186 100644
@@ -637,7 +637,6 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
 	if (on)
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	else {
-		pm_runtime_mark_last_busy(&data->client->dev);
 		ret = pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
drivers/iio/accel/kxsd9.c +0 -3
index cfc31265cdd0..4717d80fc24a 100644
@@ -151,7 +151,6 @@ static int kxsd9_write_raw(struct iio_dev *indio_dev,
 		ret = kxsd9_write_scale(indio_dev, val2);
 	}
 
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	return ret;
@@ -199,7 +198,6 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,
 	}
 
 error_ret:
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	return ret;
@@ -250,7 +248,6 @@ static int kxsd9_buffer_postdisable(struct iio_dev *indio_dev)
 {
 	struct kxsd9_state *st = iio_priv(indio_dev);
 
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
drivers/iio/accel/mma8452.c +0 -1
index aba444a980d9..5863478bab62 100644
@@ -227,7 +227,6 @@ static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(&client->dev);
 	} else {
-		pm_runtime_mark_last_busy(&client->dev);
 		ret = pm_runtime_put_autosuspend(&client->dev);
 	}
 
drivers/iio/accel/mma9551_core.c +0 -1
index 3e7d9b79ed0e..22768f43fd24 100644
@@ -672,7 +672,6 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
 	if (on)
 		ret = pm_runtime_resume_and_get(&client->dev);
 	else {
-		pm_runtime_mark_last_busy(&client->dev);
 		ret = pm_runtime_put_autosuspend(&client->dev);
 	}
 
drivers/iio/accel/msa311.c +0 -6
index 3e10225410e8..ec70a517c0a9 100644
@@ -607,7 +607,6 @@ static int msa311_read_raw_data(struct iio_dev *indio_dev,
 	err = msa311_get_axis(msa311, chan, &axis);
 	mutex_unlock(&msa311->lock);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	iio_device_release_direct(indio_dev);
@@ -741,7 +740,6 @@ static int msa311_write_scale(struct iio_dev *indio_dev, int val, int val2)
 			break;
 		}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	if (err)
@@ -781,7 +779,6 @@ static int msa311_write_samp_freq(struct iio_dev *indio_dev, int val, int val2)
 			break;
 		}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	iio_device_release_direct(indio_dev);
@@ -832,7 +829,6 @@ static int msa311_debugfs_reg_access(struct iio_dev *indio_dev,
 
 	mutex_unlock(&msa311->lock);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	if (err)
@@ -855,7 +851,6 @@ static int msa311_buffer_postdisable(struct iio_dev *indio_dev)
 	struct msa311_priv *msa311 = iio_priv(indio_dev);
 	struct device *dev = msa311->dev;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -1231,7 +1226,6 @@ static int msa311_probe(struct i2c_client *i2c)
 	if (err)
 		return err;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	err = devm_iio_device_register(dev, indio_dev);
Signature · 1 line
2.39.5
#53 lore raw

Re: [PATCH 27/80] iio: accel: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 32 lines · On Fri, 4 Jul 2025 10:54:18 +0300 Sakari Ailus <[email protected]>…

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/accel/bmc150-accel-core.c | 1 -
 drivers/iio/accel/bmi088-accel-core.c | 3 ---
 drivers/iio/accel/fxls8962af-core.c   | 1 -
 drivers/iio/accel/kxcjk-1013.c        | 1 -
 drivers/iio/accel/kxsd9.c             | 3 ---
 drivers/iio/accel/mma8452.c           | 1 -
 drivers/iio/accel/mma9551_core.c      | 1 -
 drivers/iio/accel/msa311.c            | 6 ------
 8 files changed, 17 deletions(-)
drivers/iio/accel/bmc150-accel-core.c +0 -0
index be5fbb0c5d29..f45beae83f8b 100644

drivers/iio/accel/bmc150-accel-core.c static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on) · line 339

Quoted 6 lines
drivers/iio/accel/bmc150-accel-core.c +0 -1
@@ -335,7 +335,6 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}

See kernel coding style. The drop to one line in each leg means we should drop the {}

Quoted 17 lines
drivers/iio/accel/fxls8962af-core.c +0 -1
index 12598feaa693..8afd151c03ad 100644
@@ -222,7 +222,6 @@ static int fxls8962af_power_off(struct fxls8962af_data *data)
 	struct device *dev = regmap_get_device(data->regmap);
 	int ret;
 
-	pm_runtime_mark_last_busy(dev);
 	ret = pm_runtime_put_autosuspend(dev);
 	if (ret)
 		dev_err(dev, "failed to power off\n");
drivers/iio/accel/kxcjk-1013.c +0 -0
index 6aefe8221296..44d770729186 100644

drivers/iio/accel/kxcjk-1013.c static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on) · line 640

Quoted 4 lines
drivers/iio/accel/kxcjk-1013.c +0 -1
@@ -637,7 +637,6 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
 	if (on)
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	else {
-		pm_runtime_mark_last_busy(&data->client->dev);

Likewise here.

Quoted 10 lines
drivers/iio/accel/kxcjk-1013.c +0 -0
 		ret = pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
drivers/iio/accel/mma8452.c +0 -0
index aba444a980d9..5863478bab62 100644

drivers/iio/accel/mma8452.c static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on) · line 230

Quoted 4 lines
drivers/iio/accel/mma8452.c +0 -1
@@ -227,7 +227,6 @@ static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(&client->dev);
 	} else {
-		pm_runtime_mark_last_busy(&client->dev);

And here.

drivers/iio/accel/mma9551_core.c int mma9551_set_power_state(struct i2c_client *client, bool on) · line 675

Quoted 12 lines
drivers/iio/accel/mma8452.c +0 -0
 		ret = pm_runtime_put_autosuspend(&client->dev);
 	}
 
drivers/iio/accel/mma9551_core.c +0 -1
index 3e7d9b79ed0e..22768f43fd24 100644
@@ -672,7 +672,6 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
 	if (on)
 		ret = pm_runtime_resume_and_get(&client->dev);
 	else {
-		pm_runtime_mark_last_busy(&client->dev);

And here...

Quoted 2 lines
drivers/iio/accel/mma9551_core.c +0 -0
 		ret = pm_runtime_put_autosuspend(&client->dev);
 	}
Reviewed-by on v1 27/80
#54 lore raw

Re: [PATCH 27/80] iio: accel: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---

Looks good to me. Just one comment (to 4 drivers) - but I'm not insisting it to be addressed :)

Quoted 25 lines

The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                 pm-runtime-6.17-rc1
  drivers/iio/accel/bmc150-accel-core.c | 1 -
  drivers/iio/accel/bmi088-accel-core.c | 3 ---
  drivers/iio/accel/fxls8962af-core.c   | 1 -
  drivers/iio/accel/kxcjk-1013.c        | 1 -
  drivers/iio/accel/kxsd9.c             | 3 ---
  drivers/iio/accel/mma8452.c           | 1 -
  drivers/iio/accel/mma9551_core.c      | 1 -
  drivers/iio/accel/msa311.c            | 6 ------
  8 files changed, 17 deletions(-)
drivers/iio/accel/bmc150-accel-core.c +0 -0
index be5fbb0c5d29..f45beae83f8b 100644

drivers/iio/accel/bmc150-accel-core.c static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on) · line 340

Quoted 7 lines
drivers/iio/accel/bmc150-accel-core.c +0 -1
@@ -335,7 +335,6 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
  	if (on) {
  		ret = pm_runtime_resume_and_get(dev);
  	} else {
-		pm_runtime_mark_last_busy(dev);
  		ret = pm_runtime_put_autosuspend(dev);
  	}
 

// snip

drivers/iio/accel/kxcjk-1013.c static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on) · line 642

Quoted 12 lines
drivers/iio/accel/kxcjk-1013.c +0 -1
index 6aefe8221296..44d770729186 100644
@@ -637,7 +637,6 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
  	if (on)
  		ret = pm_runtime_resume_and_get(&data->client->dev);
  	else {
-		pm_runtime_mark_last_busy(&data->client->dev);
  		ret = pm_runtime_put_autosuspend(&data->client->dev);
  	}
  	if (ret < 0) {

//snip

drivers/iio/accel/mma8452.c static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on) · line 231

Quoted 11 lines
drivers/iio/accel/mma8452.c +0 -1
index aba444a980d9..5863478bab62 100644
@@ -227,7 +227,6 @@ static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on)
  	if (on) {
  		ret = pm_runtime_resume_and_get(&client->dev);
  	} else {
-		pm_runtime_mark_last_busy(&client->dev);
  		ret = pm_runtime_put_autosuspend(&client->dev);
  	}

//snip

drivers/iio/accel/mma9551_core.c int mma9551_set_power_state(struct i2c_client *client, bool on) · line 677

Quoted 13 lines
drivers/iio/accel/mma9551_core.c +0 -1
index 3e7d9b79ed0e..22768f43fd24 100644
@@ -672,7 +672,6 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
  	if (on)
  		ret = pm_runtime_resume_and_get(&client->dev);
  	else {
-		pm_runtime_mark_last_busy(&client->dev);
  		ret = pm_runtime_put_autosuspend(&client->dev);
  	}
 

Do these really warrant a function? (Especially for the mma9551 where the function is exported). I think it'd be fine to have the pm_runtime_resume_and_get() and the pm_runtime_put_autosuspend() called directly without these wrappers.

Anyways, this looks good to me - thanks!

Yours
-- Matti

maintainer
#55 lore raw

Re: [PATCH 27/80] iio: accel: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 86 lines · On Thu, 10 Jul 2025 09:46:12 +0300 Matti Vaittinen <[email protected]>…
Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---

Looks good to me. Just one comment (to 4 drivers) - but I'm not insisting it to be addressed :)

Quoted 25 lines

The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                 pm-runtime-6.17-rc1
  drivers/iio/accel/bmc150-accel-core.c | 1 -
  drivers/iio/accel/bmi088-accel-core.c | 3 ---
  drivers/iio/accel/fxls8962af-core.c   | 1 -
  drivers/iio/accel/kxcjk-1013.c        | 1 -
  drivers/iio/accel/kxsd9.c             | 3 ---
  drivers/iio/accel/mma8452.c           | 1 -
  drivers/iio/accel/mma9551_core.c      | 1 -
  drivers/iio/accel/msa311.c            | 6 ------
  8 files changed, 17 deletions(-)
drivers/iio/accel/bmc150-accel-core.c +0 -0
index be5fbb0c5d29..f45beae83f8b 100644

drivers/iio/accel/bmc150-accel-core.c static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on) · line 340

Quoted 7 lines
drivers/iio/accel/bmc150-accel-core.c +0 -1
@@ -335,7 +335,6 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
  	if (on) {
  		ret = pm_runtime_resume_and_get(dev);
  	} else {
-		pm_runtime_mark_last_busy(dev);
  		ret = pm_runtime_put_autosuspend(dev);
  	}
 

// snip

drivers/iio/accel/kxcjk-1013.c static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on) · line 642

Quoted 12 lines
drivers/iio/accel/kxcjk-1013.c +0 -1
index 6aefe8221296..44d770729186 100644
@@ -637,7 +637,6 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
  	if (on)
  		ret = pm_runtime_resume_and_get(&data->client->dev);
  	else {
-		pm_runtime_mark_last_busy(&data->client->dev);
  		ret = pm_runtime_put_autosuspend(&data->client->dev);
  	}
  	if (ret < 0) {  

//snip

drivers/iio/accel/mma8452.c static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on) · line 231

Quoted 11 lines
drivers/iio/accel/mma8452.c +0 -1
index aba444a980d9..5863478bab62 100644
@@ -227,7 +227,6 @@ static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on)
  	if (on) {
  		ret = pm_runtime_resume_and_get(&client->dev);
  	} else {
-		pm_runtime_mark_last_busy(&client->dev);
  		ret = pm_runtime_put_autosuspend(&client->dev);
  	}  

//snip

Quoted 10 lines
drivers/iio/accel/mma9551_core.c +0 -1
index 3e7d9b79ed0e..22768f43fd24 100644
@@ -672,7 +672,6 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
  	if (on)
  		ret = pm_runtime_resume_and_get(&client->dev);
  	else {
-		pm_runtime_mark_last_busy(&client->dev);
Quoted 8 lines

drivers/iio/accel/mma9551_core.c int mma9551_set_power_state(struct i2c_client *client, bool on) · line 677

Quoted 3 lines
drivers/iio/accel/mma9551_core.c +0 -0
  		ret = pm_runtime_put_autosuspend(&client->dev);
  	}
 

Do these really warrant a function? (Especially for the mma9551 where the function is exported). I think it'd be fine to have the pm_runtime_resume_and_get() and the pm_runtime_put_autosuspend() called directly without these wrappers.

Absolutely agree that they don't. However, I think it may make
sense to clean that up in two jumps. This series just makes the
specific drop of the unnecessary call, next series does the refactor. That keeps this series tightly focused on one topic.

Jonathan

Quoted 10 lines

Anyways, this looks good to me - thanks!

Yours
-- Matti

author maintainer
#56 lore raw

PATCH 28/80 iio: adc: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/adc/ab8500-gpadc.c     |  1 -
 drivers/iio/adc/at91-sama5d2_adc.c | 10 ----------
 drivers/iio/adc/imx8qxp-adc.c      |  2 --
 drivers/iio/adc/imx93_adc.c        |  1 -
 drivers/iio/adc/rcar-gyroadc.c     |  1 -
 drivers/iio/adc/rzg2l_adc.c        |  3 ---
 drivers/iio/adc/stm32-adc-core.c   |  1 -
 drivers/iio/adc/stm32-adc.c        |  7 -------
 drivers/iio/adc/sun4i-gpadc-iio.c  |  2 --
 drivers/iio/adc/ti-ads1015.c       |  1 -
 drivers/iio/adc/ti-ads1100.c       |  1 -
 drivers/iio/adc/ti-ads1119.c       |  2 --
 12 files changed, 32 deletions(-)
drivers/iio/adc/ab8500-gpadc.c +0 -1
index f3b057f92310..8eaa1dd6a89b 100644
@@ -607,7 +607,6 @@ static int ab8500_gpadc_read(struct ab8500_gpadc *gpadc,
 	}
 
 	/* This eventually drops the regulator */
-	pm_runtime_mark_last_busy(gpadc->dev);
 	pm_runtime_put_autosuspend(gpadc->dev);
 
 	return (high_data << 8) | low_data;
drivers/iio/adc/at91-sama5d2_adc.c +0 -10
index c3450246730e..67846fefe21a 100644
@@ -896,7 +896,6 @@ static int at91_adc_config_emr(struct at91_adc_state *st,
 	emr |= osr | AT91_SAMA5D2_TRACKX(trackx);
 	at91_adc_writel(st, EMR, emr);
 
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	st->oversampling_ratio = oversampling_ratio;
@@ -971,7 +970,6 @@ static int at91_adc_configure_touch(struct at91_adc_state *st, bool state)
 				AT91_SAMA5D2_IER_PEN | AT91_SAMA5D2_IER_NOPEN);
 		at91_adc_writel(st, TSMR, 0);
 
-		pm_runtime_mark_last_busy(st->dev);
 		pm_runtime_put_autosuspend(st->dev);
 		return 0;
 	}
@@ -1143,7 +1141,6 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state)
 	at91_adc_configure_trigger_registers(st, state);
 
 	if (!state) {
-		pm_runtime_mark_last_busy(st->dev);
 		pm_runtime_put_autosuspend(st->dev);
 	}
 
@@ -1336,7 +1333,6 @@ static int at91_adc_buffer_prepare(struct iio_dev *indio_dev)
 		at91_adc_writel(st, IER, AT91_SAMA5D2_IER_DRDY);
 
 pm_runtime_put:
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 	return ret;
 }
@@ -1394,7 +1390,6 @@ static int at91_adc_buffer_postdisable(struct iio_dev *indio_dev)
 	if (st->dma_st.dma_chan)
 		dmaengine_terminate_sync(st->dma_st.dma_chan);
 
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
@@ -1603,7 +1598,6 @@ static void at91_adc_setup_samp_freq(struct iio_dev *indio_dev, unsigned freq,
 	mr |= AT91_SAMA5D2_MR_TRACKTIM(tracktim);
 	at91_adc_writel(st, MR, mr);
 
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	dev_dbg(&indio_dev->dev, "freq: %u, startup: %u, prescal: %u, tracktim=%u\n",
@@ -1809,7 +1803,6 @@ static int at91_adc_read_info_raw(struct iio_dev *indio_dev,
 	at91_adc_readl(st, LCDR);
 
 pm_runtime_put:
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 	return ret;
 }
@@ -1890,7 +1883,6 @@ static int at91_adc_read_temp(struct iio_dev *indio_dev,
 restore_config:
 	/* Revert previous settings. */
 	at91_adc_temp_sensor_configure(st, false);
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 	if (ret < 0)
 		return ret;
@@ -2465,7 +2457,6 @@ static int at91_adc_probe(struct platform_device *pdev)
 	dev_info(&pdev->dev, "version: %x\n",
 		 readl_relaxed(st->base + st->soc_info.platform->layout->VERSION));
 
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
@@ -2567,7 +2558,6 @@ static int at91_adc_resume(struct device *dev)
 		at91_adc_configure_trigger_registers(st, true);
 	}
 
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
drivers/iio/adc/imx8qxp-adc.c +0 -2
index be13a6ed7e00..d9da24efdcbe 100644
@@ -229,7 +229,6 @@ static int imx8qxp_adc_read_raw(struct iio_dev *indio_dev,
 		ret = wait_for_completion_interruptible_timeout(&adc->completion,
 								IMX8QXP_ADC_TIMEOUT);
 
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_sync_autosuspend(dev);
 
 		if (ret == 0) {
@@ -295,7 +294,6 @@ static int imx8qxp_adc_reg_access(struct iio_dev *indio_dev, unsigned int reg,
 
 	*readval = readl(adc->regs + reg);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_sync_autosuspend(dev);
 
 	return 0;
drivers/iio/adc/imx93_adc.c +0 -1
index 7feaafd2316f..bb5bd22269b9 100644
@@ -248,7 +248,6 @@ static int imx93_adc_read_raw(struct iio_dev *indio_dev,
 		mutex_lock(&adc->lock);
 		ret = imx93_adc_read_channel_conversion(adc, chan->channel, val);
 		mutex_unlock(&adc->lock);
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_sync_autosuspend(dev);
 		if (ret < 0)
 			return ret;
drivers/iio/adc/rcar-gyroadc.c +0 -1
index cc326f21d398..467c6a9213ab 100644
@@ -166,7 +166,6 @@ static int rcar_gyroadc_set_power(struct rcar_gyroadc *priv, bool on)
 	if (on) {
 		return pm_runtime_resume_and_get(dev);
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		return pm_runtime_put_autosuspend(dev);
 	}
 }
drivers/iio/adc/rzg2l_adc.c +0 -3
index 9674d48074c9..29264a410def 100644
@@ -249,7 +249,6 @@ static int rzg2l_adc_conversion(struct iio_dev *indio_dev, struct rzg2l_adc *adc
 	rzg2l_adc_start_stop(adc, false);
 
 rpm_put:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return ret;
 }
@@ -411,7 +410,6 @@ static int rzg2l_adc_hw_init(struct device *dev, struct rzg2l_adc *adc)
 	rzg2l_adc_writel(adc, RZG2L_ADM(3), reg);
 
 exit_hw_init:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return ret;
 }
@@ -591,7 +589,6 @@ static int rzg2l_adc_resume(struct device *dev)
 
 rpm_restore:
 	if (adc->was_rpm_active) {
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 	}
 resets_restore:
drivers/iio/adc/stm32-adc-core.c +0 -1
index dea166c53369..b42fee4a4695 100644
@@ -795,7 +795,6 @@ static int stm32_adc_probe(struct platform_device *pdev)
 		goto err_irq_remove;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/iio/adc/stm32-adc.c +0 -7
index 588c69e175f5..54147d0afc0f 100644
@@ -1528,7 +1528,6 @@ static int stm32_adc_single_conv(struct iio_dev *indio_dev,
 
 	stm32_adc_conv_irq_disable(adc);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -1564,7 +1563,6 @@ static int stm32_adc_write_raw(struct iio_dev *indio_dev,
 
 		adc->cfg->set_ovs(indio_dev, idx);
 
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 
 		adc->ovs_idx = idx;
@@ -1759,7 +1757,6 @@ static int stm32_adc_update_scan_mode(struct iio_dev *indio_dev,
 	adc->num_conv = bitmap_weight(scan_mask, iio_get_masklength(indio_dev));
 
 	ret = stm32_adc_conf_scan_seq(indio_dev, scan_mask);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -1808,7 +1805,6 @@ static int stm32_adc_debugfs_reg_access(struct iio_dev *indio_dev,
 	else
 		*readval = stm32_adc_readl(adc, reg);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -1954,7 +1950,6 @@ static int stm32_adc_buffer_postenable(struct iio_dev *indio_dev)
 err_clr_trig:
 	stm32_adc_set_trig(indio_dev, NULL);
 err_pm_put:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -1977,7 +1972,6 @@ static int stm32_adc_buffer_predisable(struct iio_dev *indio_dev)
 	if (stm32_adc_set_trig(indio_dev, NULL))
 		dev_err(&indio_dev->dev, "Can't clear trigger\n");
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -2614,7 +2608,6 @@ static int stm32_adc_probe(struct platform_device *pdev)
 		goto err_hw_stop;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	if (IS_ENABLED(CONFIG_DEBUG_FS))
drivers/iio/adc/sun4i-gpadc-iio.c +0 -2
index 6b8d6bee1873..a439f4864111 100644
@@ -245,7 +245,6 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
 		*val = info->temp_data;
 
 	ret = 0;
-	pm_runtime_mark_last_busy(indio_dev->dev.parent);
 
 err:
 	pm_runtime_put_autosuspend(indio_dev->dev.parent);
@@ -272,7 +271,6 @@ static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val)
 
 		regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, val);
 
-		pm_runtime_mark_last_busy(indio_dev->dev.parent);
 		pm_runtime_put_autosuspend(indio_dev->dev.parent);
 
 		return 0;
drivers/iio/adc/ti-ads1015.c +0 -1
index 48549d617e5f..d3920fcb131b 100644
@@ -377,7 +377,6 @@ static int ads1015_set_power_state(struct ads1015_data *data, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}
 
drivers/iio/adc/ti-ads1100.c +0 -1
index b0790e300b18..aa8946063c7d 100644
@@ -105,7 +105,6 @@ static int ads1100_get_adc_result(struct ads1100_data *data, int chan, int *val)
 
 	ret = i2c_master_recv(data->client, (char *)&buffer, sizeof(buffer));
 
-	pm_runtime_mark_last_busy(&data->client->dev);
 	pm_runtime_put_autosuspend(&data->client->dev);
 
 	if (ret < 0) {
drivers/iio/adc/ti-ads1119.c +0 -2
index d2f86e1ec656..9f576cfe63f9 100644
@@ -291,7 +291,6 @@ static int ads1119_single_conversion(struct ads1119_state *st,
 	*val = sign_extend32(sample, chan->scan_type.realbits - 1);
 	ret = IIO_VAL_INT;
 pdown:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return ret;
 }
@@ -470,7 +469,6 @@ static int ads1119_triggered_buffer_postdisable(struct iio_dev *indio_dev)
 	if (ret)
 		return ret;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
Signature · 1 line
2.39.5
Reviewed-by on v1 28/80
#57 lore raw

Re: [PATCH 28/80] iio: adc: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Yours,
Linus Walleij

#58 lore raw

Re: [PATCH 28/80] iio: adc: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 64 lines · On Fri, 4 Jul 2025 10:54:19 +0300 Sakari Ailus <[email protected]>…

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/adc/ab8500-gpadc.c     |  1 -
 drivers/iio/adc/at91-sama5d2_adc.c | 10 ----------
 drivers/iio/adc/imx8qxp-adc.c      |  2 --
 drivers/iio/adc/imx93_adc.c        |  1 -
 drivers/iio/adc/rcar-gyroadc.c     |  1 -
 drivers/iio/adc/rzg2l_adc.c        |  3 ---
 drivers/iio/adc/stm32-adc-core.c   |  1 -
 drivers/iio/adc/stm32-adc.c        |  7 -------
 drivers/iio/adc/sun4i-gpadc-iio.c  |  2 --
 drivers/iio/adc/ti-ads1015.c       |  1 -
 drivers/iio/adc/ti-ads1100.c       |  1 -
 drivers/iio/adc/ti-ads1119.c       |  2 --
 12 files changed, 32 deletions(-)
drivers/iio/adc/ab8500-gpadc.c +0 -1
index f3b057f92310..8eaa1dd6a89b 100644
@@ -607,7 +607,6 @@ static int ab8500_gpadc_read(struct ab8500_gpadc *gpadc,
 	}
 
 	/* This eventually drops the regulator */
-	pm_runtime_mark_last_busy(gpadc->dev);
 	pm_runtime_put_autosuspend(gpadc->dev);
 
 	return (high_data << 8) | low_data;
drivers/iio/adc/at91-sama5d2_adc.c +0 -2
index c3450246730e..67846fefe21a 100644
@@ -896,7 +896,6 @@ static int at91_adc_config_emr(struct at91_adc_state *st,
 	emr |= osr | AT91_SAMA5D2_TRACKX(trackx);
 	at91_adc_writel(st, EMR, emr);
 
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	st->oversampling_ratio = oversampling_ratio;
@@ -971,7 +970,6 @@ static int at91_adc_configure_touch(struct at91_adc_state *st, bool state)
 				AT91_SAMA5D2_IER_PEN | AT91_SAMA5D2_IER_NOPEN);
 		at91_adc_writel(st, TSMR, 0);
 
-		pm_runtime_mark_last_busy(st->dev);
 		pm_runtime_put_autosuspend(st->dev);
 		return 0;
 	}

drivers/iio/adc/at91-sama5d2_adc.c static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state) · line 1146

Quoted 4 lines
drivers/iio/adc/at91-sama5d2_adc.c +0 -1
@@ -1143,7 +1141,6 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state)
 	at91_adc_configure_trigger_registers(st, state);
 
 	if (!state) {
-		pm_runtime_mark_last_busy(st->dev);

Getting familiar. I'll not comment on other cases but {} should go here.

drivers/iio/adc/at91-sama5d2_adc.c static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state) · line 1145

Quoted 2 lines
drivers/iio/adc/at91-sama5d2_adc.c +0 -0
 		pm_runtime_put_autosuspend(st->dev);
 	}

Please fix all those up and post a v2 series for IIO.

I'd guess similar are present in other subsystems though so may well need a v2 as well with the excess brackets dropped.

Jonathan

author maintainer
#59 lore raw

PATCH 29/80 iio: chemical: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/chemical/atlas-sensor.c | 2 --
 drivers/iio/chemical/bme680_core.c  | 3 ---
 2 files changed, 5 deletions(-)
drivers/iio/chemical/atlas-sensor.c +0 -2
index 1daaa36f87a9..8bbba85af699 100644
@@ -425,7 +425,6 @@ static int atlas_buffer_predisable(struct iio_dev *indio_dev)
 	if (ret)
 		return ret;
 
-	pm_runtime_mark_last_busy(&data->client->dev);
 	ret = pm_runtime_put_autosuspend(&data->client->dev);
 	if (ret)
 		return ret;
@@ -491,7 +490,6 @@ static int atlas_read_measurement(struct atlas_data *data, int reg, __be32 *val)
 
 	ret = regmap_bulk_read(data->regmap, reg, val, sizeof(*val));
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
drivers/iio/chemical/bme680_core.c +0 -3
index 61d446fd456c..70f81c4a96ba 100644
@@ -950,7 +950,6 @@ static int bme680_read_raw(struct iio_dev *indio_dev,
 		return ret;
 
 	ret = __bme680_read_raw(indio_dev, chan, val, val2, mask);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -1021,7 +1020,6 @@ static int bme680_write_raw(struct iio_dev *indio_dev,
 		return ret;
 
 	ret = __bme680_write_raw(indio_dev, chan, val, val2, mask);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -1140,7 +1138,6 @@ static int bme680_buffer_postdisable(struct iio_dev *indio_dev)
 	struct bme680_data *data = iio_priv(indio_dev);
 	struct device *dev = regmap_get_device(data->regmap);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return 0;
 }
Signature · 1 line
2.39.5
author maintainer
#60 lore raw

PATCH 30/80 iio: common: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 1 -
 1 file changed, 1 deletion(-)
drivers/iio/common/hid-sensors/hid-sensor-trigger.c +0 -1
index 48193937275b..5540e2d28f4a 100644
@@ -163,7 +163,6 @@ int hid_sensor_power_state(struct hid_sensor_common *st, bool state)
 		ret = pm_runtime_resume_and_get(&st->pdev->dev);
 	} else {
 		atomic_dec(&st->user_requested_state);
-		pm_runtime_mark_last_busy(&st->pdev->dev);
 		pm_runtime_use_autosuspend(&st->pdev->dev);
 		ret = pm_runtime_put_autosuspend(&st->pdev->dev);
 	}
Signature · 1 line
2.39.5
author maintainer
#61 lore raw

PATCH 31/80 iio: dac: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/dac/stm32-dac.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/iio/dac/stm32-dac.c +0 -3
index 344388338d9b..7d47c7dddbf8 100644
@@ -96,7 +96,6 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
 		udelay(1);
 
 	if (!enable) {
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 	}
 
@@ -104,7 +103,6 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
 
 err_put_pm:
 	if (enable) {
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 	}
 
@@ -349,7 +347,6 @@ static int stm32_dac_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_pm_put;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
Signature · 1 line
2.39.5
author maintainer
#62 lore raw

PATCH 32/80 iio: gyro: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/gyro/bmg160_core.c     | 1 -
 drivers/iio/gyro/fxas21002c_core.c | 2 --
 drivers/iio/gyro/mpu3050-core.c    | 3 ---
 drivers/iio/gyro/mpu3050-i2c.c     | 1 -
 4 files changed, 7 deletions(-)
drivers/iio/gyro/bmg160_core.c +0 -1
index 781d3e96645f..4dbe3c0cc5eb 100644
@@ -310,7 +310,6 @@ static int bmg160_set_power_state(struct bmg160_data *data, bool on)
 	if (on)
 		ret = pm_runtime_get_sync(dev);
 	else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}
 
drivers/iio/gyro/fxas21002c_core.c +0 -2
index 754c8a564ba4..a88670207cec 100644
@@ -373,8 +373,6 @@ static int  fxas21002c_pm_put(struct fxas21002c_data *data)
 {
 	struct device *dev = regmap_get_device(data->regmap);
 
-	pm_runtime_mark_last_busy(dev);
-
 	return pm_runtime_put_autosuspend(dev);
 }
 
drivers/iio/gyro/mpu3050-core.c +0 -3
index 16553948c5c3..67ae7d1012bc 100644
@@ -370,7 +370,6 @@ static int mpu3050_read_raw(struct iio_dev *indio_dev,
 
 out_read_raw_unlock:
 	mutex_unlock(&mpu3050->lock);
-	pm_runtime_mark_last_busy(mpu3050->dev);
 	pm_runtime_put_autosuspend(mpu3050->dev);
 
 	return ret;
@@ -662,7 +661,6 @@ static int mpu3050_buffer_postdisable(struct iio_dev *indio_dev)
 {
 	struct mpu3050 *mpu3050 = iio_priv(indio_dev);
 
-	pm_runtime_mark_last_busy(mpu3050->dev);
 	pm_runtime_put_autosuspend(mpu3050->dev);
 
 	return 0;
@@ -976,7 +974,6 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,
 		if (ret)
 			dev_err(mpu3050->dev, "error resetting FIFO\n");
 
-		pm_runtime_mark_last_busy(mpu3050->dev);
 		pm_runtime_put_autosuspend(mpu3050->dev);
 		mpu3050->hw_irq_trigger = false;
 
drivers/iio/gyro/mpu3050-i2c.c +0 -1
index 8e284f47242c..092878f2c886 100644
@@ -27,7 +27,6 @@ static int mpu3050_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id)
 {
 	struct mpu3050 *mpu3050 = i2c_mux_priv(mux);
 
-	pm_runtime_mark_last_busy(mpu3050->dev);
 	pm_runtime_put_autosuspend(mpu3050->dev);
 	return 0;
 }
Signature · 1 line
2.39.5
Reviewed-by on v1 32/80
#63 lore raw

Re: [PATCH 32/80] iio: gyro: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Yours,
Linus Walleij

maintainer Reviewed-by on v1 32/80
#64 lore raw

Re: [PATCH 32/80] iio: gyro: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

Hi Sakari,
Thanks for the patch

Quoted 40 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/gyro/bmg160_core.c     | 1 -
 drivers/iio/gyro/fxas21002c_core.c | 2 --
 drivers/iio/gyro/mpu3050-core.c    | 3 ---
 drivers/iio/gyro/mpu3050-i2c.c     | 1 -
 4 files changed, 7 deletions(-)
drivers/iio/gyro/bmg160_core.c +0 -1
index 781d3e96645f..4dbe3c0cc5eb 100644
@@ -310,7 +310,6 @@ static int bmg160_set_power_state(struct bmg160_data *data, bool on)
 	if (on)
 		ret = pm_runtime_get_sync(dev);
 	else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}
 
drivers/iio/gyro/fxas21002c_core.c +0 -0
index 754c8a564ba4..a88670207cec 100644

drivers/iio/gyro/fxas21002c_core.c static int fxas21002c_pm_put(struct fxas21002c_data *data) · line 377

Quoted 7 lines
drivers/iio/gyro/fxas21002c_core.c +0 -2
@@ -373,8 +373,6 @@ static int  fxas21002c_pm_put(struct fxas21002c_data *data)
 {
 	struct device *dev = regmap_get_device(data->regmap);
 
-	pm_runtime_mark_last_busy(dev);
-
 	return pm_runtime_put_autosuspend(dev);
 }

LGTM,

Cheers,
Rui

author maintainer
#65 lore raw

PATCH 33/80 iio: imu: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c  | 5 -----
 drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c | 1 -
 drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c   | 5 -----
 drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c   | 1 -
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c         | 6 ------
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c      | 1 -
 drivers/iio/imu/kmx61.c                            | 1 -
 7 files changed, 20 deletions(-)
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c +0 -5
index 8a6f09e68f49..11cab815e1e2 100644
@@ -289,7 +289,6 @@ static int inv_icm42600_accel_read_sensor(struct iio_dev *indio_dev,
 		ret = -EINVAL;
 exit:
 	mutex_unlock(&st->lock);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return ret;
 }
@@ -367,7 +366,6 @@ static int inv_icm42600_accel_write_scale(struct iio_dev *indio_dev,
 	ret = inv_icm42600_set_accel_conf(st, &conf, NULL);
 
 	mutex_unlock(&st->lock);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -471,7 +469,6 @@ static int inv_icm42600_accel_write_odr(struct iio_dev *indio_dev,
 
 out_unlock:
 	mutex_unlock(&st->lock);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -523,7 +520,6 @@ static int inv_icm42600_accel_read_offset(struct inv_icm42600_state *st,
 	memcpy(data, st->buffer, sizeof(data));
 
 	mutex_unlock(&st->lock);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	if (ret)
 		return ret;
@@ -661,7 +657,6 @@ static int inv_icm42600_accel_write_offset(struct inv_icm42600_state *st,
 
 out_unlock:
 	mutex_unlock(&st->lock);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return ret;
 }
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c +0 -1
index 00b9db52ca78..8c36ad87f328 100644
@@ -439,7 +439,6 @@ static int inv_icm42600_buffer_postdisable(struct iio_dev *indio_dev)
 	if (sleep)
 		msleep(sleep);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c +0 -5
index 9ba6f13628e6..8a7cc9127631 100644
@@ -184,7 +184,6 @@ static int inv_icm42600_gyro_read_sensor(struct inv_icm42600_state *st,
 		ret = -EINVAL;
 exit:
 	mutex_unlock(&st->lock);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return ret;
 }
@@ -283,7 +282,6 @@ static int inv_icm42600_gyro_write_scale(struct iio_dev *indio_dev,
 	ret = inv_icm42600_set_gyro_conf(st, &conf, NULL);
 
 	mutex_unlock(&st->lock);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -378,7 +376,6 @@ static int inv_icm42600_gyro_write_odr(struct iio_dev *indio_dev,
 
 out_unlock:
 	mutex_unlock(&st->lock);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -430,7 +427,6 @@ static int inv_icm42600_gyro_read_offset(struct inv_icm42600_state *st,
 	memcpy(data, st->buffer, sizeof(data));
 
 	mutex_unlock(&st->lock);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	if (ret)
 		return ret;
@@ -567,7 +563,6 @@ static int inv_icm42600_gyro_write_offset(struct inv_icm42600_state *st,
 
 out_unlock:
 	mutex_unlock(&st->lock);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return ret;
 }
drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c +0 -1
index 8b15afca498c..684007376178 100644
@@ -37,7 +37,6 @@ static int inv_icm42600_temp_read(struct inv_icm42600_state *st, s16 *temp)
 
 exit:
 	mutex_unlock(&st->lock);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +0 -6
index b8656c02354a..c351d0e4f810 100644
@@ -735,7 +735,6 @@ static int inv_mpu6050_read_channel_data(struct iio_dev *indio_dev,
 		break;
 	}
 
-	pm_runtime_mark_last_busy(pdev);
 	pm_runtime_put_autosuspend(pdev);
 
 	return ret;
@@ -938,7 +937,6 @@ static int inv_mpu6050_write_raw(struct iio_dev *indio_dev,
 		break;
 	}
 
-	pm_runtime_mark_last_busy(pdev);
 	pm_runtime_put_autosuspend(pdev);
 error_write_raw_unlock:
 	mutex_unlock(&st->lock);
@@ -1146,14 +1144,12 @@ static int inv_mpu6050_enable_wom(struct inv_mpu6050_state *st, bool en)
 			st->chip_config.wom_en = false;
 		}
 
-		pm_runtime_mark_last_busy(pdev);
 		pm_runtime_put_autosuspend(pdev);
 	}
 
 	return result;
 
 error_suspend:
-	pm_runtime_mark_last_busy(pdev);
 	pm_runtime_put_autosuspend(pdev);
 	return result;
 }
@@ -1249,7 +1245,6 @@ static int inv_mpu6050_write_event_value(struct iio_dev *indio_dev,
 	value = (u64)val * 1000000ULL + (u64)val2;
 	result = inv_mpu6050_set_wom_threshold(st, value, INV_MPU6050_FREQ_DIVIDER(st));
 
-	pm_runtime_mark_last_busy(pdev);
 	pm_runtime_put_autosuspend(pdev);
 
 	return result;
@@ -1357,7 +1352,6 @@ inv_mpu6050_fifo_rate_store(struct device *dev, struct device_attribute *attr,
 	if (result)
 		goto fifo_rate_fail_power_off;
 
-	pm_runtime_mark_last_busy(pdev);
 fifo_rate_fail_power_off:
 	pm_runtime_put_autosuspend(pdev);
 fifo_rate_fail_unlock:
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c +0 -1
index 5b1088cc3704..10a473342075 100644
@@ -194,7 +194,6 @@ static int inv_mpu6050_set_enable(struct iio_dev *indio_dev, bool enable)
 		result = inv_mpu6050_prepare_fifo(st, false);
 		if (result)
 			goto error_power_off;
-		pm_runtime_mark_last_busy(pdev);
 		pm_runtime_put_autosuspend(pdev);
 	}
 
drivers/iio/imu/kmx61.c +0 -1
index 55c82891e08c..42016d56c852 100644
@@ -750,7 +750,6 @@ static int kmx61_set_power_state(struct kmx61_data *data, bool on, u8 device)
 	if (on) {
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
-		pm_runtime_mark_last_busy(&data->client->dev);
 		ret = pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
Signature · 1 line
2.39.5
#66 lore raw

Re: [PATCH 33/80] iio: imu: Remove redundant pm_runtime_mark_last_busy() calls

On Fri, Jul 04, 2025 at 10:54 +0300 Sakari Ailus <[email protected]> wrote:

[...]

drivers/iio/imu/kmx61.c static int kmx61_set_power_state(struct kmx61_data *data, bool on, u8 device) · line 753

Quoted 10 lines
drivers/iio/imu/kmx61.c +0 -1
index 55c82891e08c..42016d56c852 100644
@@ -750,7 +750,6 @@ static int kmx61_set_power_state(struct kmx61_data *data, bool on, u8 device)
 	if (on) {
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
-		pm_runtime_mark_last_busy(&data->client->dev);
 		ret = pm_runtime_put_autosuspend(&data->client->dev);

As Jonathan mentioned in [PATCH 27/80], please run checkpatch.pl. It will tell you that the braces should be eliminated.

Quoted 2 lines
drivers/iio/imu/kmx61.c +0 -0
 	}
 	if (ret < 0) {
author maintainer
#67 lore raw

PATCH 34/80 iio: light: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/light/apds9306.c   | 2 --
 drivers/iio/light/apds9960.c   | 1 -
 drivers/iio/light/bh1780.c     | 1 -
 drivers/iio/light/gp2ap002.c   | 2 --
 drivers/iio/light/isl29028.c   | 1 -
 drivers/iio/light/ltrf216a.c   | 1 -
 drivers/iio/light/pa12203001.c | 1 -
 drivers/iio/light/rpr0521.c    | 1 -
 drivers/iio/light/tsl2583.c    | 1 -
 drivers/iio/light/tsl2591.c    | 2 --
 drivers/iio/light/us5182d.c    | 1 -
 drivers/iio/light/vcnl4000.c   | 1 -
 drivers/iio/light/vcnl4035.c   | 1 -
 13 files changed, 16 deletions(-)
drivers/iio/light/apds9306.c +0 -2
index f676da245aa7..5916cabd0755 100644
@@ -537,7 +537,6 @@ static int apds9306_read_data(struct apds9306_data *data, int *val, int reg)
 
 	*val = get_unaligned_le24(&buff);
 
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
@@ -1121,7 +1120,6 @@ static int apds9306_write_event_config(struct iio_dev *indio_dev,
 			if (ret)
 				return ret;
 
-			pm_runtime_mark_last_busy(data->dev);
 			pm_runtime_put_autosuspend(data->dev);
 
 			return 0;
drivers/iio/light/apds9960.c +0 -1
index b92d0fce5aec..79b202c59a0f 100644
@@ -495,7 +495,6 @@ static int apds9960_set_power_state(struct apds9960_data *data, bool on)
 			usleep_range(data->als_adc_int_us,
 				     APDS9960_MAX_INT_TIME_IN_US);
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}
 
drivers/iio/light/bh1780.c +0 -1
index c7c877d2fe67..5d3c6d5276ba 100644
@@ -111,7 +111,6 @@ static int bh1780_read_raw(struct iio_dev *indio_dev,
 			value = bh1780_read_word(bh1780, BH1780_REG_DLOW);
 			if (value < 0)
 				return value;
-			pm_runtime_mark_last_busy(&bh1780->client->dev);
 			pm_runtime_put_autosuspend(&bh1780->client->dev);
 			*val = value;
 
drivers/iio/light/gp2ap002.c +0 -2
index 42859e5b1089..a0d8a58f2704 100644
@@ -271,7 +271,6 @@ static int gp2ap002_read_raw(struct iio_dev *indio_dev,
 	}
 
 out:
-	pm_runtime_mark_last_busy(gp2ap002->dev);
 	pm_runtime_put_autosuspend(gp2ap002->dev);
 
 	return ret;
@@ -353,7 +352,6 @@ static int gp2ap002_write_event_config(struct iio_dev *indio_dev,
 		pm_runtime_get_sync(gp2ap002->dev);
 		gp2ap002->enabled = true;
 	} else {
-		pm_runtime_mark_last_busy(gp2ap002->dev);
 		pm_runtime_put_autosuspend(gp2ap002->dev);
 		gp2ap002->enabled = false;
 	}
drivers/iio/light/isl29028.c +0 -1
index 0e4284823d44..5ff20d423def 100644
@@ -341,7 +341,6 @@ static int isl29028_set_pm_runtime_busy(struct isl29028_chip *chip, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}
 
drivers/iio/light/ltrf216a.c +0 -1
index 61f57a82b872..5f27f754fe1c 100644
@@ -208,7 +208,6 @@ static int ltrf216a_set_power_state(struct ltrf216a_data *data, bool on)
 			return ret;
 		}
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 	}
 
drivers/iio/light/pa12203001.c +0 -1
index 8885852bef22..93823421f42f 100644
@@ -189,7 +189,6 @@ static int pa12203001_set_power_state(struct pa12203001_data *data, bool on,
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 
 	} else {
-		pm_runtime_mark_last_busy(&data->client->dev);
 		ret = pm_runtime_put_autosuspend(&data->client->dev);
 	}
 
drivers/iio/light/rpr0521.c +0 -1
index c50183f07240..15e2cca22e4d 100644
@@ -361,7 +361,6 @@ static int rpr0521_set_power_state(struct rpr0521_data *data, bool on,
 	if (on) {
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
-		pm_runtime_mark_last_busy(&data->client->dev);
 		ret = pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
drivers/iio/light/tsl2583.c +0 -1
index fc3b0c4226be..d3a4923e5adc 100644
@@ -646,7 +646,6 @@ static int tsl2583_set_pm_runtime_busy(struct tsl2583_chip *chip, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(&chip->client->dev);
 	} else {
-		pm_runtime_mark_last_busy(&chip->client->dev);
 		ret = pm_runtime_put_autosuspend(&chip->client->dev);
 	}
 
drivers/iio/light/tsl2591.c +0 -2
index 08476f193a44..c5557867ea43 100644
@@ -772,7 +772,6 @@ static int tsl2591_read_raw(struct iio_dev *indio_dev,
 err_unlock:
 	mutex_unlock(&chip->als_mutex);
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
@@ -995,7 +994,6 @@ static int tsl2591_write_event_config(struct iio_dev *indio_dev,
 		pm_runtime_get_sync(&client->dev);
 	} else if (!state && chip->events_enabled) {
 		chip->events_enabled = false;
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
drivers/iio/light/us5182d.c +0 -1
index 61a0957317a1..8f0f85e98f3a 100644
@@ -369,7 +369,6 @@ static int us5182d_set_power_state(struct us5182d_data *data, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
-		pm_runtime_mark_last_busy(&data->client->dev);
 		ret = pm_runtime_put_autosuspend(&data->client->dev);
 	}
 
drivers/iio/light/vcnl4000.c +0 -1
index 90e7d4421abf..39e2cf20038a 100644
@@ -581,7 +581,6 @@ static int vcnl4000_set_pm_runtime_state(struct vcnl4000_data *data, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}
 
drivers/iio/light/vcnl4035.c +0 -1
index 01bc99564f98..079fb49bf73b 100644
@@ -147,7 +147,6 @@ static int vcnl4035_set_pm_runtime_state(struct vcnl4035_data *data, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}
 
Signature · 1 line
2.39.5
Reviewed-by on v1 34/80
#68 lore raw

Re: [PATCH 34/80] iio: light: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Yours,
Linus Walleij

maintainer
#69 lore raw

Re: [PATCH 34/80] iio: light: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 11 lines · On Fri, 4 Jul 2025 10:54:24 +0300 Sakari Ailus <[email protected]>…

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

drivers/iio/light/isl29028.c +0 -0
index 0e4284823d44..5ff20d423def 100644

drivers/iio/light/isl29028.c static int isl29028_set_pm_runtime_busy(struct isl29028_chip *chip, bool on) · line 345

Quoted 6 lines
drivers/iio/light/isl29028.c +0 -1
@@ -341,7 +341,6 @@ static int isl29028_set_pm_runtime_busy(struct isl29028_chip *chip, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}

Drop {}

drivers/iio/light/pa12203001.c static int pa12203001_set_power_state(struct pa12203001_data *data, bool on, · line 190

Quoted 7 lines
drivers/iio/light/pa12203001.c +0 -0
index 8885852bef22..93823421f42f 100644
@@ -189,7 +189,6 @@ static int pa12203001_set_power_state(struct pa12203001_data *data, bool on,
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 

Whilst here drop this random blank line.

drivers/iio/light/pa12203001.c static int pa12203001_set_power_state(struct pa12203001_data *data, bool on, · line 193

Quoted 4 lines
drivers/iio/light/pa12203001.c +0 -1
 	} else {
-		pm_runtime_mark_last_busy(&data->client->dev);
 		ret = pm_runtime_put_autosuspend(&data->client->dev);
 	}

Drop {}

drivers/iio/light/rpr0521.c static int rpr0521_set_power_state(struct rpr0521_data *data, bool on, · line 365

Quoted 12 lines
drivers/iio/light/rpr0521.c +0 -1
index c50183f07240..15e2cca22e4d 100644
@@ -361,7 +361,6 @@ static int rpr0521_set_power_state(struct rpr0521_data *data, bool on,
 	if (on) {
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
-		pm_runtime_mark_last_busy(&data->client->dev);
 		ret = pm_runtime_put_autosuspend(&data->client->dev);
 	}

Drop {}

drivers/iio/light/tsl2583.c static int tsl2583_set_pm_runtime_busy(struct tsl2583_chip *chip, bool on) · line 650

Quoted 12 lines
drivers/iio/light/rpr0521.c +0 -0
 	if (ret < 0) {
drivers/iio/light/tsl2583.c +0 -1
index fc3b0c4226be..d3a4923e5adc 100644
@@ -646,7 +646,6 @@ static int tsl2583_set_pm_runtime_busy(struct tsl2583_chip *chip, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(&chip->client->dev);
 	} else {
-		pm_runtime_mark_last_busy(&chip->client->dev);
 		ret = pm_runtime_put_autosuspend(&chip->client->dev);
 	}

Drop {}

drivers/iio/light/us5182d.c static int us5182d_set_power_state(struct us5182d_data *data, bool on) · line 373

Quoted 13 lines
drivers/iio/light/us5182d.c +0 -1
index 61a0957317a1..8f0f85e98f3a 100644
@@ -369,7 +369,6 @@ static int us5182d_set_power_state(struct us5182d_data *data, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
-		pm_runtime_mark_last_busy(&data->client->dev);
 		ret = pm_runtime_put_autosuspend(&data->client->dev);
 	}

Drop {}

drivers/iio/light/vcnl4000.c static int vcnl4000_set_pm_runtime_state(struct vcnl4000_data *data, bool on) · line 585

Quoted 12 lines
drivers/iio/light/vcnl4000.c +0 -1
index 90e7d4421abf..39e2cf20038a 100644
@@ -581,7 +581,6 @@ static int vcnl4000_set_pm_runtime_state(struct vcnl4000_data *data, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}

Drop {}

drivers/iio/light/vcnl4035.c static int vcnl4035_set_pm_runtime_state(struct vcnl4035_data *data, bool on) · line 151

Quoted 12 lines
drivers/iio/light/vcnl4035.c +0 -1
index 01bc99564f98..079fb49bf73b 100644
@@ -147,7 +147,6 @@ static int vcnl4035_set_pm_runtime_state(struct vcnl4035_data *data, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
-		pm_runtime_mark_last_busy(dev);
 		ret = pm_runtime_put_autosuspend(dev);
 	}

Drop {}

Quoted 1 line
author maintainer
#70 lore raw

PATCH 35/80 iio: magnetometer: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/magnetometer/ak8974.c        | 2 --
 drivers/iio/magnetometer/ak8975.c        | 1 -
 drivers/iio/magnetometer/als31300.c      | 2 --
 drivers/iio/magnetometer/bmc150_magn.c   | 1 -
 drivers/iio/magnetometer/tmag5273.c      | 2 --
 drivers/iio/magnetometer/yamaha-yas530.c | 2 --
 6 files changed, 10 deletions(-)
drivers/iio/magnetometer/ak8974.c +0 -2
index 947fe8a475f2..68ece700c7ce 100644
@@ -583,7 +583,6 @@ static int ak8974_measure_channel(struct ak8974 *ak8974, unsigned long address,
 	*val = (s16)le16_to_cpu(hw_values[address]);
 out_unlock:
 	mutex_unlock(&ak8974->lock);
-	pm_runtime_mark_last_busy(&ak8974->i2c->dev);
 	pm_runtime_put_autosuspend(&ak8974->i2c->dev);
 
 	return ret;
@@ -678,7 +677,6 @@ static void ak8974_fill_buffer(struct iio_dev *indio_dev)
 
  out_unlock:
 	mutex_unlock(&ak8974->lock);
-	pm_runtime_mark_last_busy(&ak8974->i2c->dev);
 	pm_runtime_put_autosuspend(&ak8974->i2c->dev);
 }
 
drivers/iio/magnetometer/ak8975.c +0 -1
index a1e92b2abffd..3fd0171e5d69 100644
@@ -775,7 +775,6 @@ static int ak8975_read_axis(struct iio_dev *indio_dev, int index, int *val)
 
 	mutex_unlock(&data->lock);
 
-	pm_runtime_mark_last_busy(&data->client->dev);
 	pm_runtime_put_autosuspend(&data->client->dev);
 
 	/* Swap bytes and convert to valid range. */
drivers/iio/magnetometer/als31300.c +0 -2
index f72af829715f..03d060995ba6 100644
@@ -140,7 +140,6 @@ static int als31300_get_measure(struct als31300_data *data,
 	*z = ALS31300_DATA_Z_GET(buf);
 
 out:
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
@@ -401,7 +400,6 @@ static int als31300_probe(struct i2c_client *i2c)
 	pm_runtime_set_autosuspend_delay(dev, 200);
 	pm_runtime_use_autosuspend(dev);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	ret = devm_iio_device_register(dev, indio_dev);
drivers/iio/magnetometer/bmc150_magn.c +0 -1
index 761daead5ada..53d860e640a9 100644
@@ -263,7 +263,6 @@ static int bmc150_magn_set_power_state(struct bmc150_magn_data *data, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(data->dev);
 	} else {
-		pm_runtime_mark_last_busy(data->dev);
 		ret = pm_runtime_put_autosuspend(data->dev);
 	}
 
drivers/iio/magnetometer/tmag5273.c +0 -2
index 2ca5c26f0091..f9ef501249e3 100644
@@ -295,7 +295,6 @@ static int tmag5273_read_raw(struct iio_dev *indio_dev,
 
 		ret = tmag5273_get_measure(data, &t, &x, &y, &z, &angle, &magnitude);
 
-		pm_runtime_mark_last_busy(data->dev);
 		pm_runtime_put_autosuspend(data->dev);
 
 		if (ret)
@@ -668,7 +667,6 @@ static int tmag5273_probe(struct i2c_client *i2c)
 	indio_dev->channels = tmag5273_channels;
 	indio_dev->num_channels = ARRAY_SIZE(tmag5273_channels);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	ret = devm_iio_device_register(dev, indio_dev);
drivers/iio/magnetometer/yamaha-yas530.c +0 -2
index 340607111d9a..d49e37edcbed 100644
@@ -623,7 +623,6 @@ static int yas5xx_read_raw(struct iio_dev *indio_dev,
 	case IIO_CHAN_INFO_RAW:
 		pm_runtime_get_sync(yas5xx->dev);
 		ret = ci->get_measure(yas5xx, &t, &x, &y, &z);
-		pm_runtime_mark_last_busy(yas5xx->dev);
 		pm_runtime_put_autosuspend(yas5xx->dev);
 		if (ret)
 			return ret;
@@ -664,7 +663,6 @@ static void yas5xx_fill_buffer(struct iio_dev *indio_dev)
 
 	pm_runtime_get_sync(yas5xx->dev);
 	ret = ci->get_measure(yas5xx, &t, &x, &y, &z);
-	pm_runtime_mark_last_busy(yas5xx->dev);
 	pm_runtime_put_autosuspend(yas5xx->dev);
 	if (ret) {
 		dev_err(yas5xx->dev, "error refilling buffer\n");
Signature · 1 line
2.39.5
Reviewed-by on v1 35/80
#71 lore raw

Re: [PATCH 35/80] iio: magnetometer: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Yours,
Linus Walleij

maintainer
#72 lore raw

Re: [PATCH 35/80] iio: magnetometer: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 13 lines · On Fri, 4 Jul 2025 10:54:25 +0300 Sakari Ailus <[email protected]>…

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

drivers/iio/magnetometer/bmc150_magn.c +0 -0
index 761daead5ada..53d860e640a9 100644

drivers/iio/magnetometer/bmc150_magn.c static int bmc150_magn_set_power_state(struct bmc150_magn_data *data, bool on) · line 268

Quoted 7 lines
drivers/iio/magnetometer/bmc150_magn.c +0 -1
@@ -263,7 +263,6 @@ static int bmc150_magn_set_power_state(struct bmc150_magn_data *data, bool on)
 	if (on) {
 		ret = pm_runtime_resume_and_get(data->dev);
 	} else {
-		pm_runtime_mark_last_busy(data->dev);
 		ret = pm_runtime_put_autosuspend(data->dev);
 	}
 

Drop {} in both legs now neither has multiple lines.

author maintainer
#73 lore raw

PATCH 36/80 iio: pressure: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/pressure/bmp280-core.c | 5 -----
 drivers/iio/pressure/icp10100.c    | 1 -
 drivers/iio/pressure/mpl115.c      | 2 --
 drivers/iio/pressure/zpa2326.c     | 2 --
 4 files changed, 10 deletions(-)
drivers/iio/pressure/bmp280-core.c +0 -5
index 74505c9ec1a0..b66f3b905055 100644
@@ -752,7 +752,6 @@ static int bmp280_read_raw(struct iio_dev *indio_dev,
 
 	pm_runtime_get_sync(data->dev);
 	ret = bmp280_read_raw_impl(indio_dev, chan, val, val2, mask);
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
@@ -927,7 +926,6 @@ static int bmp280_write_raw(struct iio_dev *indio_dev,
 
 	pm_runtime_get_sync(data->dev);
 	ret = bmp280_write_raw_impl(indio_dev, chan, val, val2, mask);
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
@@ -2255,7 +2253,6 @@ static int bmp580_nvmem_read(void *priv, unsigned int offset, void *val,
 
 	pm_runtime_get_sync(data->dev);
 	ret = bmp580_nvmem_read_impl(priv, offset, val, bytes);
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
@@ -2330,7 +2327,6 @@ static int bmp580_nvmem_write(void *priv, unsigned int offset, void *val,
 
 	pm_runtime_get_sync(data->dev);
 	ret = bmp580_nvmem_write_impl(priv, offset, val, bytes);
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
@@ -3120,7 +3116,6 @@ static int bmp280_buffer_postdisable(struct iio_dev *indio_dev)
 {
 	struct bmp280_data *data = iio_priv(indio_dev);
 
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
drivers/iio/pressure/icp10100.c +0 -1
index 1951c1cc84cf..3d83d0098a57 100644
@@ -265,7 +265,6 @@ static int icp10100_get_measures(struct icp10100_state *st,
 			(be16_to_cpu(measures[1]) >> 8);
 	*temperature = be16_to_cpu(measures[2]);
 
-	pm_runtime_mark_last_busy(&st->client->dev);
 error_measure:
 	pm_runtime_put_autosuspend(&st->client->dev);
 	return ret;
drivers/iio/pressure/mpl115.c +0 -2
index 71beb28b7f2c..830a5065c008 100644
@@ -108,7 +108,6 @@ static int mpl115_read_raw(struct iio_dev *indio_dev,
 		ret = mpl115_comp_pressure(data, val, val2);
 		if (ret < 0)
 			return ret;
-		pm_runtime_mark_last_busy(data->dev);
 		pm_runtime_put_autosuspend(data->dev);
 
 		return IIO_VAL_INT_PLUS_MICRO;
@@ -118,7 +117,6 @@ static int mpl115_read_raw(struct iio_dev *indio_dev,
 		ret = mpl115_read_temp(data);
 		if (ret < 0)
 			return ret;
-		pm_runtime_mark_last_busy(data->dev);
 		pm_runtime_put_autosuspend(data->dev);
 		*val = ret >> 6;
 
drivers/iio/pressure/zpa2326.c +0 -2
index 6eef37c0952d..4923a558a26a 100644
@@ -697,7 +697,6 @@ static void zpa2326_suspend(struct iio_dev *indio_dev)
 
 	zpa2326_sleep(indio_dev);
 
-	pm_runtime_mark_last_busy(parent);
 	pm_runtime_put_autosuspend(parent);
 }
 
@@ -708,7 +707,6 @@ static void zpa2326_init_runtime(struct device *parent)
 	pm_runtime_enable(parent);
 	pm_runtime_set_autosuspend_delay(parent, 1000);
 	pm_runtime_use_autosuspend(parent);
-	pm_runtime_mark_last_busy(parent);
 	pm_runtime_put_autosuspend(parent);
 }
 
Signature · 1 line
2.39.5
author maintainer
#74 lore raw

PATCH 37/80 iio: proximity: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 1 -
 drivers/iio/proximity/srf04.c                     | 1 -
 2 files changed, 2 deletions(-)
drivers/iio/proximity/pulsedlight-lidar-lite-v2.c +0 -1
index 1deaf70e92ce..d53a596128f5 100644
@@ -191,7 +191,6 @@ static int lidar_get_measurement(struct lidar_data *data, u16 *reg)
 		}
 		ret = -EIO;
 	}
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
drivers/iio/proximity/srf04.c +0 -1
index b059bac1078b..f2e2c638a2b6 100644
@@ -118,7 +118,6 @@ static int srf04_read(struct srf04_data *data)
 	gpiod_set_value(data->gpiod_trig, 0);
 
 	if (data->gpiod_power) {
-		pm_runtime_mark_last_busy(data->dev);
 		pm_runtime_put_autosuspend(data->dev);
 	}
 
Signature · 1 line
2.39.5
maintainer
#75 lore raw

Re: [PATCH 37/80] iio: proximity: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 38 lines · On Fri, 4 Jul 2025 10:54:27 +0300 Sakari Ailus <[email protected]>…

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 1 -
 drivers/iio/proximity/srf04.c                     | 1 -
 2 files changed, 2 deletions(-)
drivers/iio/proximity/pulsedlight-lidar-lite-v2.c +0 -1
index 1deaf70e92ce..d53a596128f5 100644
@@ -191,7 +191,6 @@ static int lidar_get_measurement(struct lidar_data *data, u16 *reg)
 		}
 		ret = -EIO;
 	}
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
drivers/iio/proximity/srf04.c +0 -0
index b059bac1078b..f2e2c638a2b6 100644

drivers/iio/proximity/srf04.c static int srf04_read(struct srf04_data *data) · line 123

Quoted 7 lines
drivers/iio/proximity/srf04.c +0 -1
@@ -118,7 +118,6 @@ static int srf04_read(struct srf04_data *data)
 	gpiod_set_value(data->gpiod_trig, 0);
 
 	if (data->gpiod_power) {
-		pm_runtime_mark_last_busy(data->dev);
 		pm_runtime_put_autosuspend(data->dev);
 	}
 

Drop {}

author maintainer
#76 lore raw

PATCH 38/80 iio: temperature: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/temperature/mlx90614.c | 1 -
 drivers/iio/temperature/mlx90632.c | 1 -
 drivers/iio/temperature/mlx90635.c | 1 -
 3 files changed, 3 deletions(-)
drivers/iio/temperature/mlx90614.c +0 -1
index 740018d4b3df..8a44a00bfd5e 100644
@@ -225,7 +225,6 @@ static void mlx90614_power_put(struct mlx90614_data *data)
 	if (!data->wakeup_gpio)
 		return;
 
-	pm_runtime_mark_last_busy(&data->client->dev);
 	pm_runtime_put_autosuspend(&data->client->dev);
 }
 #else
drivers/iio/temperature/mlx90632.c +0 -1
index ae4ea587e7f9..bf689f6143f3 100644
@@ -1043,7 +1043,6 @@ static int mlx90632_read_raw(struct iio_dev *indio_dev,
 	}
 
 mlx90632_read_raw_pm:
-	pm_runtime_mark_last_busy(&data->client->dev);
 	pm_runtime_put_autosuspend(&data->client->dev);
 	return ret;
 }
drivers/iio/temperature/mlx90635.c +0 -1
index f7f88498ba0e..80d0eb7d2294 100644
@@ -749,7 +749,6 @@ static int mlx90635_read_raw(struct iio_dev *indio_dev,
 	}
 
 mlx90635_read_raw_pm:
-	pm_runtime_mark_last_busy(&data->client->dev);
 	pm_runtime_put_autosuspend(&data->client->dev);
 	return ret;
 }
Signature · 1 line
2.39.5
maintainer Acked-by on v1 38/80
#77 lore raw

Re: [PATCH 38/80] iio: temperature: Remove redundant pm_runtime_mark_last_busy() calls

If that is the case then:

Quoted 62 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/temperature/mlx90614.c | 1 -
 drivers/iio/temperature/mlx90632.c | 1 -
 drivers/iio/temperature/mlx90635.c | 1 -
 3 files changed, 3 deletions(-)
drivers/iio/temperature/mlx90614.c +0 -1
index 740018d4b3df..8a44a00bfd5e 100644
@@ -225,7 +225,6 @@ static void mlx90614_power_put(struct mlx90614_data *data)
        if (!data->wakeup_gpio)
                return;
 
-       pm_runtime_mark_last_busy(&data->client->dev);
        pm_runtime_put_autosuspend(&data->client->dev);
 }
 #else
drivers/iio/temperature/mlx90632.c +0 -1
index ae4ea587e7f9..bf689f6143f3 100644
@@ -1043,7 +1043,6 @@ static int mlx90632_read_raw(struct iio_dev *indio_dev,
        }
 
 mlx90632_read_raw_pm:
-       pm_runtime_mark_last_busy(&data->client->dev);
        pm_runtime_put_autosuspend(&data->client->dev);
        return ret;
 }
drivers/iio/temperature/mlx90635.c +0 -2
index f7f88498ba0e..80d0eb7d2294 100644
@@ -749,7 +749,6 @@ static int mlx90635_read_raw(struct iio_dev *indio_dev,
        }
 
 mlx90635_read_raw_pm:
-       pm_runtime_mark_last_busy(&data->client->dev);
        pm_runtime_put_autosuspend(&data->client->dev);
        return ret;
 }
--

2.39.5

maintainer
#78 lore raw

Re: [PATCH 38/80] iio: temperature: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 13 lines · On Fri, 4 Jul 2025 18:00:02 +0200 Crt Mori <[email protected]> wrote:

If that is the case then:

Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

No {} issues in here so applied to the testing branch of iio.git. I'll push it out as togreg later in the week at which point linux-next will see it.

Jonathan

Quoted 55 lines
Quoted 55 lines

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/temperature/mlx90614.c | 1 -
 drivers/iio/temperature/mlx90632.c | 1 -
 drivers/iio/temperature/mlx90635.c | 1 -
 3 files changed, 3 deletions(-)
drivers/iio/temperature/mlx90614.c +0 -1
index 740018d4b3df..8a44a00bfd5e 100644
@@ -225,7 +225,6 @@ static void mlx90614_power_put(struct mlx90614_data *data)
        if (!data->wakeup_gpio)
                return;
 
-       pm_runtime_mark_last_busy(&data->client->dev);
        pm_runtime_put_autosuspend(&data->client->dev);
 }
 #else
drivers/iio/temperature/mlx90632.c +0 -1
index ae4ea587e7f9..bf689f6143f3 100644
@@ -1043,7 +1043,6 @@ static int mlx90632_read_raw(struct iio_dev *indio_dev,
        }
 
 mlx90632_read_raw_pm:
-       pm_runtime_mark_last_busy(&data->client->dev);
        pm_runtime_put_autosuspend(&data->client->dev);
        return ret;
 }
drivers/iio/temperature/mlx90635.c +0 -2
index f7f88498ba0e..80d0eb7d2294 100644
@@ -749,7 +749,6 @@ static int mlx90635_read_raw(struct iio_dev *indio_dev,
        }
 
 mlx90635_read_raw_pm:
-       pm_runtime_mark_last_busy(&data->client->dev);
        pm_runtime_put_autosuspend(&data->client->dev);
        return ret;
 }
--

2.39.5

maintainer
#79 lore raw

Re: [PATCH 38/80] iio: temperature: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 15 lines · On Sun, 6 Jul 2025 11:25:02 +0100 Jonathan Cameron <[email protected]> wrote:
Quoted 12 lines · On Fri, 4 Jul 2025 18:00:02 +0200 Crt Mori <[email protected]> wrote:

If that is the case then:

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Quoted 5 lines
Quoted 1 line
Quoted 1 line

No {} issues in here so applied to the testing branch of iio.git. I'll push it out as togreg later in the week at which point linux-next will see it.

Actually - change of plan. I'll wait on your set with the others fixed up as I don't want to pull in the pm-runtime change if I'm only going to have a few of these ready by the end of the cycle. I don't mind merging that with the whole lot if they are ready though.

Jonathan

Quoted 58 lines

Jonathan

Quoted 55 lines
Quoted 55 lines

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/iio/temperature/mlx90614.c | 1 -
 drivers/iio/temperature/mlx90632.c | 1 -
 drivers/iio/temperature/mlx90635.c | 1 -
 3 files changed, 3 deletions(-)
drivers/iio/temperature/mlx90614.c +0 -1
index 740018d4b3df..8a44a00bfd5e 100644
@@ -225,7 +225,6 @@ static void mlx90614_power_put(struct mlx90614_data *data)
        if (!data->wakeup_gpio)
                return;
 
-       pm_runtime_mark_last_busy(&data->client->dev);
        pm_runtime_put_autosuspend(&data->client->dev);
 }
 #else
drivers/iio/temperature/mlx90632.c +0 -1
index ae4ea587e7f9..bf689f6143f3 100644
@@ -1043,7 +1043,6 @@ static int mlx90632_read_raw(struct iio_dev *indio_dev,
        }
 
 mlx90632_read_raw_pm:
-       pm_runtime_mark_last_busy(&data->client->dev);
        pm_runtime_put_autosuspend(&data->client->dev);
        return ret;
 }
drivers/iio/temperature/mlx90635.c +0 -2
index f7f88498ba0e..80d0eb7d2294 100644
@@ -749,7 +749,6 @@ static int mlx90635_read_raw(struct iio_dev *indio_dev,
        }
 
 mlx90635_read_raw_pm:
-       pm_runtime_mark_last_busy(&data->client->dev);
        pm_runtime_put_autosuspend(&data->client->dev);
        return ret;
 }
--

2.39.5

author maintainer
#80 lore raw

Re: [PATCH 38/80] iio: temperature: Remove redundant pm_runtime_mark_last_busy() calls

Hi Jonathan,

Quoted 19 lines · Jonathan Cameron
Quoted 16 lines · On Sun, 6 Jul 2025 11:25:02 +0100 Jonathan Cameron <[email protected]> wrote:
Quoted 13 lines · On Fri, 4 Jul 2025 18:00:02 +0200 Crt Mori <[email protected]> wrote:

If that is the case then:

Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Quoted 8 lines
Quoted 4 lines

No {} issues in here so applied to the testing branch of iio.git. I'll push it out as togreg later in the week at which point linux-next will see it.

Actually - change of plan. I'll wait on your set with the others fixed up as I don't want to pull in the pm-runtime change if I'm only going to have a few of these ready by the end of the cycle. I don't mind merging that with the whole lot if they are ready though.

Thanks for the review. I'll send v2 of the iio-related patches soonish.

Signature · 3 lines
Kind regards,

Sakari Ailus
author maintainer
#81 lore raw

PATCH 39/80 Input: omap4-keypad: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/input/keyboard/omap4-keypad.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/input/keyboard/omap4-keypad.c +0 -4
index bffe89c0717a..e783244d0c91 100644
@@ -193,7 +193,6 @@ static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
 	kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
 			 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return IRQ_HANDLED;
@@ -231,7 +230,6 @@ static int omap4_keypad_open(struct input_dev *input)
 	enable_irq(keypad_data->irq);
 
 out:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return error;
@@ -265,7 +263,6 @@ static void omap4_keypad_close(struct input_dev *input)
 	enable_irq(keypad_data->irq);
 	clk_disable_unprepare(keypad_data->fck);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 }
 
@@ -404,7 +401,6 @@ static int omap4_keypad_probe(struct platform_device *pdev)
 		omap4_keypad_stop(keypad_data);
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	if (error)
 		return error;
Signature · 1 line
2.39.5
author maintainer
#82 lore raw

PATCH 40/80 Input: cs40l50: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/input/misc/cs40l50-vibra.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/input/misc/cs40l50-vibra.c +0 -4
index dce3b0ec8cf3..c651a84a6335 100644
@@ -306,7 +306,6 @@ static void cs40l50_add_worker(struct work_struct *work)
 			list_add(&effect->list, &vib->effect_head);
 	}
 err_pm:
-	pm_runtime_mark_last_busy(vib->dev);
 	pm_runtime_put_autosuspend(vib->dev);
 err_exit:
 	work_data->error = error;
@@ -366,7 +365,6 @@ static void cs40l50_start_worker(struct work_struct *work)
 		dev_err(vib->dev, "Effect to play not found\n");
 	}
 
-	pm_runtime_mark_last_busy(vib->dev);
 	pm_runtime_put_autosuspend(vib->dev);
 err_free:
 	kfree(work_data);
@@ -382,7 +380,6 @@ static void cs40l50_stop_worker(struct work_struct *work)
 
 	vib->dsp.write(vib->dev, vib->regmap, vib->dsp.stop_cmd);
 
-	pm_runtime_mark_last_busy(vib->dev);
 	pm_runtime_put_autosuspend(vib->dev);
 
 	kfree(work_data);
@@ -454,7 +451,6 @@ static void cs40l50_erase_worker(struct work_struct *work)
 	list_del(&erase_effect->list);
 	kfree(erase_effect);
 err_pm:
-	pm_runtime_mark_last_busy(vib->dev);
 	pm_runtime_put_autosuspend(vib->dev);
 err_exit:
 	work_data->error = error;
Signature · 1 line
2.39.5
author maintainer
#83 lore raw

PATCH 41/80 media: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/media/i2c/alvium-csi2.c                          | 1 -
 drivers/media/i2c/ccs/ccs-core.c                         | 4 ----
 drivers/media/i2c/dw9768.c                               | 1 -
 drivers/media/i2c/gc0308.c                               | 3 ---
 drivers/media/i2c/gc2145.c                               | 3 ---
 drivers/media/i2c/imx219.c                               | 2 --
 drivers/media/i2c/imx283.c                               | 3 ---
 drivers/media/i2c/imx290.c                               | 3 ---
 drivers/media/i2c/imx296.c                               | 1 -
 drivers/media/i2c/imx415.c                               | 1 -
 drivers/media/i2c/mt9m114.c                              | 6 ------
 drivers/media/i2c/ov4689.c                               | 3 ---
 drivers/media/i2c/ov5640.c                               | 4 ----
 drivers/media/i2c/ov5645.c                               | 3 ---
 drivers/media/i2c/ov64a40.c                              | 4 ----
 drivers/media/i2c/ov8858.c                               | 2 --
 drivers/media/i2c/st-mipid02.c                           | 2 --
 drivers/media/i2c/tc358746.c                             | 5 -----
 drivers/media/i2c/thp7312.c                              | 4 ----
 drivers/media/i2c/vd55g1.c                               | 4 ----
 drivers/media/i2c/vd56g3.c                               | 4 ----
 drivers/media/i2c/video-i2c.c                            | 4 ----
 drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 4 ----
 drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 5 -----
 drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --
 drivers/media/platform/qcom/iris/iris_hfi_queue.c        | 1 -
 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c     | 2 --
 drivers/media/platform/verisilicon/hantro_drv.c          | 1 -
 drivers/media/rc/gpio-ir-recv.c                          | 1 -
 29 files changed, 83 deletions(-)
drivers/media/i2c/alvium-csi2.c +0 -1
index 05b708bd0a64..1f088acecf36 100644
@@ -1841,7 +1841,6 @@ static int alvium_s_stream(struct v4l2_subdev *sd, int enable)
 
 	} else {
 		alvium_set_stream_mipi(alvium, enable);
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
drivers/media/i2c/ccs/ccs-core.c +0 -4
index 487bcabb4a19..3316639b695e 100644
@@ -788,7 +788,6 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	if (pm_status > 0) {
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
@@ -1914,7 +1913,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
 	if (!enable) {
 		ccs_stop_streaming(sensor);
 		sensor->streaming = false;
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 
 		return 0;
@@ -1929,7 +1927,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
 	rval = ccs_start_streaming(sensor);
 	if (rval < 0) {
 		sensor->streaming = false;
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
@@ -2677,7 +2674,6 @@ nvm_show(struct device *dev, struct device_attribute *attr, char *buf)
 		return -ENODEV;
 	}
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	/*
drivers/media/i2c/dw9768.c +0 -1
index 3a4d100b9199..d434721ba8ed 100644
@@ -374,7 +374,6 @@ static int dw9768_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 
 static int dw9768_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 {
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_autosuspend(sd->dev);
 
 	return 0;
drivers/media/i2c/gc0308.c +0 -3
index 069f42785b3c..cbcda0e18ff1 100644
@@ -974,7 +974,6 @@ static int gc0308_s_ctrl(struct v4l2_ctrl *ctrl)
 	if (ret)
 		dev_err(gc0308->dev, "failed to set control: %d\n", ret);
 
-	pm_runtime_mark_last_busy(gc0308->dev);
 	pm_runtime_put_autosuspend(gc0308->dev);
 
 	return ret;
@@ -1157,14 +1156,12 @@ static int gc0308_start_stream(struct gc0308 *gc0308)
 	return 0;
 
 disable_pm:
-	pm_runtime_mark_last_busy(gc0308->dev);
 	pm_runtime_put_autosuspend(gc0308->dev);
 	return ret;
 }
 
 static int gc0308_stop_stream(struct gc0308 *gc0308)
 {
-	pm_runtime_mark_last_busy(gc0308->dev);
 	pm_runtime_put_autosuspend(gc0308->dev);
 	return 0;
 }
drivers/media/i2c/gc2145.c +0 -3
index ba02161d46e7..559a851669aa 100644
@@ -963,7 +963,6 @@ static int gc2145_enable_streams(struct v4l2_subdev *sd,
 	return 0;
 
 err_rpm_put:
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 	return ret;
 }
@@ -985,7 +984,6 @@ static int gc2145_disable_streams(struct v4l2_subdev *sd,
 	if (ret)
 		dev_err(&client->dev, "%s failed to write regs\n", __func__);
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
@@ -1193,7 +1191,6 @@ static int gc2145_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
drivers/media/i2c/imx219.c +0 -2
index 3b4f68543342..3faf48f34af4 100644
@@ -771,7 +771,6 @@ static int imx219_enable_streams(struct v4l2_subdev *sd,
 	return 0;
 
 err_rpm_put:
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 	return ret;
 }
@@ -793,7 +792,6 @@ static int imx219_disable_streams(struct v4l2_subdev *sd,
 	__v4l2_ctrl_grab(imx219->vflip, false);
 	__v4l2_ctrl_grab(imx219->hflip, false);
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
drivers/media/i2c/imx283.c +0 -3
index da618c8cbadc..67e8bb432d10 100644
@@ -1143,7 +1143,6 @@ static int imx283_enable_streams(struct v4l2_subdev *sd,
 	return 0;
 
 err_rpm_put:
-	pm_runtime_mark_last_busy(imx283->dev);
 	pm_runtime_put_autosuspend(imx283->dev);
 
 	return ret;
@@ -1163,7 +1162,6 @@ static int imx283_disable_streams(struct v4l2_subdev *sd,
 	if (ret)
 		dev_err(imx283->dev, "Failed to stop stream\n");
 
-	pm_runtime_mark_last_busy(imx283->dev);
 	pm_runtime_put_autosuspend(imx283->dev);
 
 	return ret;
@@ -1558,7 +1556,6 @@ static int imx283_probe(struct i2c_client *client)
 	 * Decrease the PM usage count. The device will get suspended after the
 	 * autosuspend delay, turning the power off.
 	 */
-	pm_runtime_mark_last_busy(imx283->dev);
 	pm_runtime_put_autosuspend(imx283->dev);
 
 	return 0;
drivers/media/i2c/imx290.c +0 -3
index fbf7eba3d71d..970a8d89a3e7 100644
@@ -869,7 +869,6 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(imx290->dev);
 	pm_runtime_put_autosuspend(imx290->dev);
 
 	return ret;
@@ -1099,7 +1098,6 @@ static int imx290_set_stream(struct v4l2_subdev *sd, int enable)
 		}
 	} else {
 		imx290_stop_streaming(imx290);
-		pm_runtime_mark_last_busy(imx290->dev);
 		pm_runtime_put_autosuspend(imx290->dev);
 	}
 
@@ -1295,7 +1293,6 @@ static int imx290_subdev_init(struct imx290 *imx290)
 	 */
 	v4l2_i2c_subdev_init(&imx290->sd, client, &imx290_subdev_ops);
 	imx290->sd.dev = imx290->dev;
-	pm_runtime_mark_last_busy(imx290->dev);
 	pm_runtime_put_autosuspend(imx290->dev);
 
 	imx290->sd.internal_ops = &imx290_internal_ops;
drivers/media/i2c/imx296.c +0 -1
index f3bec16b527c..61116f4e3f76 100644
@@ -604,7 +604,6 @@ static int imx296_s_stream(struct v4l2_subdev *sd, int enable)
 	if (!enable) {
 		ret = imx296_stream_off(sensor);
 
-		pm_runtime_mark_last_busy(sensor->dev);
 		pm_runtime_put_autosuspend(sensor->dev);
 
 		goto unlock;
drivers/media/i2c/imx415.c +0 -1
index 278e743646ea..276bf4d6f39d 100644
@@ -952,7 +952,6 @@ static int imx415_s_stream(struct v4l2_subdev *sd, int enable)
 	if (!enable) {
 		ret = imx415_stream_off(sensor);
 
-		pm_runtime_mark_last_busy(sensor->dev);
 		pm_runtime_put_autosuspend(sensor->dev);
 
 		goto unlock;
drivers/media/i2c/mt9m114.c +0 -6
index 3f540ca40f3c..aa3fd6c6c76c 100644
@@ -974,7 +974,6 @@ static int mt9m114_start_streaming(struct mt9m114 *sensor,
 	return 0;
 
 error:
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -988,7 +987,6 @@ static int mt9m114_stop_streaming(struct mt9m114 *sensor)
 
 	ret = mt9m114_set_state(sensor, MT9M114_SYS_STATE_ENTER_SUSPEND);
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -1046,7 +1044,6 @@ static int mt9m114_pa_g_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -1113,7 +1110,6 @@ static int mt9m114_pa_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -1565,7 +1561,6 @@ static int mt9m114_ifp_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -2472,7 +2467,6 @@ static int mt9m114_probe(struct i2c_client *client)
 	 * Decrease the PM usage count. The device will get suspended after the
 	 * autosuspend delay, turning the power off.
 	 */
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/media/i2c/ov4689.c +0 -3
index 1c3a449f9354..7d740ad3926f 100644
@@ -497,7 +497,6 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
 	} else {
 		cci_write(ov4689->regmap, OV4689_REG_CTRL_MODE,
 			  OV4689_MODE_SW_STANDBY, NULL);
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 	}
 
@@ -702,7 +701,6 @@ static int ov4689_set_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -999,7 +997,6 @@ static int ov4689_probe(struct i2c_client *client)
 		goto err_clean_subdev_pm;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/media/i2c/ov5640.c +0 -4
index 0dae0438aa80..84198613381d 100644
@@ -3341,7 +3341,6 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
 	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
 	return 0;
@@ -3417,7 +3416,6 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
 	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
 	return ret;
@@ -3754,7 +3752,6 @@ static int ov5640_s_stream(struct v4l2_subdev *sd, int enable)
 	mutex_unlock(&sensor->lock);
 
 	if (!enable || ret) {
-		pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
 		pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 	}
 
@@ -3965,7 +3962,6 @@ static int ov5640_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(dev, 1000);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/media/i2c/ov5645.c +0 -3
index 004d0ee5c3f5..58c846a44376 100644
@@ -808,7 +808,6 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(ov5645->dev);
 	pm_runtime_put_autosuspend(ov5645->dev);
 
 	return ret;
@@ -979,7 +978,6 @@ static int ov5645_disable_streams(struct v4l2_subdev *sd,
 			       OV5645_SYSTEM_CTRL0_STOP);
 
 rpm_put:
-	pm_runtime_mark_last_busy(ov5645->dev);
 	pm_runtime_put_autosuspend(ov5645->dev);
 
 	return ret;
@@ -1196,7 +1194,6 @@ static int ov5645_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(dev, 1000);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/media/i2c/ov64a40.c +0 -4
index a5da4fe47e0b..15912ecb8d26 100644
@@ -2990,7 +2990,6 @@ static int ov64a40_start_streaming(struct ov64a40 *ov64a40,
 	return 0;
 
 error_power_off:
-	pm_runtime_mark_last_busy(ov64a40->dev);
 	pm_runtime_put_autosuspend(ov64a40->dev);
 
 	return ret;
@@ -3000,7 +2999,6 @@ static int ov64a40_stop_streaming(struct ov64a40 *ov64a40,
 				  struct v4l2_subdev_state *state)
 {
 	cci_update_bits(ov64a40->cci, OV64A40_REG_SMIA, BIT(0), 0, NULL);
-	pm_runtime_mark_last_busy(ov64a40->dev);
 	pm_runtime_put_autosuspend(ov64a40->dev);
 
 	__v4l2_ctrl_grab(ov64a40->link_freq, false);
@@ -3330,7 +3328,6 @@ static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	if (pm_status > 0) {
-		pm_runtime_mark_last_busy(ov64a40->dev);
 		pm_runtime_put_autosuspend(ov64a40->dev);
 	}
 
@@ -3622,7 +3619,6 @@ static int ov64a40_probe(struct i2c_client *client)
 		goto error_subdev_cleanup;
 	}
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
drivers/media/i2c/ov8858.c +0 -2
index 95f9ae794846..6b7193eaea1f 100644
@@ -1391,7 +1391,6 @@ static int ov8858_s_stream(struct v4l2_subdev *sd, int on)
 		}
 	} else {
 		ov8858_stop_stream(ov8858);
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
@@ -1945,7 +1944,6 @@ static int ov8858_probe(struct i2c_client *client)
 		goto err_power_off;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/media/i2c/st-mipid02.c +0 -2
index f4568e87f018..41ae25b0911f 100644
@@ -465,7 +465,6 @@ static int mipid02_disable_streams(struct v4l2_subdev *sd,
 	if (ret)
 		goto error;
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 error:
@@ -542,7 +541,6 @@ static int mipid02_enable_streams(struct v4l2_subdev *sd,
 	cci_write(bridge->regmap, MIPID02_DATA_LANE0_REG1, 0, &ret);
 	cci_write(bridge->regmap, MIPID02_DATA_LANE1_REG1, 0, &ret);
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 	return ret;
 }
drivers/media/i2c/tc358746.c +0 -5
index 143aa1359aba..bcfc274cf891 100644
@@ -816,7 +816,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
 		return 0;
 
 err_out:
-		pm_runtime_mark_last_busy(sd->dev);
 		pm_runtime_put_sync_autosuspend(sd->dev);
 
 		return err;
@@ -838,7 +837,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
 	if (err)
 		return err;
 
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_sync_autosuspend(sd->dev);
 
 	return v4l2_subdev_call(src, video, s_stream, 0);
@@ -1016,7 +1014,6 @@ tc358746_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 	err = tc358746_read(tc358746, reg->reg, &val);
 	reg->val = val;
 
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_sync_autosuspend(sd->dev);
 
 	return err;
@@ -1032,7 +1029,6 @@ tc358746_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 
 	tc358746_write(tc358746, (u32)reg->reg, (u32)reg->val);
 
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_sync_autosuspend(sd->dev);
 
 	return 0;
@@ -1395,7 +1391,6 @@ static int tc358746_init_hw(struct tc358746 *tc358746)
 	}
 
 	err = tc358746_read(tc358746, CHIPID_REG, &val);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_sync_autosuspend(dev);
 	if (err)
 		return -ENODEV;
drivers/media/i2c/thp7312.c +0 -4
index 8852c56431fe..775cfba188d8 100644
@@ -808,7 +808,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
 	if (!enable) {
 		thp7312_stream_enable(thp7312, false);
 
-		pm_runtime_mark_last_busy(thp7312->dev);
 		pm_runtime_put_autosuspend(thp7312->dev);
 
 		v4l2_subdev_unlock_state(sd_state);
@@ -839,7 +838,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
 	goto finish_unlock;
 
 finish_pm:
-	pm_runtime_mark_last_busy(thp7312->dev);
 	pm_runtime_put_autosuspend(thp7312->dev);
 finish_unlock:
 	v4l2_subdev_unlock_state(sd_state);
@@ -1147,7 +1145,6 @@ static int thp7312_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(thp7312->dev);
 	pm_runtime_put_autosuspend(thp7312->dev);
 
 	return ret;
@@ -2183,7 +2180,6 @@ static int thp7312_probe(struct i2c_client *client)
 	 * Decrease the PM usage count. The device will get suspended after the
 	 * autosuspend delay, turning the power off.
 	 */
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	dev_info(dev, "THP7312 firmware version %02u.%02u\n",
drivers/media/i2c/vd55g1.c +0 -4
index c0754fd03b1d..7c39183dd44b 100644
@@ -1104,7 +1104,6 @@ static int vd55g1_disable_streams(struct v4l2_subdev *sd,
 
 	vd55g1_grab_ctrls(sensor, false);
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1338,7 +1337,6 @@ static int vd55g1_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1433,7 +1431,6 @@ static int vd55g1_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1895,7 +1892,6 @@ static int vd55g1_probe(struct i2c_client *client)
 	pm_runtime_enable(dev);
 	pm_runtime_set_autosuspend_delay(dev, 4000);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	ret = vd55g1_subdev_init(sensor);
drivers/media/i2c/vd56g3.c +0 -4
index 5d951ad0b478..d66e21ba4498 100644
@@ -493,7 +493,6 @@ static int vd56g3_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -577,7 +576,6 @@ static int vd56g3_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1021,7 +1019,6 @@ static int vd56g3_disable_streams(struct v4l2_subdev *sd,
 	__v4l2_ctrl_grab(sensor->vflip_ctrl, false);
 	__v4l2_ctrl_grab(sensor->patgen_ctrl, false);
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1527,7 +1524,6 @@ static int vd56g3_probe(struct i2c_client *client)
 	}
 
 	/* Sensor could now be powered off (after the autosuspend delay) */
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	dev_dbg(dev, "Successfully probe %s sensor\n",
drivers/media/i2c/video-i2c.c +0 -4
index 0dd991d70d53..1eee2d4f5b40 100644
@@ -288,7 +288,6 @@ static int amg88xx_read(struct device *dev, enum hwmon_sensor_types type,
 		return tmp;
 
 	tmp = regmap_bulk_read(data->regmap, AMG88XX_REG_TTHL, &buf, 2);
-	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
 	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 	if (tmp)
 		return tmp;
@@ -527,7 +526,6 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
 		return 0;
 
 error_rpm_put:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 error_del_list:
 	video_i2c_del_list(vq, VB2_BUF_STATE_QUEUED);
@@ -544,7 +542,6 @@ static void stop_streaming(struct vb2_queue *vq)
 
 	kthread_stop(data->kthread_vid_cap);
 	data->kthread_vid_cap = NULL;
-	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
 	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 
 	video_i2c_del_list(vq, VB2_BUF_STATE_ERROR);
@@ -853,7 +850,6 @@ static int video_i2c_probe(struct i2c_client *client)
 	if (ret < 0)
 		goto error_pm_disable;
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c +0 -4
index fd71f0c43ac3..a9ce032cc5a2 100644
@@ -451,7 +451,6 @@ static void wave5_vpu_dec_finish_decode(struct vpu_instance *inst)
 	if (q_status.report_queue_count == 0 &&
 	    (q_status.instance_queue_count == 0 || dec_info.sequence_changed)) {
 		dev_dbg(inst->dev->dev, "%s: finishing job.\n", __func__);
-		pm_runtime_mark_last_busy(inst->dev->dev);
 		pm_runtime_put_autosuspend(inst->dev->dev);
 		v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
 	}
@@ -1364,7 +1363,6 @@ static int wave5_vpu_dec_start_streaming(struct vb2_queue *q, unsigned int count
 		}
 
 	}
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	return ret;
 
@@ -1498,7 +1496,6 @@ static void wave5_vpu_dec_stop_streaming(struct vb2_queue *q)
 	else
 		streamoff_capture(q);
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 }
 
@@ -1662,7 +1659,6 @@ static void wave5_vpu_dec_device_run(void *priv)
 
 finish_job_and_return:
 	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
 }
drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c +0 -5
index 1e5fc5f8b856..35913a7de834 100644
@@ -1391,12 +1391,10 @@ static int wave5_vpu_enc_start_streaming(struct vb2_queue *q, unsigned int count
 	if (ret)
 		goto return_buffers;
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	return 0;
 return_buffers:
 	wave5_return_bufs(q, VB2_BUF_STATE_QUEUED);
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	return ret;
 }
@@ -1465,7 +1463,6 @@ static void wave5_vpu_enc_stop_streaming(struct vb2_queue *q)
 	else
 		streamoff_capture(inst, q);
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 }
 
@@ -1520,7 +1517,6 @@ static void wave5_vpu_enc_device_run(void *priv)
 			break;
 		}
 		dev_dbg(inst->dev->dev, "%s: leave with active job", __func__);
-		pm_runtime_mark_last_busy(inst->dev->dev);
 		pm_runtime_put_autosuspend(inst->dev->dev);
 		return;
 	default:
@@ -1529,7 +1525,6 @@ static void wave5_vpu_enc_device_run(void *priv)
 		break;
 	}
 	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
 }
drivers/media/platform/nvidia/tegra-vde/h264.c +0 -2
index 0e56a4331b0d..45f8f6904867 100644
@@ -585,7 +585,6 @@ static int tegra_vde_decode_begin(struct tegra_vde *vde,
 	return 0;
 
 put_runtime_pm:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 unlock:
@@ -612,7 +611,6 @@ static void tegra_vde_decode_abort(struct tegra_vde *vde)
 	if (err)
 		dev_err(dev, "DEC end: Failed to assert HW reset: %d\n", err);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	mutex_unlock(&vde->lock);
drivers/media/platform/qcom/iris/iris_hfi_queue.c +0 -1
index fac7df0c4d1a..0b37f9b76da5 100644
@@ -142,7 +142,6 @@ int iris_hfi_queue_cmd_write(struct iris_core *core, void *pkt, u32 pkt_size)
 	}
 	mutex_unlock(&core->lock);
 
-	pm_runtime_mark_last_busy(core->dev);
 	pm_runtime_put_autosuspend(core->dev);
 
 	return 0;
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c +0 -2
index 7596ae1f7de6..8a10a36abbc2 100644
@@ -951,7 +951,6 @@ static void pispbe_node_stop_streaming(struct vb2_queue *q)
 	pispbe->streaming_map &= ~BIT(node->id);
 	spin_unlock_irqrestore(&pispbe->hw_lock, flags);
 
-	pm_runtime_mark_last_busy(pispbe->dev);
 	pm_runtime_put_autosuspend(pispbe->dev);
 
 	dev_dbg(pispbe->dev, "Nodes streaming now 0x%x\n",
@@ -1740,7 +1739,6 @@ static int pispbe_probe(struct platform_device *pdev)
 	if (ret)
 		goto disable_devs_err;
 
-	pm_runtime_mark_last_busy(pispbe->dev);
 	pm_runtime_put_autosuspend(pispbe->dev);
 
 	return 0;
drivers/media/platform/verisilicon/hantro_drv.c +0 -1
index 8542238e0fb1..fa972effd4a2 100644
@@ -89,7 +89,6 @@ static void hantro_job_finish(struct hantro_dev *vpu,
 			      struct hantro_ctx *ctx,
 			      enum vb2_buffer_state result)
 {
-	pm_runtime_mark_last_busy(vpu->dev);
 	pm_runtime_put_autosuspend(vpu->dev);
 
 	clk_bulk_disable(vpu->variant->num_clocks, vpu->clocks);
drivers/media/rc/gpio-ir-recv.c +0 -1
index bf6d8fa983bf..161f8919022c 100644
@@ -49,7 +49,6 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
 		ir_raw_event_store_edge(gpio_dev->rcdev, val == 1);
 
 	if (pmdev) {
-		pm_runtime_mark_last_busy(pmdev);
 		pm_runtime_put_autosuspend(pmdev);
 	}
 
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 41/80
#84 lore raw

Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls

Hi Sakari,

Quoted 47 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/media/i2c/alvium-csi2.c                          | 1 -
 drivers/media/i2c/ccs/ccs-core.c                         | 4 ----
 drivers/media/i2c/dw9768.c                               | 1 -
 drivers/media/i2c/gc0308.c                               | 3 ---
 drivers/media/i2c/gc2145.c                               | 3 ---
 drivers/media/i2c/imx219.c                               | 2 --
 drivers/media/i2c/imx283.c                               | 3 ---
 drivers/media/i2c/imx290.c                               | 3 ---
 drivers/media/i2c/imx296.c                               | 1 -
 drivers/media/i2c/imx415.c                               | 1 -
 drivers/media/i2c/mt9m114.c                              | 6 ------
 drivers/media/i2c/ov4689.c                               | 3 ---
 drivers/media/i2c/ov5640.c                               | 4 ----
 drivers/media/i2c/ov5645.c                               | 3 ---
 drivers/media/i2c/ov64a40.c                              | 4 ----
 drivers/media/i2c/ov8858.c                               | 2 --
 drivers/media/i2c/st-mipid02.c                           | 2 --
 drivers/media/i2c/tc358746.c                             | 5 -----
 drivers/media/i2c/thp7312.c                              | 4 ----
 drivers/media/i2c/vd55g1.c                               | 4 ----
 drivers/media/i2c/vd56g3.c                               | 4 ----
 drivers/media/i2c/video-i2c.c                            | 4 ----
 drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 4 ----
 drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 5 -----
 drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --
 drivers/media/platform/qcom/iris/iris_hfi_queue.c        | 1 -
 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c     | 2 --
 drivers/media/platform/verisilicon/hantro_drv.c          | 1 -
 drivers/media/rc/gpio-ir-recv.c                          | 1 -
 29 files changed, 83 deletions(-)

[snip]

drivers/media/i2c/ccs/ccs-core.c static int ccs_set_ctrl(struct v4l2_ctrl *ctrl) · line 792

Quoted 11 lines
drivers/media/i2c/ccs/ccs-core.c +0 -1
index 487bcabb4a19..3316639b695e 100644
@@ -788,7 +788,6 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	if (pm_status > 0) {
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}

You can now drop the curly braces.

Quoted 1 line

[snip]

Quoted 4 lines
drivers/media/i2c/ov64a40.c +0 -0
index a5da4fe47e0b..15912ecb8d26 100644

[snip]

drivers/media/i2c/ov64a40.c static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl) · line 3332

Quoted 7 lines
drivers/media/i2c/ov64a40.c +0 -1
@@ -3330,7 +3328,6 @@ static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	if (pm_status > 0) {
-		pm_runtime_mark_last_busy(ov64a40->dev);
 		pm_runtime_put_autosuspend(ov64a40->dev);
 	}

Same here.

Quoted 1 line

[snip]

drivers/media/rc/gpio-ir-recv.c static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id) · line 53

Quoted 11 lines
drivers/media/rc/gpio-ir-recv.c +0 -1
index bf6d8fa983bf..161f8919022c 100644
@@ -49,7 +49,6 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
 		ir_raw_event_store_edge(gpio_dev->rcdev, val == 1);
 
 	if (pmdev) {
-		pm_runtime_mark_last_busy(pmdev);
 		pm_runtime_put_autosuspend(pmdev);
 	}

And here too.

With that,

Quoted 1 line
Signature · 3 lines
Regards,

Laurent Pinchart
Acked-by on v1 41/80
#85 lore raw

Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

[...]

Quoted 1 line
 drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --

[...]

Acked-by on v1 41/80
#86 lore raw

Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

Hi Sakari,
Thanks for your patch!

Quoted 10 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

Quoted 8 lines

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/media/i2c/alvium-csi2.c                          | 1 -

Thanks & Regards,
Tommaso

Quoted 809 lines
 drivers/media/i2c/ccs/ccs-core.c                         | 4 ----
 drivers/media/i2c/dw9768.c                               | 1 -
 drivers/media/i2c/gc0308.c                               | 3 ---
 drivers/media/i2c/gc2145.c                               | 3 ---
 drivers/media/i2c/imx219.c                               | 2 --
 drivers/media/i2c/imx283.c                               | 3 ---
 drivers/media/i2c/imx290.c                               | 3 ---
 drivers/media/i2c/imx296.c                               | 1 -
 drivers/media/i2c/imx415.c                               | 1 -
 drivers/media/i2c/mt9m114.c                              | 6 ------
 drivers/media/i2c/ov4689.c                               | 3 ---
 drivers/media/i2c/ov5640.c                               | 4 ----
 drivers/media/i2c/ov5645.c                               | 3 ---
 drivers/media/i2c/ov64a40.c                              | 4 ----
 drivers/media/i2c/ov8858.c                               | 2 --
 drivers/media/i2c/st-mipid02.c                           | 2 --
 drivers/media/i2c/tc358746.c                             | 5 -----
 drivers/media/i2c/thp7312.c                              | 4 ----
 drivers/media/i2c/vd55g1.c                               | 4 ----
 drivers/media/i2c/vd56g3.c                               | 4 ----
 drivers/media/i2c/video-i2c.c                            | 4 ----
 drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 4 ----
 drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 5 -----
 drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --
 drivers/media/platform/qcom/iris/iris_hfi_queue.c        | 1 -
 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c     | 2 --
 drivers/media/platform/verisilicon/hantro_drv.c          | 1 -
 drivers/media/rc/gpio-ir-recv.c                          | 1 -
 29 files changed, 83 deletions(-)
drivers/media/i2c/alvium-csi2.c +0 -1
index 05b708bd0a64..1f088acecf36 100644
@@ -1841,7 +1841,6 @@ static int alvium_s_stream(struct v4l2_subdev *sd, int enable)
 
 	} else {
 		alvium_set_stream_mipi(alvium, enable);
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
drivers/media/i2c/ccs/ccs-core.c +0 -4
index 487bcabb4a19..3316639b695e 100644
@@ -788,7 +788,6 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	if (pm_status > 0) {
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
@@ -1914,7 +1913,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
 	if (!enable) {
 		ccs_stop_streaming(sensor);
 		sensor->streaming = false;
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 
 		return 0;
@@ -1929,7 +1927,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
 	rval = ccs_start_streaming(sensor);
 	if (rval < 0) {
 		sensor->streaming = false;
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
@@ -2677,7 +2674,6 @@ nvm_show(struct device *dev, struct device_attribute *attr, char *buf)
 		return -ENODEV;
 	}
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	/*
drivers/media/i2c/dw9768.c +0 -1
index 3a4d100b9199..d434721ba8ed 100644
@@ -374,7 +374,6 @@ static int dw9768_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 
 static int dw9768_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 {
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_autosuspend(sd->dev);
 
 	return 0;
drivers/media/i2c/gc0308.c +0 -3
index 069f42785b3c..cbcda0e18ff1 100644
@@ -974,7 +974,6 @@ static int gc0308_s_ctrl(struct v4l2_ctrl *ctrl)
 	if (ret)
 		dev_err(gc0308->dev, "failed to set control: %d\n", ret);
 
-	pm_runtime_mark_last_busy(gc0308->dev);
 	pm_runtime_put_autosuspend(gc0308->dev);
 
 	return ret;
@@ -1157,14 +1156,12 @@ static int gc0308_start_stream(struct gc0308 *gc0308)
 	return 0;
 
 disable_pm:
-	pm_runtime_mark_last_busy(gc0308->dev);
 	pm_runtime_put_autosuspend(gc0308->dev);
 	return ret;
 }
 
 static int gc0308_stop_stream(struct gc0308 *gc0308)
 {
-	pm_runtime_mark_last_busy(gc0308->dev);
 	pm_runtime_put_autosuspend(gc0308->dev);
 	return 0;
 }
drivers/media/i2c/gc2145.c +0 -3
index ba02161d46e7..559a851669aa 100644
@@ -963,7 +963,6 @@ static int gc2145_enable_streams(struct v4l2_subdev *sd,
 	return 0;
 
 err_rpm_put:
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 	return ret;
 }
@@ -985,7 +984,6 @@ static int gc2145_disable_streams(struct v4l2_subdev *sd,
 	if (ret)
 		dev_err(&client->dev, "%s failed to write regs\n", __func__);
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
@@ -1193,7 +1191,6 @@ static int gc2145_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
drivers/media/i2c/imx219.c +0 -2
index 3b4f68543342..3faf48f34af4 100644
@@ -771,7 +771,6 @@ static int imx219_enable_streams(struct v4l2_subdev *sd,
 	return 0;
 
 err_rpm_put:
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 	return ret;
 }
@@ -793,7 +792,6 @@ static int imx219_disable_streams(struct v4l2_subdev *sd,
 	__v4l2_ctrl_grab(imx219->vflip, false);
 	__v4l2_ctrl_grab(imx219->hflip, false);
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
drivers/media/i2c/imx283.c +0 -3
index da618c8cbadc..67e8bb432d10 100644
@@ -1143,7 +1143,6 @@ static int imx283_enable_streams(struct v4l2_subdev *sd,
 	return 0;
 
 err_rpm_put:
-	pm_runtime_mark_last_busy(imx283->dev);
 	pm_runtime_put_autosuspend(imx283->dev);
 
 	return ret;
@@ -1163,7 +1162,6 @@ static int imx283_disable_streams(struct v4l2_subdev *sd,
 	if (ret)
 		dev_err(imx283->dev, "Failed to stop stream\n");
 
-	pm_runtime_mark_last_busy(imx283->dev);
 	pm_runtime_put_autosuspend(imx283->dev);
 
 	return ret;
@@ -1558,7 +1556,6 @@ static int imx283_probe(struct i2c_client *client)
 	 * Decrease the PM usage count. The device will get suspended after the
 	 * autosuspend delay, turning the power off.
 	 */
-	pm_runtime_mark_last_busy(imx283->dev);
 	pm_runtime_put_autosuspend(imx283->dev);
 
 	return 0;
drivers/media/i2c/imx290.c +0 -3
index fbf7eba3d71d..970a8d89a3e7 100644
@@ -869,7 +869,6 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(imx290->dev);
 	pm_runtime_put_autosuspend(imx290->dev);
 
 	return ret;
@@ -1099,7 +1098,6 @@ static int imx290_set_stream(struct v4l2_subdev *sd, int enable)
 		}
 	} else {
 		imx290_stop_streaming(imx290);
-		pm_runtime_mark_last_busy(imx290->dev);
 		pm_runtime_put_autosuspend(imx290->dev);
 	}
 
@@ -1295,7 +1293,6 @@ static int imx290_subdev_init(struct imx290 *imx290)
 	 */
 	v4l2_i2c_subdev_init(&imx290->sd, client, &imx290_subdev_ops);
 	imx290->sd.dev = imx290->dev;
-	pm_runtime_mark_last_busy(imx290->dev);
 	pm_runtime_put_autosuspend(imx290->dev);
 
 	imx290->sd.internal_ops = &imx290_internal_ops;
drivers/media/i2c/imx296.c +0 -1
index f3bec16b527c..61116f4e3f76 100644
@@ -604,7 +604,6 @@ static int imx296_s_stream(struct v4l2_subdev *sd, int enable)
 	if (!enable) {
 		ret = imx296_stream_off(sensor);
 
-		pm_runtime_mark_last_busy(sensor->dev);
 		pm_runtime_put_autosuspend(sensor->dev);
 
 		goto unlock;
drivers/media/i2c/imx415.c +0 -1
index 278e743646ea..276bf4d6f39d 100644
@@ -952,7 +952,6 @@ static int imx415_s_stream(struct v4l2_subdev *sd, int enable)
 	if (!enable) {
 		ret = imx415_stream_off(sensor);
 
-		pm_runtime_mark_last_busy(sensor->dev);
 		pm_runtime_put_autosuspend(sensor->dev);
 
 		goto unlock;
drivers/media/i2c/mt9m114.c +0 -6
index 3f540ca40f3c..aa3fd6c6c76c 100644
@@ -974,7 +974,6 @@ static int mt9m114_start_streaming(struct mt9m114 *sensor,
 	return 0;
 
 error:
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -988,7 +987,6 @@ static int mt9m114_stop_streaming(struct mt9m114 *sensor)
 
 	ret = mt9m114_set_state(sensor, MT9M114_SYS_STATE_ENTER_SUSPEND);
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -1046,7 +1044,6 @@ static int mt9m114_pa_g_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -1113,7 +1110,6 @@ static int mt9m114_pa_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -1565,7 +1561,6 @@ static int mt9m114_ifp_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
 	pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
@@ -2472,7 +2467,6 @@ static int mt9m114_probe(struct i2c_client *client)
 	 * Decrease the PM usage count. The device will get suspended after the
 	 * autosuspend delay, turning the power off.
 	 */
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/media/i2c/ov4689.c +0 -3
index 1c3a449f9354..7d740ad3926f 100644
@@ -497,7 +497,6 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
 	} else {
 		cci_write(ov4689->regmap, OV4689_REG_CTRL_MODE,
 			  OV4689_MODE_SW_STANDBY, NULL);
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 	}
 
@@ -702,7 +701,6 @@ static int ov4689_set_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -999,7 +997,6 @@ static int ov4689_probe(struct i2c_client *client)
 		goto err_clean_subdev_pm;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/media/i2c/ov5640.c +0 -4
index 0dae0438aa80..84198613381d 100644
@@ -3341,7 +3341,6 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
 	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
 	return 0;
@@ -3417,7 +3416,6 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
 	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
 	return ret;
@@ -3754,7 +3752,6 @@ static int ov5640_s_stream(struct v4l2_subdev *sd, int enable)
 	mutex_unlock(&sensor->lock);
 
 	if (!enable || ret) {
-		pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
 		pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 	}
 
@@ -3965,7 +3962,6 @@ static int ov5640_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(dev, 1000);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/media/i2c/ov5645.c +0 -3
index 004d0ee5c3f5..58c846a44376 100644
@@ -808,7 +808,6 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(ov5645->dev);
 	pm_runtime_put_autosuspend(ov5645->dev);
 
 	return ret;
@@ -979,7 +978,6 @@ static int ov5645_disable_streams(struct v4l2_subdev *sd,
 			       OV5645_SYSTEM_CTRL0_STOP);
 
 rpm_put:
-	pm_runtime_mark_last_busy(ov5645->dev);
 	pm_runtime_put_autosuspend(ov5645->dev);
 
 	return ret;
@@ -1196,7 +1194,6 @@ static int ov5645_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(dev, 1000);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/media/i2c/ov64a40.c +0 -4
index a5da4fe47e0b..15912ecb8d26 100644
@@ -2990,7 +2990,6 @@ static int ov64a40_start_streaming(struct ov64a40 *ov64a40,
 	return 0;
 
 error_power_off:
-	pm_runtime_mark_last_busy(ov64a40->dev);
 	pm_runtime_put_autosuspend(ov64a40->dev);
 
 	return ret;
@@ -3000,7 +2999,6 @@ static int ov64a40_stop_streaming(struct ov64a40 *ov64a40,
 				  struct v4l2_subdev_state *state)
 {
 	cci_update_bits(ov64a40->cci, OV64A40_REG_SMIA, BIT(0), 0, NULL);
-	pm_runtime_mark_last_busy(ov64a40->dev);
 	pm_runtime_put_autosuspend(ov64a40->dev);
 
 	__v4l2_ctrl_grab(ov64a40->link_freq, false);
@@ -3330,7 +3328,6 @@ static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	if (pm_status > 0) {
-		pm_runtime_mark_last_busy(ov64a40->dev);
 		pm_runtime_put_autosuspend(ov64a40->dev);
 	}
 
@@ -3622,7 +3619,6 @@ static int ov64a40_probe(struct i2c_client *client)
 		goto error_subdev_cleanup;
 	}
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
drivers/media/i2c/ov8858.c +0 -2
index 95f9ae794846..6b7193eaea1f 100644
@@ -1391,7 +1391,6 @@ static int ov8858_s_stream(struct v4l2_subdev *sd, int on)
 		}
 	} else {
 		ov8858_stop_stream(ov8858);
-		pm_runtime_mark_last_busy(&client->dev);
 		pm_runtime_put_autosuspend(&client->dev);
 	}
 
@@ -1945,7 +1944,6 @@ static int ov8858_probe(struct i2c_client *client)
 		goto err_power_off;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/media/i2c/st-mipid02.c +0 -2
index f4568e87f018..41ae25b0911f 100644
@@ -465,7 +465,6 @@ static int mipid02_disable_streams(struct v4l2_subdev *sd,
 	if (ret)
 		goto error;
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 error:
@@ -542,7 +541,6 @@ static int mipid02_enable_streams(struct v4l2_subdev *sd,
 	cci_write(bridge->regmap, MIPID02_DATA_LANE0_REG1, 0, &ret);
 	cci_write(bridge->regmap, MIPID02_DATA_LANE1_REG1, 0, &ret);
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 	return ret;
 }
drivers/media/i2c/tc358746.c +0 -5
index 143aa1359aba..bcfc274cf891 100644
@@ -816,7 +816,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
 		return 0;
 
 err_out:
-		pm_runtime_mark_last_busy(sd->dev);
 		pm_runtime_put_sync_autosuspend(sd->dev);
 
 		return err;
@@ -838,7 +837,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
 	if (err)
 		return err;
 
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_sync_autosuspend(sd->dev);
 
 	return v4l2_subdev_call(src, video, s_stream, 0);
@@ -1016,7 +1014,6 @@ tc358746_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
 	err = tc358746_read(tc358746, reg->reg, &val);
 	reg->val = val;
 
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_sync_autosuspend(sd->dev);
 
 	return err;
@@ -1032,7 +1029,6 @@ tc358746_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 
 	tc358746_write(tc358746, (u32)reg->reg, (u32)reg->val);
 
-	pm_runtime_mark_last_busy(sd->dev);
 	pm_runtime_put_sync_autosuspend(sd->dev);
 
 	return 0;
@@ -1395,7 +1391,6 @@ static int tc358746_init_hw(struct tc358746 *tc358746)
 	}
 
 	err = tc358746_read(tc358746, CHIPID_REG, &val);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_sync_autosuspend(dev);
 	if (err)
 		return -ENODEV;
drivers/media/i2c/thp7312.c +0 -4
index 8852c56431fe..775cfba188d8 100644
@@ -808,7 +808,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
 	if (!enable) {
 		thp7312_stream_enable(thp7312, false);
 
-		pm_runtime_mark_last_busy(thp7312->dev);
 		pm_runtime_put_autosuspend(thp7312->dev);
 
 		v4l2_subdev_unlock_state(sd_state);
@@ -839,7 +838,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
 	goto finish_unlock;
 
 finish_pm:
-	pm_runtime_mark_last_busy(thp7312->dev);
 	pm_runtime_put_autosuspend(thp7312->dev);
 finish_unlock:
 	v4l2_subdev_unlock_state(sd_state);
@@ -1147,7 +1145,6 @@ static int thp7312_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(thp7312->dev);
 	pm_runtime_put_autosuspend(thp7312->dev);
 
 	return ret;
@@ -2183,7 +2180,6 @@ static int thp7312_probe(struct i2c_client *client)
 	 * Decrease the PM usage count. The device will get suspended after the
 	 * autosuspend delay, turning the power off.
 	 */
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	dev_info(dev, "THP7312 firmware version %02u.%02u\n",
drivers/media/i2c/vd55g1.c +0 -4
index c0754fd03b1d..7c39183dd44b 100644
@@ -1104,7 +1104,6 @@ static int vd55g1_disable_streams(struct v4l2_subdev *sd,
 
 	vd55g1_grab_ctrls(sensor, false);
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1338,7 +1337,6 @@ static int vd55g1_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1433,7 +1431,6 @@ static int vd55g1_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1895,7 +1892,6 @@ static int vd55g1_probe(struct i2c_client *client)
 	pm_runtime_enable(dev);
 	pm_runtime_set_autosuspend_delay(dev, 4000);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	ret = vd55g1_subdev_init(sensor);
drivers/media/i2c/vd56g3.c +0 -4
index 5d951ad0b478..d66e21ba4498 100644
@@ -493,7 +493,6 @@ static int vd56g3_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -577,7 +576,6 @@ static int vd56g3_s_ctrl(struct v4l2_ctrl *ctrl)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1021,7 +1019,6 @@ static int vd56g3_disable_streams(struct v4l2_subdev *sd,
 	__v4l2_ctrl_grab(sensor->vflip_ctrl, false);
 	__v4l2_ctrl_grab(sensor->patgen_ctrl, false);
 
-	pm_runtime_mark_last_busy(sensor->dev);
 	pm_runtime_put_autosuspend(sensor->dev);
 
 	return ret;
@@ -1527,7 +1524,6 @@ static int vd56g3_probe(struct i2c_client *client)
 	}
 
 	/* Sensor could now be powered off (after the autosuspend delay) */
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	dev_dbg(dev, "Successfully probe %s sensor\n",
drivers/media/i2c/video-i2c.c +0 -4
index 0dd991d70d53..1eee2d4f5b40 100644
@@ -288,7 +288,6 @@ static int amg88xx_read(struct device *dev, enum hwmon_sensor_types type,
 		return tmp;
 
 	tmp = regmap_bulk_read(data->regmap, AMG88XX_REG_TTHL, &buf, 2);
-	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
 	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 	if (tmp)
 		return tmp;
@@ -527,7 +526,6 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
 		return 0;
 
 error_rpm_put:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 error_del_list:
 	video_i2c_del_list(vq, VB2_BUF_STATE_QUEUED);
@@ -544,7 +542,6 @@ static void stop_streaming(struct vb2_queue *vq)
 
 	kthread_stop(data->kthread_vid_cap);
 	data->kthread_vid_cap = NULL;
-	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
 	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 
 	video_i2c_del_list(vq, VB2_BUF_STATE_ERROR);
@@ -853,7 +850,6 @@ static int video_i2c_probe(struct i2c_client *client)
 	if (ret < 0)
 		goto error_pm_disable;
 
-	pm_runtime_mark_last_busy(&client->dev);
 	pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c +0 -4
index fd71f0c43ac3..a9ce032cc5a2 100644
@@ -451,7 +451,6 @@ static void wave5_vpu_dec_finish_decode(struct vpu_instance *inst)
 	if (q_status.report_queue_count == 0 &&
 	    (q_status.instance_queue_count == 0 || dec_info.sequence_changed)) {
 		dev_dbg(inst->dev->dev, "%s: finishing job.\n", __func__);
-		pm_runtime_mark_last_busy(inst->dev->dev);
 		pm_runtime_put_autosuspend(inst->dev->dev);
 		v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
 	}
@@ -1364,7 +1363,6 @@ static int wave5_vpu_dec_start_streaming(struct vb2_queue *q, unsigned int count
 		}
 
 	}
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	return ret;
 
@@ -1498,7 +1496,6 @@ static void wave5_vpu_dec_stop_streaming(struct vb2_queue *q)
 	else
 		streamoff_capture(q);
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 }
 
@@ -1662,7 +1659,6 @@ static void wave5_vpu_dec_device_run(void *priv)
 
 finish_job_and_return:
 	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
 }
drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c +0 -5
index 1e5fc5f8b856..35913a7de834 100644
@@ -1391,12 +1391,10 @@ static int wave5_vpu_enc_start_streaming(struct vb2_queue *q, unsigned int count
 	if (ret)
 		goto return_buffers;
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	return 0;
 return_buffers:
 	wave5_return_bufs(q, VB2_BUF_STATE_QUEUED);
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	return ret;
 }
@@ -1465,7 +1463,6 @@ static void wave5_vpu_enc_stop_streaming(struct vb2_queue *q)
 	else
 		streamoff_capture(inst, q);
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 }
 
@@ -1520,7 +1517,6 @@ static void wave5_vpu_enc_device_run(void *priv)
 			break;
 		}
 		dev_dbg(inst->dev->dev, "%s: leave with active job", __func__);
-		pm_runtime_mark_last_busy(inst->dev->dev);
 		pm_runtime_put_autosuspend(inst->dev->dev);
 		return;
 	default:
@@ -1529,7 +1525,6 @@ static void wave5_vpu_enc_device_run(void *priv)
 		break;
 	}
 	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
-	pm_runtime_mark_last_busy(inst->dev->dev);
 	pm_runtime_put_autosuspend(inst->dev->dev);
 	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
 }
drivers/media/platform/nvidia/tegra-vde/h264.c +0 -2
index 0e56a4331b0d..45f8f6904867 100644
@@ -585,7 +585,6 @@ static int tegra_vde_decode_begin(struct tegra_vde *vde,
 	return 0;
 
 put_runtime_pm:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 unlock:
@@ -612,7 +611,6 @@ static void tegra_vde_decode_abort(struct tegra_vde *vde)
 	if (err)
 		dev_err(dev, "DEC end: Failed to assert HW reset: %d\n", err);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	mutex_unlock(&vde->lock);
drivers/media/platform/qcom/iris/iris_hfi_queue.c +0 -1
index fac7df0c4d1a..0b37f9b76da5 100644
@@ -142,7 +142,6 @@ int iris_hfi_queue_cmd_write(struct iris_core *core, void *pkt, u32 pkt_size)
 	}
 	mutex_unlock(&core->lock);
 
-	pm_runtime_mark_last_busy(core->dev);
 	pm_runtime_put_autosuspend(core->dev);
 
 	return 0;
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c +0 -2
index 7596ae1f7de6..8a10a36abbc2 100644
@@ -951,7 +951,6 @@ static void pispbe_node_stop_streaming(struct vb2_queue *q)
 	pispbe->streaming_map &= ~BIT(node->id);
 	spin_unlock_irqrestore(&pispbe->hw_lock, flags);
 
-	pm_runtime_mark_last_busy(pispbe->dev);
 	pm_runtime_put_autosuspend(pispbe->dev);
 
 	dev_dbg(pispbe->dev, "Nodes streaming now 0x%x\n",
@@ -1740,7 +1739,6 @@ static int pispbe_probe(struct platform_device *pdev)
 	if (ret)
 		goto disable_devs_err;
 
-	pm_runtime_mark_last_busy(pispbe->dev);
 	pm_runtime_put_autosuspend(pispbe->dev);
 
 	return 0;
drivers/media/platform/verisilicon/hantro_drv.c +0 -1
index 8542238e0fb1..fa972effd4a2 100644
@@ -89,7 +89,6 @@ static void hantro_job_finish(struct hantro_dev *vpu,
 			      struct hantro_ctx *ctx,
 			      enum vb2_buffer_state result)
 {
-	pm_runtime_mark_last_busy(vpu->dev);
 	pm_runtime_put_autosuspend(vpu->dev);
 
 	clk_bulk_disable(vpu->variant->num_clocks, vpu->clocks);
drivers/media/rc/gpio-ir-recv.c +0 -1
index bf6d8fa983bf..161f8919022c 100644
@@ -49,7 +49,6 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
 		ir_raw_event_store_edge(gpio_dev->rcdev, val == 1);
 
 	if (pmdev) {
-		pm_runtime_mark_last_busy(pmdev);
 		pm_runtime_put_autosuspend(pmdev);
 	}
 
Signature · 1 line
2.39.5
Reviewed-by on v1 41/80
#87 lore raw

Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 39 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/media/i2c/alvium-csi2.c                          | 1 -
 drivers/media/i2c/ccs/ccs-core.c                         | 4 ----
 drivers/media/i2c/dw9768.c                               | 1 -
 drivers/media/i2c/gc0308.c                               | 3 ---
 drivers/media/i2c/gc2145.c                               | 3 ---
 drivers/media/i2c/imx219.c                               | 2 --
 drivers/media/i2c/imx283.c                               | 3 ---
 drivers/media/i2c/imx290.c                               | 3 ---
 drivers/media/i2c/imx296.c                               | 1 -
 drivers/media/i2c/imx415.c                               | 1 -
 drivers/media/i2c/mt9m114.c                              | 6 ------
 drivers/media/i2c/ov4689.c                               | 3 ---
 drivers/media/i2c/ov5640.c                               | 4 ----
 drivers/media/i2c/ov5645.c                               | 3 ---
 drivers/media/i2c/ov64a40.c                              | 4 ----
 drivers/media/i2c/ov8858.c                               | 2 --
 drivers/media/i2c/st-mipid02.c                           | 2 --
 drivers/media/i2c/tc358746.c                             | 5 -----
 drivers/media/i2c/thp7312.c                              | 4 ----
 drivers/media/i2c/vd55g1.c                               | 4 ----
 drivers/media/i2c/vd56g3.c                               | 4 ----
 drivers/media/i2c/video-i2c.c                            | 4 ----
Quoted 9 lines
 drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 4 ----
 drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 5 -----
 drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --
 drivers/media/platform/qcom/iris/iris_hfi_queue.c        | 1 -
 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c     | 2 --
 drivers/media/platform/verisilicon/hantro_drv.c          | 1 -
 drivers/media/rc/gpio-ir-recv.c                          | 1 -
 29 files changed, 83 deletions(-)

[snip]> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_queue.c b/drivers/media/platform/qcom/iris/iris_hfi_queue.c

drivers/media/platform/qcom/iris/iris_hfi_queue.c int iris_hfi_queue_cmd_write(struct iris_core *core, void *pkt, u32 pkt_size) · line 147

Quoted 11 lines

index fac7df0c4d1a..0b37f9b76da5 100644

drivers/media/platform/qcom/iris/iris_hfi_queue.c +0 -1
@@ -142,7 +142,6 @@ int iris_hfi_queue_cmd_write(struct iris_core *core, void *pkt, u32 pkt_size)
 	}
 	mutex_unlock(&core->lock);
 
-	pm_runtime_mark_last_busy(core->dev);
 	pm_runtime_put_autosuspend(core->dev);
 
 	return 0;

Thanks,
Dikshita

maintainer Reviewed-by on v1 41/80
#88 lore raw

Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---

...

drivers/media/rc/gpio-ir-recv.c static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id) · line 53

Quoted 11 lines

diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
index bf6d8fa983bf..161f8919022c 100644

drivers/media/rc/gpio-ir-recv.c +0 -1
@@ -49,7 +49,6 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
 		ir_raw_event_store_edge(gpio_dev->rcdev, val == 1);
 
 	if (pmdev) {
-		pm_runtime_mark_last_busy(pmdev);
 		pm_runtime_put_autosuspend(pmdev);
 	}

No need for braces any more - as Laurent already pointed out.

Sean

maintainer Acked-by on v1 41/80
#89 lore raw

Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

Hi Sakari

Quoted 8 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---

[...]

Quoted 1 line
 drivers/media/i2c/imx219.c                               | 2 --
maintainer Reviewed-by on v1 41/80
#90 lore raw

Re: [PATCH 41/80] media: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

Le 04/07/2025 à 09:54, Sakari Ailus a écrit :

Quoted 37 lines

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                 pm-runtime-6.17-rc1
  drivers/media/i2c/alvium-csi2.c                          | 1 -
  drivers/media/i2c/ccs/ccs-core.c                         | 4 ----
  drivers/media/i2c/dw9768.c                               | 1 -
  drivers/media/i2c/gc0308.c                               | 3 ---
  drivers/media/i2c/gc2145.c                               | 3 ---
  drivers/media/i2c/imx219.c                               | 2 --
  drivers/media/i2c/imx283.c                               | 3 ---
  drivers/media/i2c/imx290.c                               | 3 ---
  drivers/media/i2c/imx296.c                               | 1 -
  drivers/media/i2c/imx415.c                               | 1 -
  drivers/media/i2c/mt9m114.c                              | 6 ------
  drivers/media/i2c/ov4689.c                               | 3 ---
  drivers/media/i2c/ov5640.c                               | 4 ----
  drivers/media/i2c/ov5645.c                               | 3 ---
  drivers/media/i2c/ov64a40.c                              | 4 ----
  drivers/media/i2c/ov8858.c                               | 2 --
  drivers/media/i2c/st-mipid02.c                           | 2 --
  drivers/media/i2c/tc358746.c                             | 5 -----
  drivers/media/i2c/thp7312.c                              | 4 ----
  drivers/media/i2c/vd55g1.c                               | 4 ----
Quoted 8 lines
  drivers/media/i2c/vd56g3.c                               | 4 ----
  drivers/media/i2c/video-i2c.c                            | 4 ----
  drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 4 ----
  drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 5 -----
  drivers/media/platform/nvidia/tegra-vde/h264.c           | 2 --
  drivers/media/platform/qcom/iris/iris_hfi_queue.c        | 1 -
  drivers/media/platform/raspberrypi/pisp_be/pisp_be.c     | 2 --
  drivers/media/platform/verisilicon/hantro_drv.c          | 1 -
Quoted 779 lines
  drivers/media/rc/gpio-ir-recv.c                          | 1 -
  29 files changed, 83 deletions(-)
drivers/media/i2c/alvium-csi2.c +0 -1
index 05b708bd0a64..1f088acecf36 100644
@@ -1841,7 +1841,6 @@ static int alvium_s_stream(struct v4l2_subdev *sd, int enable)
 
  	} else {
  		alvium_set_stream_mipi(alvium, enable);
-		pm_runtime_mark_last_busy(&client->dev);
  		pm_runtime_put_autosuspend(&client->dev);
  	}
 
drivers/media/i2c/ccs/ccs-core.c +0 -4
index 487bcabb4a19..3316639b695e 100644
@@ -788,7 +788,6 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
  	}
 
  	if (pm_status > 0) {
-		pm_runtime_mark_last_busy(&client->dev);
  		pm_runtime_put_autosuspend(&client->dev);
  	}
 
@@ -1914,7 +1913,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
  	if (!enable) {
  		ccs_stop_streaming(sensor);
  		sensor->streaming = false;
-		pm_runtime_mark_last_busy(&client->dev);
  		pm_runtime_put_autosuspend(&client->dev);
 
  		return 0;
@@ -1929,7 +1927,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
  	rval = ccs_start_streaming(sensor);
  	if (rval < 0) {
  		sensor->streaming = false;
-		pm_runtime_mark_last_busy(&client->dev);
  		pm_runtime_put_autosuspend(&client->dev);
  	}
 
@@ -2677,7 +2674,6 @@ nvm_show(struct device *dev, struct device_attribute *attr, char *buf)
  		return -ENODEV;
  	}
 
-	pm_runtime_mark_last_busy(&client->dev);
  	pm_runtime_put_autosuspend(&client->dev);
 
  	/*
drivers/media/i2c/dw9768.c +0 -1
index 3a4d100b9199..d434721ba8ed 100644
@@ -374,7 +374,6 @@ static int dw9768_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 
  static int dw9768_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
  {
-	pm_runtime_mark_last_busy(sd->dev);
  	pm_runtime_put_autosuspend(sd->dev);
 
  	return 0;
drivers/media/i2c/gc0308.c +0 -3
index 069f42785b3c..cbcda0e18ff1 100644
@@ -974,7 +974,6 @@ static int gc0308_s_ctrl(struct v4l2_ctrl *ctrl)
  	if (ret)
  		dev_err(gc0308->dev, "failed to set control: %d\n", ret);
 
-	pm_runtime_mark_last_busy(gc0308->dev);
  	pm_runtime_put_autosuspend(gc0308->dev);
 
  	return ret;
@@ -1157,14 +1156,12 @@ static int gc0308_start_stream(struct gc0308 *gc0308)
  	return 0;
 
  disable_pm:
-	pm_runtime_mark_last_busy(gc0308->dev);
  	pm_runtime_put_autosuspend(gc0308->dev);
  	return ret;
  }
 
  static int gc0308_stop_stream(struct gc0308 *gc0308)
  {
-	pm_runtime_mark_last_busy(gc0308->dev);
  	pm_runtime_put_autosuspend(gc0308->dev);
  	return 0;
  }
drivers/media/i2c/gc2145.c +0 -3
index ba02161d46e7..559a851669aa 100644
@@ -963,7 +963,6 @@ static int gc2145_enable_streams(struct v4l2_subdev *sd,
  	return 0;
 
  err_rpm_put:
-	pm_runtime_mark_last_busy(&client->dev);
  	pm_runtime_put_autosuspend(&client->dev);
  	return ret;
  }
@@ -985,7 +984,6 @@ static int gc2145_disable_streams(struct v4l2_subdev *sd,
  	if (ret)
  		dev_err(&client->dev, "%s failed to write regs\n", __func__);
 
-	pm_runtime_mark_last_busy(&client->dev);
  	pm_runtime_put_autosuspend(&client->dev);
 
  	return ret;
@@ -1193,7 +1191,6 @@ static int gc2145_s_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(&client->dev);
  	pm_runtime_put_autosuspend(&client->dev);
 
  	return ret;
drivers/media/i2c/imx219.c +0 -2
index 3b4f68543342..3faf48f34af4 100644
@@ -771,7 +771,6 @@ static int imx219_enable_streams(struct v4l2_subdev *sd,
  	return 0;
 
  err_rpm_put:
-	pm_runtime_mark_last_busy(&client->dev);
  	pm_runtime_put_autosuspend(&client->dev);
  	return ret;
  }
@@ -793,7 +792,6 @@ static int imx219_disable_streams(struct v4l2_subdev *sd,
  	__v4l2_ctrl_grab(imx219->vflip, false);
  	__v4l2_ctrl_grab(imx219->hflip, false);
 
-	pm_runtime_mark_last_busy(&client->dev);
  	pm_runtime_put_autosuspend(&client->dev);
 
  	return ret;
drivers/media/i2c/imx283.c +0 -3
index da618c8cbadc..67e8bb432d10 100644
@@ -1143,7 +1143,6 @@ static int imx283_enable_streams(struct v4l2_subdev *sd,
  	return 0;
 
  err_rpm_put:
-	pm_runtime_mark_last_busy(imx283->dev);
  	pm_runtime_put_autosuspend(imx283->dev);
 
  	return ret;
@@ -1163,7 +1162,6 @@ static int imx283_disable_streams(struct v4l2_subdev *sd,
  	if (ret)
  		dev_err(imx283->dev, "Failed to stop stream\n");
 
-	pm_runtime_mark_last_busy(imx283->dev);
  	pm_runtime_put_autosuspend(imx283->dev);
 
  	return ret;
@@ -1558,7 +1556,6 @@ static int imx283_probe(struct i2c_client *client)
  	 * Decrease the PM usage count. The device will get suspended after the
  	 * autosuspend delay, turning the power off.
  	 */
-	pm_runtime_mark_last_busy(imx283->dev);
  	pm_runtime_put_autosuspend(imx283->dev);
 
  	return 0;
drivers/media/i2c/imx290.c +0 -3
index fbf7eba3d71d..970a8d89a3e7 100644
@@ -869,7 +869,6 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(imx290->dev);
  	pm_runtime_put_autosuspend(imx290->dev);
 
  	return ret;
@@ -1099,7 +1098,6 @@ static int imx290_set_stream(struct v4l2_subdev *sd, int enable)
  		}
  	} else {
  		imx290_stop_streaming(imx290);
-		pm_runtime_mark_last_busy(imx290->dev);
  		pm_runtime_put_autosuspend(imx290->dev);
  	}
 
@@ -1295,7 +1293,6 @@ static int imx290_subdev_init(struct imx290 *imx290)
  	 */
  	v4l2_i2c_subdev_init(&imx290->sd, client, &imx290_subdev_ops);
  	imx290->sd.dev = imx290->dev;
-	pm_runtime_mark_last_busy(imx290->dev);
  	pm_runtime_put_autosuspend(imx290->dev);
 
  	imx290->sd.internal_ops = &imx290_internal_ops;
drivers/media/i2c/imx296.c +0 -1
index f3bec16b527c..61116f4e3f76 100644
@@ -604,7 +604,6 @@ static int imx296_s_stream(struct v4l2_subdev *sd, int enable)
  	if (!enable) {
  		ret = imx296_stream_off(sensor);
 
-		pm_runtime_mark_last_busy(sensor->dev);
  		pm_runtime_put_autosuspend(sensor->dev);
 
  		goto unlock;
drivers/media/i2c/imx415.c +0 -1
index 278e743646ea..276bf4d6f39d 100644
@@ -952,7 +952,6 @@ static int imx415_s_stream(struct v4l2_subdev *sd, int enable)
  	if (!enable) {
  		ret = imx415_stream_off(sensor);
 
-		pm_runtime_mark_last_busy(sensor->dev);
  		pm_runtime_put_autosuspend(sensor->dev);
 
  		goto unlock;
drivers/media/i2c/mt9m114.c +0 -6
index 3f540ca40f3c..aa3fd6c6c76c 100644
@@ -974,7 +974,6 @@ static int mt9m114_start_streaming(struct mt9m114 *sensor,
  	return 0;
 
  error:
-	pm_runtime_mark_last_busy(&sensor->client->dev);
  	pm_runtime_put_autosuspend(&sensor->client->dev);
 
  	return ret;
@@ -988,7 +987,6 @@ static int mt9m114_stop_streaming(struct mt9m114 *sensor)
 
  	ret = mt9m114_set_state(sensor, MT9M114_SYS_STATE_ENTER_SUSPEND);
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
  	pm_runtime_put_autosuspend(&sensor->client->dev);
 
  	return ret;
@@ -1046,7 +1044,6 @@ static int mt9m114_pa_g_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
  	pm_runtime_put_autosuspend(&sensor->client->dev);
 
  	return ret;
@@ -1113,7 +1110,6 @@ static int mt9m114_pa_s_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
  	pm_runtime_put_autosuspend(&sensor->client->dev);
 
  	return ret;
@@ -1565,7 +1561,6 @@ static int mt9m114_ifp_s_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(&sensor->client->dev);
  	pm_runtime_put_autosuspend(&sensor->client->dev);
 
  	return ret;
@@ -2472,7 +2467,6 @@ static int mt9m114_probe(struct i2c_client *client)
  	 * Decrease the PM usage count. The device will get suspended after the
  	 * autosuspend delay, turning the power off.
  	 */
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
 
  	return 0;
drivers/media/i2c/ov4689.c +0 -3
index 1c3a449f9354..7d740ad3926f 100644
@@ -497,7 +497,6 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
  	} else {
  		cci_write(ov4689->regmap, OV4689_REG_CTRL_MODE,
  			  OV4689_MODE_SW_STANDBY, NULL);
-		pm_runtime_mark_last_busy(dev);
  		pm_runtime_put_autosuspend(dev);
  	}
 
@@ -702,7 +701,6 @@ static int ov4689_set_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
 
  	return ret;
@@ -999,7 +997,6 @@ static int ov4689_probe(struct i2c_client *client)
  		goto err_clean_subdev_pm;
  	}
 
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
 
  	return 0;
drivers/media/i2c/ov5640.c +0 -4
index 0dae0438aa80..84198613381d 100644
@@ -3341,7 +3341,6 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
  	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
  	return 0;
@@ -3417,7 +3416,6 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
  	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
  	return ret;
@@ -3754,7 +3752,6 @@ static int ov5640_s_stream(struct v4l2_subdev *sd, int enable)
  	mutex_unlock(&sensor->lock);
 
  	if (!enable || ret) {
-		pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
  		pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
  	}
 
@@ -3965,7 +3962,6 @@ static int ov5640_probe(struct i2c_client *client)
 
  	pm_runtime_set_autosuspend_delay(dev, 1000);
  	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
 
  	return 0;
drivers/media/i2c/ov5645.c +0 -3
index 004d0ee5c3f5..58c846a44376 100644
@@ -808,7 +808,6 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(ov5645->dev);
  	pm_runtime_put_autosuspend(ov5645->dev);
 
  	return ret;
@@ -979,7 +978,6 @@ static int ov5645_disable_streams(struct v4l2_subdev *sd,
  			       OV5645_SYSTEM_CTRL0_STOP);
 
  rpm_put:
-	pm_runtime_mark_last_busy(ov5645->dev);
  	pm_runtime_put_autosuspend(ov5645->dev);
 
  	return ret;
@@ -1196,7 +1194,6 @@ static int ov5645_probe(struct i2c_client *client)
 
  	pm_runtime_set_autosuspend_delay(dev, 1000);
  	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
 
  	return 0;
drivers/media/i2c/ov64a40.c +0 -4
index a5da4fe47e0b..15912ecb8d26 100644
@@ -2990,7 +2990,6 @@ static int ov64a40_start_streaming(struct ov64a40 *ov64a40,
  	return 0;
 
  error_power_off:
-	pm_runtime_mark_last_busy(ov64a40->dev);
  	pm_runtime_put_autosuspend(ov64a40->dev);
 
  	return ret;
@@ -3000,7 +2999,6 @@ static int ov64a40_stop_streaming(struct ov64a40 *ov64a40,
  				  struct v4l2_subdev_state *state)
  {
  	cci_update_bits(ov64a40->cci, OV64A40_REG_SMIA, BIT(0), 0, NULL);
-	pm_runtime_mark_last_busy(ov64a40->dev);
  	pm_runtime_put_autosuspend(ov64a40->dev);
 
  	__v4l2_ctrl_grab(ov64a40->link_freq, false);
@@ -3330,7 +3328,6 @@ static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl)
  	}
 
  	if (pm_status > 0) {
-		pm_runtime_mark_last_busy(ov64a40->dev);
  		pm_runtime_put_autosuspend(ov64a40->dev);
  	}
 
@@ -3622,7 +3619,6 @@ static int ov64a40_probe(struct i2c_client *client)
  		goto error_subdev_cleanup;
  	}
 
-	pm_runtime_mark_last_busy(&client->dev);
  	pm_runtime_put_autosuspend(&client->dev);
 
  	return 0;
drivers/media/i2c/ov8858.c +0 -2
index 95f9ae794846..6b7193eaea1f 100644
@@ -1391,7 +1391,6 @@ static int ov8858_s_stream(struct v4l2_subdev *sd, int on)
  		}
  	} else {
  		ov8858_stop_stream(ov8858);
-		pm_runtime_mark_last_busy(&client->dev);
  		pm_runtime_put_autosuspend(&client->dev);
  	}
 
@@ -1945,7 +1944,6 @@ static int ov8858_probe(struct i2c_client *client)
  		goto err_power_off;
  	}
 
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
 
  	return 0;
drivers/media/i2c/st-mipid02.c +0 -2
index f4568e87f018..41ae25b0911f 100644
@@ -465,7 +465,6 @@ static int mipid02_disable_streams(struct v4l2_subdev *sd,
  	if (ret)
  		goto error;
 
-	pm_runtime_mark_last_busy(&client->dev);
  	pm_runtime_put_autosuspend(&client->dev);
 
  error:
@@ -542,7 +541,6 @@ static int mipid02_enable_streams(struct v4l2_subdev *sd,
  	cci_write(bridge->regmap, MIPID02_DATA_LANE0_REG1, 0, &ret);
  	cci_write(bridge->regmap, MIPID02_DATA_LANE1_REG1, 0, &ret);
 
-	pm_runtime_mark_last_busy(&client->dev);
  	pm_runtime_put_autosuspend(&client->dev);
  	return ret;
  }
drivers/media/i2c/tc358746.c +0 -5
index 143aa1359aba..bcfc274cf891 100644
@@ -816,7 +816,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
  		return 0;
 
  err_out:
-		pm_runtime_mark_last_busy(sd->dev);
  		pm_runtime_put_sync_autosuspend(sd->dev);
 
  		return err;
@@ -838,7 +837,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
  	if (err)
  		return err;
 
-	pm_runtime_mark_last_busy(sd->dev);
  	pm_runtime_put_sync_autosuspend(sd->dev);
 
  	return v4l2_subdev_call(src, video, s_stream, 0);
@@ -1016,7 +1014,6 @@ tc358746_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
  	err = tc358746_read(tc358746, reg->reg, &val);
  	reg->val = val;
 
-	pm_runtime_mark_last_busy(sd->dev);
  	pm_runtime_put_sync_autosuspend(sd->dev);
 
  	return err;
@@ -1032,7 +1029,6 @@ tc358746_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 
  	tc358746_write(tc358746, (u32)reg->reg, (u32)reg->val);
 
-	pm_runtime_mark_last_busy(sd->dev);
  	pm_runtime_put_sync_autosuspend(sd->dev);
 
  	return 0;
@@ -1395,7 +1391,6 @@ static int tc358746_init_hw(struct tc358746 *tc358746)
  	}
 
  	err = tc358746_read(tc358746, CHIPID_REG, &val);
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_sync_autosuspend(dev);
  	if (err)
  		return -ENODEV;
drivers/media/i2c/thp7312.c +0 -4
index 8852c56431fe..775cfba188d8 100644
@@ -808,7 +808,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
  	if (!enable) {
  		thp7312_stream_enable(thp7312, false);
 
-		pm_runtime_mark_last_busy(thp7312->dev);
  		pm_runtime_put_autosuspend(thp7312->dev);
 
  		v4l2_subdev_unlock_state(sd_state);
@@ -839,7 +838,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
  	goto finish_unlock;
 
  finish_pm:
-	pm_runtime_mark_last_busy(thp7312->dev);
  	pm_runtime_put_autosuspend(thp7312->dev);
  finish_unlock:
  	v4l2_subdev_unlock_state(sd_state);
@@ -1147,7 +1145,6 @@ static int thp7312_s_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(thp7312->dev);
  	pm_runtime_put_autosuspend(thp7312->dev);
 
  	return ret;
@@ -2183,7 +2180,6 @@ static int thp7312_probe(struct i2c_client *client)
  	 * Decrease the PM usage count. The device will get suspended after the
  	 * autosuspend delay, turning the power off.
  	 */
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
 
  	dev_info(dev, "THP7312 firmware version %02u.%02u\n",
drivers/media/i2c/vd55g1.c +0 -4
index c0754fd03b1d..7c39183dd44b 100644
@@ -1104,7 +1104,6 @@ static int vd55g1_disable_streams(struct v4l2_subdev *sd,
 
  	vd55g1_grab_ctrls(sensor, false);
 
-	pm_runtime_mark_last_busy(sensor->dev);
  	pm_runtime_put_autosuspend(sensor->dev);
 
  	return ret;
@@ -1338,7 +1337,6 @@ static int vd55g1_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
  	pm_runtime_put_autosuspend(sensor->dev);
 
  	return ret;
@@ -1433,7 +1431,6 @@ static int vd55g1_s_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
  	pm_runtime_put_autosuspend(sensor->dev);
 
  	return ret;
@@ -1895,7 +1892,6 @@ static int vd55g1_probe(struct i2c_client *client)
  	pm_runtime_enable(dev);
  	pm_runtime_set_autosuspend_delay(dev, 4000);
  	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
 
  	ret = vd55g1_subdev_init(sensor);
drivers/media/i2c/vd56g3.c +0 -4
index 5d951ad0b478..d66e21ba4498 100644
@@ -493,7 +493,6 @@ static int vd56g3_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
  	pm_runtime_put_autosuspend(sensor->dev);
 
  	return ret;
@@ -577,7 +576,6 @@ static int vd56g3_s_ctrl(struct v4l2_ctrl *ctrl)
  		break;
  	}
 
-	pm_runtime_mark_last_busy(sensor->dev);
  	pm_runtime_put_autosuspend(sensor->dev);
 
  	return ret;
@@ -1021,7 +1019,6 @@ static int vd56g3_disable_streams(struct v4l2_subdev *sd,
  	__v4l2_ctrl_grab(sensor->vflip_ctrl, false);
  	__v4l2_ctrl_grab(sensor->patgen_ctrl, false);
 
-	pm_runtime_mark_last_busy(sensor->dev);
  	pm_runtime_put_autosuspend(sensor->dev);
 
  	return ret;
@@ -1527,7 +1524,6 @@ static int vd56g3_probe(struct i2c_client *client)
  	}
 
  	/* Sensor could now be powered off (after the autosuspend delay) */
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
 
  	dev_dbg(dev, "Successfully probe %s sensor\n",
drivers/media/i2c/video-i2c.c +0 -4
index 0dd991d70d53..1eee2d4f5b40 100644
@@ -288,7 +288,6 @@ static int amg88xx_read(struct device *dev, enum hwmon_sensor_types type,
  		return tmp;
 
  	tmp = regmap_bulk_read(data->regmap, AMG88XX_REG_TTHL, &buf, 2);
-	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
  	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
  	if (tmp)
  		return tmp;
@@ -527,7 +526,6 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
  		return 0;
 
  error_rpm_put:
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
  error_del_list:
  	video_i2c_del_list(vq, VB2_BUF_STATE_QUEUED);
@@ -544,7 +542,6 @@ static void stop_streaming(struct vb2_queue *vq)
 
  	kthread_stop(data->kthread_vid_cap);
  	data->kthread_vid_cap = NULL;
-	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
  	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 
  	video_i2c_del_list(vq, VB2_BUF_STATE_ERROR);
@@ -853,7 +850,6 @@ static int video_i2c_probe(struct i2c_client *client)
  	if (ret < 0)
  		goto error_pm_disable;
 
-	pm_runtime_mark_last_busy(&client->dev);
  	pm_runtime_put_autosuspend(&client->dev);
 
  	return 0;
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c +0 -4
index fd71f0c43ac3..a9ce032cc5a2 100644
@@ -451,7 +451,6 @@ static void wave5_vpu_dec_finish_decode(struct vpu_instance *inst)
  	if (q_status.report_queue_count == 0 &&
  	    (q_status.instance_queue_count == 0 || dec_info.sequence_changed)) {
  		dev_dbg(inst->dev->dev, "%s: finishing job.\n", __func__);
-		pm_runtime_mark_last_busy(inst->dev->dev);
  		pm_runtime_put_autosuspend(inst->dev->dev);
  		v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
  	}
@@ -1364,7 +1363,6 @@ static int wave5_vpu_dec_start_streaming(struct vb2_queue *q, unsigned int count
  		}
 
  	}
-	pm_runtime_mark_last_busy(inst->dev->dev);
  	pm_runtime_put_autosuspend(inst->dev->dev);
  	return ret;
 
@@ -1498,7 +1496,6 @@ static void wave5_vpu_dec_stop_streaming(struct vb2_queue *q)
  	else
  		streamoff_capture(q);
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
  	pm_runtime_put_autosuspend(inst->dev->dev);
  }
 
@@ -1662,7 +1659,6 @@ static void wave5_vpu_dec_device_run(void *priv)
 
  finish_job_and_return:
  	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
-	pm_runtime_mark_last_busy(inst->dev->dev);
  	pm_runtime_put_autosuspend(inst->dev->dev);
  	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
  }
drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c +0 -5
index 1e5fc5f8b856..35913a7de834 100644
@@ -1391,12 +1391,10 @@ static int wave5_vpu_enc_start_streaming(struct vb2_queue *q, unsigned int count
  	if (ret)
  		goto return_buffers;
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
  	pm_runtime_put_autosuspend(inst->dev->dev);
  	return 0;
  return_buffers:
  	wave5_return_bufs(q, VB2_BUF_STATE_QUEUED);
-	pm_runtime_mark_last_busy(inst->dev->dev);
  	pm_runtime_put_autosuspend(inst->dev->dev);
  	return ret;
  }
@@ -1465,7 +1463,6 @@ static void wave5_vpu_enc_stop_streaming(struct vb2_queue *q)
  	else
  		streamoff_capture(inst, q);
 
-	pm_runtime_mark_last_busy(inst->dev->dev);
  	pm_runtime_put_autosuspend(inst->dev->dev);
  }
 
@@ -1520,7 +1517,6 @@ static void wave5_vpu_enc_device_run(void *priv)
  			break;
  		}
  		dev_dbg(inst->dev->dev, "%s: leave with active job", __func__);
-		pm_runtime_mark_last_busy(inst->dev->dev);
  		pm_runtime_put_autosuspend(inst->dev->dev);
  		return;
  	default:
@@ -1529,7 +1525,6 @@ static void wave5_vpu_enc_device_run(void *priv)
  		break;
  	}
  	dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
-	pm_runtime_mark_last_busy(inst->dev->dev);
  	pm_runtime_put_autosuspend(inst->dev->dev);
  	v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
  }
drivers/media/platform/nvidia/tegra-vde/h264.c +0 -2
index 0e56a4331b0d..45f8f6904867 100644
@@ -585,7 +585,6 @@ static int tegra_vde_decode_begin(struct tegra_vde *vde,
  	return 0;
 
  put_runtime_pm:
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
 
  unlock:
@@ -612,7 +611,6 @@ static void tegra_vde_decode_abort(struct tegra_vde *vde)
  	if (err)
  		dev_err(dev, "DEC end: Failed to assert HW reset: %d\n", err);
 
-	pm_runtime_mark_last_busy(dev);
  	pm_runtime_put_autosuspend(dev);
 
  	mutex_unlock(&vde->lock);
drivers/media/platform/qcom/iris/iris_hfi_queue.c +0 -1
index fac7df0c4d1a..0b37f9b76da5 100644
@@ -142,7 +142,6 @@ int iris_hfi_queue_cmd_write(struct iris_core *core, void *pkt, u32 pkt_size)
  	}
  	mutex_unlock(&core->lock);
 
-	pm_runtime_mark_last_busy(core->dev);
  	pm_runtime_put_autosuspend(core->dev);
 
  	return 0;
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c +0 -2
index 7596ae1f7de6..8a10a36abbc2 100644
@@ -951,7 +951,6 @@ static void pispbe_node_stop_streaming(struct vb2_queue *q)
  	pispbe->streaming_map &= ~BIT(node->id);
  	spin_unlock_irqrestore(&pispbe->hw_lock, flags);
 
-	pm_runtime_mark_last_busy(pispbe->dev);
  	pm_runtime_put_autosuspend(pispbe->dev);
 
  	dev_dbg(pispbe->dev, "Nodes streaming now 0x%x\n",
@@ -1740,7 +1739,6 @@ static int pispbe_probe(struct platform_device *pdev)
  	if (ret)
  		goto disable_devs_err;
 
-	pm_runtime_mark_last_busy(pispbe->dev);
  	pm_runtime_put_autosuspend(pispbe->dev);
 
  	return 0;
drivers/media/platform/verisilicon/hantro_drv.c +0 -1
index 8542238e0fb1..fa972effd4a2 100644
@@ -89,7 +89,6 @@ static void hantro_job_finish(struct hantro_dev *vpu,
  			      struct hantro_ctx *ctx,
  			      enum vb2_buffer_state result)
  {
-	pm_runtime_mark_last_busy(vpu->dev);
  	pm_runtime_put_autosuspend(vpu->dev);
 
  	clk_bulk_disable(vpu->variant->num_clocks, vpu->clocks);
drivers/media/rc/gpio-ir-recv.c +0 -1
index bf6d8fa983bf..161f8919022c 100644
@@ -49,7 +49,6 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
  		ir_raw_event_store_edge(gpio_dev->rcdev, val == 1);
 
  	if (pmdev) {
-		pm_runtime_mark_last_busy(pmdev);
  		pm_runtime_put_autosuspend(pmdev);
  	}
 
author maintainer
#91 lore raw

PATCH 42/80 mfd: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/mfd/arizona-irq.c  | 1 -
 drivers/mfd/cs40l50-core.c | 1 -
 drivers/mfd/cs42l43.c      | 1 -
 3 files changed, 3 deletions(-)
drivers/mfd/arizona-irq.c +0 -1
index ac2139597fab..3f8622ee0e59 100644
@@ -152,7 +152,6 @@ static irqreturn_t arizona_irq_thread(int irq, void *data)
 		}
 	} while (poll);
 
-	pm_runtime_mark_last_busy(arizona->dev);
 	pm_runtime_put_autosuspend(arizona->dev);
 
 	return IRQ_HANDLED;
drivers/mfd/cs40l50-core.c +0 -1
index c91bccda0858..662d987b650b 100644
@@ -531,7 +531,6 @@ int cs40l50_probe(struct cs40l50 *cs40l50)
 	if (ret)
 		return dev_err_probe(dev, ret, "Failed to request %s\n", CS40L50_FW);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/mfd/cs42l43.c +0 -1
index 103787f37443..07c8f1b8183e 100644
@@ -962,7 +962,6 @@ static void cs42l43_boot_work(struct work_struct *work)
 		goto err;
 	}
 
-	pm_runtime_mark_last_busy(cs42l43->dev);
 	pm_runtime_put_autosuspend(cs42l43->dev);
 
 	return;
Signature · 1 line
2.39.5
Reviewed-by on v1 42/80
#92 lore raw

Re: [PATCH 42/80] mfd: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---

Thanks,
Charles

maintainer Applied
#93 lore raw

Re: (subset) [PATCH 42/80] mfd: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus
Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Applied, thanks!

[42/80] mfd: Remove redundant pm_runtime_mark_last_busy() calls

        commit: 324db89e720150e9592d26f1c8da84685f68996b

--
Lee Jones [李琼斯]

author maintainer
#94 lore raw

PATCH 43/80 mei: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/misc/mei/client.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/misc/mei/client.c +0 -9
index 3db07d2a881f..191ab784e160 100644
@@ -709,7 +709,6 @@ void mei_host_client_init(struct mei_device *dev)
 
 	schedule_work(&dev->bus_rescan_work);
 
-	pm_runtime_mark_last_busy(dev->dev);
 	dev_dbg(dev->dev, "rpm: autosuspend\n");
 	pm_request_autosuspend(dev->dev);
 }
@@ -991,7 +990,6 @@ int mei_cl_disconnect(struct mei_cl *cl)
 	rets = __mei_cl_disconnect(cl);
 
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	return rets;
@@ -1167,7 +1165,6 @@ int mei_cl_connect(struct mei_cl *cl, struct mei_me_client *me_cl,
 	rets = cl->status;
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
@@ -1554,7 +1551,6 @@ int mei_cl_notify_request(struct mei_cl *cl,
 
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
@@ -1702,7 +1698,6 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length, const struct file *fp)
 
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 nortpm:
 	if (rets)
@@ -2092,7 +2087,6 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, unsigned long time
 	rets = buf_len;
 err:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 free:
 	mei_io_cb_free(cb);
@@ -2119,7 +2113,6 @@ void mei_cl_complete(struct mei_cl *cl, struct mei_cl_cb *cb)
 		if (waitqueue_active(&cl->tx_wait)) {
 			wake_up_interruptible(&cl->tx_wait);
 		} else {
-			pm_runtime_mark_last_busy(dev->dev);
 			pm_request_autosuspend(dev->dev);
 		}
 		break;
@@ -2366,7 +2359,6 @@ int mei_cl_dma_alloc_and_map(struct mei_cl *cl, const struct file *fp,
 		mei_cl_dma_free(cl);
 
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
@@ -2444,7 +2436,6 @@ int mei_cl_dma_unmap(struct mei_cl *cl, const struct file *fp)
 		mei_cl_dma_free(cl);
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
-	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
Signature · 1 line
2.39.5
author maintainer
#95 lore raw

PATCH 44/80 mmc: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/mmc/core/core.c            | 1 -
 drivers/mmc/host/atmel-mci.c       | 2 --
 drivers/mmc/host/mmci.c            | 1 -
 drivers/mmc/host/omap_hsmmc.c      | 3 ---
 drivers/mmc/host/sdhci-esdhc-imx.c | 1 -
 drivers/mmc/host/sdhci-msm.c       | 1 -
 drivers/mmc/host/sdhci-omap.c      | 2 --
 drivers/mmc/host/sdhci-pxav3.c     | 2 --
 drivers/mmc/host/sdhci-sprd.c      | 1 -
 drivers/mmc/host/sdhci_am654.c     | 1 -
 drivers/mmc/host/tmio_mmc_core.c   | 1 -
 11 files changed, 16 deletions(-)
drivers/mmc/core/core.c +0 -1
index a0e2dce70434..874c6fe92855 100644
@@ -882,7 +882,6 @@ void mmc_put_card(struct mmc_card *card, struct mmc_ctx *ctx)
 	WARN_ON(ctx && host->claimer != ctx);
 
 	mmc_release_host(host);
-	pm_runtime_mark_last_busy(&card->dev);
 	pm_runtime_put_autosuspend(&card->dev);
 }
 EXPORT_SYMBOL(mmc_put_card);
drivers/mmc/host/atmel-mci.c +0 -2
index c885c04e938a..43f92f48590f 100644
@@ -541,7 +541,6 @@ static int atmci_regs_show(struct seq_file *s, void *v)
 	memcpy_fromio(buf, host->regs, ATMCI_REGS_SIZE);
 	spin_unlock_bh(&host->lock);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	seq_printf(s, "MR:\t0x%08x%s%s ",
@@ -2567,7 +2566,6 @@ static int atmci_probe(struct platform_device *pdev)
 	dev_info(dev, "Atmel MCI controller at 0x%08lx irq %d, %u slots\n",
 		 host->mapbase, irq, nr_slots);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/mmc/host/mmci.c +0 -1
index c70c64f8adc4..8367283647a9 100644
@@ -2082,7 +2082,6 @@ static void mmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
 	spin_unlock_irqrestore(&host->lock, flags);
 
 	if (!enable) {
-		pm_runtime_mark_last_busy(mmc_dev(mmc));
 		pm_runtime_put_autosuspend(mmc_dev(mmc));
 	}
 }
drivers/mmc/host/omap_hsmmc.c +0 -3
index bf3b9f5b067c..adc0d0b6ae37 100644
@@ -1663,7 +1663,6 @@ static int mmc_regs_show(struct seq_file *s, void *data)
 	seq_printf(s, "CAPA:\t\t0x%08x\n",
 			OMAP_HSMMC_READ(host->base, CAPA));
 
-	pm_runtime_mark_last_busy(host->dev);
 	pm_runtime_put_autosuspend(host->dev);
 
 	return 0;
@@ -1954,7 +1953,6 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
 	}
 
 	omap_hsmmc_debugfs(mmc);
-	pm_runtime_mark_last_busy(host->dev);
 	pm_runtime_put_autosuspend(host->dev);
 
 	return 0;
@@ -2031,7 +2029,6 @@ static int omap_hsmmc_resume(struct device *dev)
 	if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER))
 		omap_hsmmc_conf_bus_power(host);
 
-	pm_runtime_mark_last_busy(host->dev);
 	pm_runtime_put_autosuspend(host->dev);
 	return 0;
 }
drivers/mmc/host/sdhci-esdhc-imx.c +0 -1
index 64c27349d79f..a040c0896a7b 100644
@@ -2108,7 +2108,6 @@ static int sdhci_esdhc_resume(struct device *dev)
 	    esdhc_is_usdhc(imx_data))
 		sdhc_esdhc_tuning_restore(host);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
drivers/mmc/host/sdhci-msm.c +0 -1
index 732b65d4b61a..68e56251d5e8 100644
@@ -2750,7 +2750,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)
 	if (ret)
 		goto pm_runtime_disable;
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
drivers/mmc/host/sdhci-omap.c +0 -2
index 429d8a517fb6..cdb09605e009 100644
@@ -1370,7 +1370,6 @@ static int sdhci_omap_probe(struct platform_device *pdev)
 		host->mmc->pm_caps |= MMC_PM_KEEP_POWER | MMC_PM_WAKE_SDIO_IRQ;
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -1379,7 +1378,6 @@ static int sdhci_omap_probe(struct platform_device *pdev)
 	sdhci_cleanup_host(host);
 
 err_rpm_put:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 err_rpm_disable:
 	pm_runtime_dont_use_autosuspend(dev);
drivers/mmc/host/sdhci-pxav3.c +0 -2
index 34abf986573f..1371960e34eb 100644
@@ -494,7 +494,6 @@ static int sdhci_pxav3_suspend(struct device *dev)
 	if (host->tuning_mode != SDHCI_TUNING_MODE_3)
 		mmc_retune_needed(host->mmc);
 	ret = sdhci_suspend_host(host);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -507,7 +506,6 @@ static int sdhci_pxav3_resume(struct device *dev)
 
 	pm_runtime_get_sync(dev);
 	ret = sdhci_resume_host(host);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
drivers/mmc/host/sdhci-sprd.c +0 -1
index a5dec1a0e934..fe2fe52b23b2 100644
@@ -863,7 +863,6 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_cleanup_host;
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
drivers/mmc/host/sdhci_am654.c +0 -1
index ea14d56558c4..e2c4a0049d61 100644
@@ -986,7 +986,6 @@ static int sdhci_am654_probe(struct platform_device *pdev)
 	/* Setting up autosuspend */
 	pm_runtime_set_autosuspend_delay(dev, SDHCI_AM654_AUTOSUSPEND_DELAY);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 	return 0;
 
drivers/mmc/host/tmio_mmc_core.c +0 -1
index 2cec463b5e00..21c2f9095bac 100644
@@ -160,7 +160,6 @@ static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
 		sd_ctrl_write16(host, CTL_SDIO_IRQ_MASK, host->sdio_irq_mask);
 
 		host->sdio_irq_enabled = false;
-		pm_runtime_mark_last_busy(mmc_dev(mmc));
 		pm_runtime_put_autosuspend(mmc_dev(mmc));
 	}
 }
Signature · 1 line
2.39.5
#96 lore raw

Re: [PATCH 44/80] mmc: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 7 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

I have pulled in pm-runtime-6.17-rc1 and applied the $subject patch for next, thanks!

Kind regards
Uffe

Quoted 199 lines

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/mmc/core/core.c            | 1 -
 drivers/mmc/host/atmel-mci.c       | 2 --
 drivers/mmc/host/mmci.c            | 1 -
 drivers/mmc/host/omap_hsmmc.c      | 3 ---
 drivers/mmc/host/sdhci-esdhc-imx.c | 1 -
 drivers/mmc/host/sdhci-msm.c       | 1 -
 drivers/mmc/host/sdhci-omap.c      | 2 --
 drivers/mmc/host/sdhci-pxav3.c     | 2 --
 drivers/mmc/host/sdhci-sprd.c      | 1 -
 drivers/mmc/host/sdhci_am654.c     | 1 -
 drivers/mmc/host/tmio_mmc_core.c   | 1 -
 11 files changed, 16 deletions(-)
drivers/mmc/core/core.c +0 -1
index a0e2dce70434..874c6fe92855 100644
@@ -882,7 +882,6 @@ void mmc_put_card(struct mmc_card *card, struct mmc_ctx *ctx)
        WARN_ON(ctx && host->claimer != ctx);
 
        mmc_release_host(host);
-       pm_runtime_mark_last_busy(&card->dev);
        pm_runtime_put_autosuspend(&card->dev);
 }
 EXPORT_SYMBOL(mmc_put_card);
drivers/mmc/host/atmel-mci.c +0 -2
index c885c04e938a..43f92f48590f 100644
@@ -541,7 +541,6 @@ static int atmci_regs_show(struct seq_file *s, void *v)
        memcpy_fromio(buf, host->regs, ATMCI_REGS_SIZE);
        spin_unlock_bh(&host->lock);
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        seq_printf(s, "MR:\t0x%08x%s%s ",
@@ -2567,7 +2566,6 @@ static int atmci_probe(struct platform_device *pdev)
        dev_info(dev, "Atmel MCI controller at 0x%08lx irq %d, %u slots\n",
                 host->mapbase, irq, nr_slots);
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return 0;
drivers/mmc/host/mmci.c +0 -1
index c70c64f8adc4..8367283647a9 100644
@@ -2082,7 +2082,6 @@ static void mmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
        spin_unlock_irqrestore(&host->lock, flags);
 
        if (!enable) {
-               pm_runtime_mark_last_busy(mmc_dev(mmc));
                pm_runtime_put_autosuspend(mmc_dev(mmc));
        }
 }
drivers/mmc/host/omap_hsmmc.c +0 -3
index bf3b9f5b067c..adc0d0b6ae37 100644
@@ -1663,7 +1663,6 @@ static int mmc_regs_show(struct seq_file *s, void *data)
        seq_printf(s, "CAPA:\t\t0x%08x\n",
                        OMAP_HSMMC_READ(host->base, CAPA));
 
-       pm_runtime_mark_last_busy(host->dev);
        pm_runtime_put_autosuspend(host->dev);
 
        return 0;
@@ -1954,7 +1953,6 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
        }
 
        omap_hsmmc_debugfs(mmc);
-       pm_runtime_mark_last_busy(host->dev);
        pm_runtime_put_autosuspend(host->dev);
 
        return 0;
@@ -2031,7 +2029,6 @@ static int omap_hsmmc_resume(struct device *dev)
        if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER))
                omap_hsmmc_conf_bus_power(host);
 
-       pm_runtime_mark_last_busy(host->dev);
        pm_runtime_put_autosuspend(host->dev);
        return 0;
 }
drivers/mmc/host/sdhci-esdhc-imx.c +0 -1
index 64c27349d79f..a040c0896a7b 100644
@@ -2108,7 +2108,6 @@ static int sdhci_esdhc_resume(struct device *dev)
            esdhc_is_usdhc(imx_data))
                sdhc_esdhc_tuning_restore(host);
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return ret;
drivers/mmc/host/sdhci-msm.c +0 -1
index 732b65d4b61a..68e56251d5e8 100644
@@ -2750,7 +2750,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)
        if (ret)
                goto pm_runtime_disable;
 
-       pm_runtime_mark_last_busy(&pdev->dev);
        pm_runtime_put_autosuspend(&pdev->dev);
 
        return 0;
drivers/mmc/host/sdhci-omap.c +0 -2
index 429d8a517fb6..cdb09605e009 100644
@@ -1370,7 +1370,6 @@ static int sdhci_omap_probe(struct platform_device *pdev)
                host->mmc->pm_caps |= MMC_PM_KEEP_POWER | MMC_PM_WAKE_SDIO_IRQ;
        }
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return 0;
@@ -1379,7 +1378,6 @@ static int sdhci_omap_probe(struct platform_device *pdev)
        sdhci_cleanup_host(host);
 
 err_rpm_put:
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 err_rpm_disable:
        pm_runtime_dont_use_autosuspend(dev);
drivers/mmc/host/sdhci-pxav3.c +0 -2
index 34abf986573f..1371960e34eb 100644
@@ -494,7 +494,6 @@ static int sdhci_pxav3_suspend(struct device *dev)
        if (host->tuning_mode != SDHCI_TUNING_MODE_3)
                mmc_retune_needed(host->mmc);
        ret = sdhci_suspend_host(host);
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return ret;
@@ -507,7 +506,6 @@ static int sdhci_pxav3_resume(struct device *dev)
 
        pm_runtime_get_sync(dev);
        ret = sdhci_resume_host(host);
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return ret;
drivers/mmc/host/sdhci-sprd.c +0 -1
index a5dec1a0e934..fe2fe52b23b2 100644
@@ -863,7 +863,6 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
        if (ret)
                goto err_cleanup_host;
 
-       pm_runtime_mark_last_busy(&pdev->dev);
        pm_runtime_put_autosuspend(&pdev->dev);
 
        return 0;
drivers/mmc/host/sdhci_am654.c +0 -1
index ea14d56558c4..e2c4a0049d61 100644
@@ -986,7 +986,6 @@ static int sdhci_am654_probe(struct platform_device *pdev)
        /* Setting up autosuspend */
        pm_runtime_set_autosuspend_delay(dev, SDHCI_AM654_AUTOSUSPEND_DELAY);
        pm_runtime_use_autosuspend(dev);
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
        return 0;
 
drivers/mmc/host/tmio_mmc_core.c +0 -2
index 2cec463b5e00..21c2f9095bac 100644
@@ -160,7 +160,6 @@ static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
                sd_ctrl_write16(host, CTL_SDIO_IRQ_MASK, host->sdio_irq_mask);
 
                host->sdio_irq_enabled = false;
-               pm_runtime_mark_last_busy(mmc_dev(mmc));
                pm_runtime_put_autosuspend(mmc_dev(mmc));
        }
 }
--

2.39.5

author maintainer
#97 lore raw

PATCH 45/80 mtd: rawnand: gpmi: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +0 -3
index f4e68008ea03..8c1bf09bdbae 100644
@@ -188,7 +188,6 @@ static int gpmi_init(struct gpmi_nand_data *this)
 	       r->gpmi_regs + HW_GPMI_CTRL1_SET);
 
 err_out:
-	pm_runtime_mark_last_busy(this->dev);
 	pm_runtime_put_autosuspend(this->dev);
 	return ret;
 }
@@ -758,7 +757,6 @@ static int bch_set_geometry(struct gpmi_nand_data *this)
 
 	ret = 0;
 err_out:
-	pm_runtime_mark_last_busy(this->dev);
 	pm_runtime_put_autosuspend(this->dev);
 
 	return ret;
@@ -2664,7 +2662,6 @@ static int gpmi_nfc_exec_op(struct nand_chip *chip,
 	this->bch = false;
 
 out_pm:
-	pm_runtime_mark_last_busy(this->dev);
 	pm_runtime_put_autosuspend(this->dev);
 
 	return ret;
Signature · 1 line
2.39.5
author maintainer
#98 lore raw

PATCH 46/80 net: ethernet: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/net/ethernet/cadence/macb_main.c  | 5 -----
 drivers/net/ethernet/freescale/fec_main.c | 8 --------
 drivers/net/ethernet/renesas/ravb_main.c  | 4 ----
 drivers/net/ethernet/ti/davinci_mdio.c    | 7 -------
 4 files changed, 24 deletions(-)
drivers/net/ethernet/cadence/macb_main.c +0 -5
index 53aaf6b08e39..9b7cbb3e3108 100644
@@ -360,7 +360,6 @@ static int macb_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum)
 	status = MACB_BFEXT(DATA, macb_readl(bp, MAN));
 
 mdio_read_exit:
-	pm_runtime_mark_last_busy(&bp->pdev->dev);
 	pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
@@ -406,7 +405,6 @@ static int macb_mdio_read_c45(struct mii_bus *bus, int mii_id, int devad,
 	status = MACB_BFEXT(DATA, macb_readl(bp, MAN));
 
 mdio_read_exit:
-	pm_runtime_mark_last_busy(&bp->pdev->dev);
 	pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
@@ -438,7 +436,6 @@ static int macb_mdio_write_c22(struct mii_bus *bus, int mii_id, int regnum,
 		goto mdio_write_exit;
 
 mdio_write_exit:
-	pm_runtime_mark_last_busy(&bp->pdev->dev);
 	pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
@@ -484,7 +481,6 @@ static int macb_mdio_write_c45(struct mii_bus *bus, int mii_id,
 		goto mdio_write_exit;
 
 mdio_write_exit:
-	pm_runtime_mark_last_busy(&bp->pdev->dev);
 	pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
@@ -5358,7 +5354,6 @@ static int macb_probe(struct platform_device *pdev)
 		    macb_is_gem(bp) ? "GEM" : "MACB", macb_readl(bp, MID),
 		    dev->base_addr, dev->irq, dev->dev_addr);
 
-	pm_runtime_mark_last_busy(&bp->pdev->dev);
 	pm_runtime_put_autosuspend(&bp->pdev->dev);
 
 	return 0;
drivers/net/ethernet/freescale/fec_main.c +0 -8
index d4eed252ad40..e6979599ae7e 100644
@@ -2207,7 +2207,6 @@ static int fec_enet_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum)
 	ret = FEC_MMFR_DATA(readl(fep->hwp + FEC_MII_DATA));
 
 out:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -2256,7 +2255,6 @@ static int fec_enet_mdio_read_c45(struct mii_bus *bus, int mii_id,
 	ret = FEC_MMFR_DATA(readl(fep->hwp + FEC_MII_DATA));
 
 out:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -2288,7 +2286,6 @@ static int fec_enet_mdio_write_c22(struct mii_bus *bus, int mii_id, int regnum,
 	if (ret)
 		netdev_err(fep->netdev, "MDIO write timeout\n");
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -2332,7 +2329,6 @@ static int fec_enet_mdio_write_c45(struct mii_bus *bus, int mii_id,
 		netdev_err(fep->netdev, "MDIO write timeout\n");
 
 out:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -2814,7 +2810,6 @@ static void fec_enet_get_regs(struct net_device *ndev,
 		buf[off] = readl(&theregs[off]);
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 }
 
@@ -3590,7 +3585,6 @@ fec_enet_open(struct net_device *ndev)
 err_enet_alloc:
 	fec_enet_clk_enable(ndev, false);
 clk_enable:
-	pm_runtime_mark_last_busy(&fep->pdev->dev);
 	pm_runtime_put_autosuspend(&fep->pdev->dev);
 	pinctrl_pm_select_sleep_state(&fep->pdev->dev);
 	return ret;
@@ -3621,7 +3615,6 @@ fec_enet_close(struct net_device *ndev)
 		cpu_latency_qos_remove_request(&fep->pm_qos_req);
 
 	pinctrl_pm_select_sleep_state(&fep->pdev->dev);
-	pm_runtime_mark_last_busy(&fep->pdev->dev);
 	pm_runtime_put_autosuspend(&fep->pdev->dev);
 
 	fec_enet_free_buffers(ndev);
@@ -4568,7 +4561,6 @@ fec_probe(struct platform_device *pdev)
 
 	INIT_WORK(&fep->tx_timeout_work, fec_enet_timeout_work);
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
drivers/net/ethernet/renesas/ravb_main.c +0 -4
index c9f4976a3527..b8bfc3cdbb6b 100644
@@ -1974,7 +1974,6 @@ static int ravb_open(struct net_device *ndev)
 out_set_reset:
 	ravb_set_opmode(ndev, CCC_OPC_RESET);
 out_rpm_put:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 out_napi_off:
 	if (info->nc_queues)
@@ -2383,7 +2382,6 @@ static int ravb_close(struct net_device *ndev)
 	if (error)
 		return error;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -3089,7 +3087,6 @@ static int ravb_probe(struct platform_device *pdev)
 	netdev_info(ndev, "Base address at %#x, %pM, IRQ %d.\n",
 		    (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
@@ -3274,7 +3271,6 @@ static int ravb_resume(struct device *dev)
 
 out_rpm_put:
 	if (!priv->wol_enabled) {
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 	}
 
drivers/net/ethernet/ti/davinci_mdio.c +0 -7
index 68507126be8e..9f049ebbf107 100644
@@ -234,7 +234,6 @@ static int davinci_mdiobb_read_c22(struct mii_bus *bus, int phy, int reg)
 
 	ret = mdiobb_read_c22(bus, phy, reg);
 
-	pm_runtime_mark_last_busy(bus->parent);
 	pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
@@ -251,7 +250,6 @@ static int davinci_mdiobb_write_c22(struct mii_bus *bus, int phy, int reg,
 
 	ret = mdiobb_write_c22(bus, phy, reg, val);
 
-	pm_runtime_mark_last_busy(bus->parent);
 	pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
@@ -268,7 +266,6 @@ static int davinci_mdiobb_read_c45(struct mii_bus *bus, int phy, int devad,
 
 	ret = mdiobb_read_c45(bus, phy, devad, reg);
 
-	pm_runtime_mark_last_busy(bus->parent);
 	pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
@@ -285,7 +282,6 @@ static int davinci_mdiobb_write_c45(struct mii_bus *bus, int phy, int devad,
 
 	ret = mdiobb_write_c45(bus, phy, devad, reg, val);
 
-	pm_runtime_mark_last_busy(bus->parent);
 	pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
@@ -332,7 +328,6 @@ static int davinci_mdio_common_reset(struct davinci_mdio_data *data)
 	data->bus->phy_mask = phy_mask;
 
 done:
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
@@ -441,7 +436,6 @@ static int davinci_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 	return ret;
 }
@@ -478,7 +472,6 @@ static int davinci_mdio_write(struct mii_bus *bus, int phy_id,
 		break;
 	}
 
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 46/80
#99 lore raw

Re: [PATCH 46/80] net: ethernet: Remove redundant pm_runtime_mark_last_busy() calls

Hej Sakari,

Thanks for your work, this is a nice improvement!

Quoted 14 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

Quoted 6 lines
        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/net/ethernet/cadence/macb_main.c  | 5 -----
 drivers/net/ethernet/freescale/fec_main.c | 8 --------
 drivers/net/ethernet/renesas/ravb_main.c  | 4 ----

For RAVB,

Quoted 214 lines
 drivers/net/ethernet/ti/davinci_mdio.c    | 7 -------
 4 files changed, 24 deletions(-)
drivers/net/ethernet/cadence/macb_main.c +0 -5
index 53aaf6b08e39..9b7cbb3e3108 100644
@@ -360,7 +360,6 @@ static int macb_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum)
 	status = MACB_BFEXT(DATA, macb_readl(bp, MAN));
 
 mdio_read_exit:
-	pm_runtime_mark_last_busy(&bp->pdev->dev);
 	pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
@@ -406,7 +405,6 @@ static int macb_mdio_read_c45(struct mii_bus *bus, int mii_id, int devad,
 	status = MACB_BFEXT(DATA, macb_readl(bp, MAN));
 
 mdio_read_exit:
-	pm_runtime_mark_last_busy(&bp->pdev->dev);
 	pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
@@ -438,7 +436,6 @@ static int macb_mdio_write_c22(struct mii_bus *bus, int mii_id, int regnum,
 		goto mdio_write_exit;
 
 mdio_write_exit:
-	pm_runtime_mark_last_busy(&bp->pdev->dev);
 	pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
@@ -484,7 +481,6 @@ static int macb_mdio_write_c45(struct mii_bus *bus, int mii_id,
 		goto mdio_write_exit;
 
 mdio_write_exit:
-	pm_runtime_mark_last_busy(&bp->pdev->dev);
 	pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
@@ -5358,7 +5354,6 @@ static int macb_probe(struct platform_device *pdev)
 		    macb_is_gem(bp) ? "GEM" : "MACB", macb_readl(bp, MID),
 		    dev->base_addr, dev->irq, dev->dev_addr);
 
-	pm_runtime_mark_last_busy(&bp->pdev->dev);
 	pm_runtime_put_autosuspend(&bp->pdev->dev);
 
 	return 0;
drivers/net/ethernet/freescale/fec_main.c +0 -8
index d4eed252ad40..e6979599ae7e 100644
@@ -2207,7 +2207,6 @@ static int fec_enet_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum)
 	ret = FEC_MMFR_DATA(readl(fep->hwp + FEC_MII_DATA));
 
 out:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -2256,7 +2255,6 @@ static int fec_enet_mdio_read_c45(struct mii_bus *bus, int mii_id,
 	ret = FEC_MMFR_DATA(readl(fep->hwp + FEC_MII_DATA));
 
 out:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -2288,7 +2286,6 @@ static int fec_enet_mdio_write_c22(struct mii_bus *bus, int mii_id, int regnum,
 	if (ret)
 		netdev_err(fep->netdev, "MDIO write timeout\n");
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -2332,7 +2329,6 @@ static int fec_enet_mdio_write_c45(struct mii_bus *bus, int mii_id,
 		netdev_err(fep->netdev, "MDIO write timeout\n");
 
 out:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -2814,7 +2810,6 @@ static void fec_enet_get_regs(struct net_device *ndev,
 		buf[off] = readl(&theregs[off]);
 	}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 }
 
@@ -3590,7 +3585,6 @@ fec_enet_open(struct net_device *ndev)
 err_enet_alloc:
 	fec_enet_clk_enable(ndev, false);
 clk_enable:
-	pm_runtime_mark_last_busy(&fep->pdev->dev);
 	pm_runtime_put_autosuspend(&fep->pdev->dev);
 	pinctrl_pm_select_sleep_state(&fep->pdev->dev);
 	return ret;
@@ -3621,7 +3615,6 @@ fec_enet_close(struct net_device *ndev)
 		cpu_latency_qos_remove_request(&fep->pm_qos_req);
 
 	pinctrl_pm_select_sleep_state(&fep->pdev->dev);
-	pm_runtime_mark_last_busy(&fep->pdev->dev);
 	pm_runtime_put_autosuspend(&fep->pdev->dev);
 
 	fec_enet_free_buffers(ndev);
@@ -4568,7 +4561,6 @@ fec_probe(struct platform_device *pdev)
 
 	INIT_WORK(&fep->tx_timeout_work, fec_enet_timeout_work);
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
drivers/net/ethernet/renesas/ravb_main.c +0 -4
index c9f4976a3527..b8bfc3cdbb6b 100644
@@ -1974,7 +1974,6 @@ static int ravb_open(struct net_device *ndev)
 out_set_reset:
 	ravb_set_opmode(ndev, CCC_OPC_RESET);
 out_rpm_put:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 out_napi_off:
 	if (info->nc_queues)
@@ -2383,7 +2382,6 @@ static int ravb_close(struct net_device *ndev)
 	if (error)
 		return error;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -3089,7 +3087,6 @@ static int ravb_probe(struct platform_device *pdev)
 	netdev_info(ndev, "Base address at %#x, %pM, IRQ %d.\n",
 		    (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
@@ -3274,7 +3271,6 @@ static int ravb_resume(struct device *dev)
 
 out_rpm_put:
 	if (!priv->wol_enabled) {
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 	}
 
drivers/net/ethernet/ti/davinci_mdio.c +0 -7
index 68507126be8e..9f049ebbf107 100644
@@ -234,7 +234,6 @@ static int davinci_mdiobb_read_c22(struct mii_bus *bus, int phy, int reg)
 
 	ret = mdiobb_read_c22(bus, phy, reg);
 
-	pm_runtime_mark_last_busy(bus->parent);
 	pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
@@ -251,7 +250,6 @@ static int davinci_mdiobb_write_c22(struct mii_bus *bus, int phy, int reg,
 
 	ret = mdiobb_write_c22(bus, phy, reg, val);
 
-	pm_runtime_mark_last_busy(bus->parent);
 	pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
@@ -268,7 +266,6 @@ static int davinci_mdiobb_read_c45(struct mii_bus *bus, int phy, int devad,
 
 	ret = mdiobb_read_c45(bus, phy, devad, reg);
 
-	pm_runtime_mark_last_busy(bus->parent);
 	pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
@@ -285,7 +282,6 @@ static int davinci_mdiobb_write_c45(struct mii_bus *bus, int phy, int devad,
 
 	ret = mdiobb_write_c45(bus, phy, devad, reg, val);
 
-	pm_runtime_mark_last_busy(bus->parent);
 	pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
@@ -332,7 +328,6 @@ static int davinci_mdio_common_reset(struct davinci_mdio_data *data)
 	data->bus->phy_mask = phy_mask;
 
 done:
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
@@ -441,7 +436,6 @@ static int davinci_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg)
 		break;
 	}
 
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 	return ret;
 }
@@ -478,7 +472,6 @@ static int davinci_mdio_write(struct mii_bus *bus, int phy_id,
 		break;
 	}
 
-	pm_runtime_mark_last_busy(data->dev);
 	pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
Signature · 1 line
2.39.5
Signature · 2 lines
Kind Regards,
Niklas Söderlund
author maintainer
#100 lore raw

PATCH 47/80 net: ipa: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/net/ipa/ipa_interrupt.c | 1 -
 drivers/net/ipa/ipa_main.c      | 1 -
 drivers/net/ipa/ipa_modem.c     | 4 ----
 drivers/net/ipa/ipa_smp2p.c     | 2 --
 drivers/net/ipa/ipa_uc.c        | 2 --
 5 files changed, 10 deletions(-)
drivers/net/ipa/ipa_interrupt.c +0 -1
index 245a06997055..8336596b1247 100644
@@ -149,7 +149,6 @@ static irqreturn_t ipa_isr_thread(int irq, void *dev_id)
 		iowrite32(pending, ipa->reg_virt + reg_offset(reg));
 	}
 out_power_put:
-	pm_runtime_mark_last_busy(dev);
 	(void)pm_runtime_put_autosuspend(dev);
 
 	return IRQ_HANDLED;
drivers/net/ipa/ipa_main.c +0 -1
index f25f6e2cf58c..b37516de01fa 100644
@@ -911,7 +911,6 @@ static int ipa_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_deconfig;
 done:
-	pm_runtime_mark_last_busy(dev);
 	(void)pm_runtime_put_autosuspend(dev);
 
 	return 0;
drivers/net/ipa/ipa_modem.c +0 -4
index 8fe0d0e1a00f..9b136f6b8b4a 100644
@@ -71,7 +71,6 @@ static int ipa_open(struct net_device *netdev)
 
 	netif_start_queue(netdev);
 
-	pm_runtime_mark_last_busy(dev);
 	(void)pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -102,7 +101,6 @@ static int ipa_stop(struct net_device *netdev)
 	ipa_endpoint_disable_one(priv->rx);
 	ipa_endpoint_disable_one(priv->tx);
 out_power_put:
-	pm_runtime_mark_last_busy(dev);
 	(void)pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -175,7 +173,6 @@ ipa_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 
 	ret = ipa_endpoint_skb_tx(endpoint, skb);
 
-	pm_runtime_mark_last_busy(dev);
 	(void)pm_runtime_put_autosuspend(dev);
 
 	if (ret) {
@@ -432,7 +429,6 @@ static void ipa_modem_crashed(struct ipa *ipa)
 		dev_err(dev, "error %d zeroing modem memory regions\n", ret);
 
 out_power_put:
-	pm_runtime_mark_last_busy(dev);
 	(void)pm_runtime_put_autosuspend(dev);
 }
 
drivers/net/ipa/ipa_smp2p.c +0 -2
index fcaadd111a8a..420098796eec 100644
@@ -171,7 +171,6 @@ static irqreturn_t ipa_smp2p_modem_setup_ready_isr(int irq, void *dev_id)
 	WARN(ret != 0, "error %d from ipa_setup()\n", ret);
 
 out_power_put:
-	pm_runtime_mark_last_busy(dev);
 	(void)pm_runtime_put_autosuspend(dev);
 
 	return IRQ_HANDLED;
@@ -213,7 +212,6 @@ static void ipa_smp2p_power_release(struct ipa *ipa)
 	if (!ipa->smp2p->power_on)
 		return;
 
-	pm_runtime_mark_last_busy(dev);
 	(void)pm_runtime_put_autosuspend(dev);
 	ipa->smp2p->power_on = false;
 }
drivers/net/ipa/ipa_uc.c +0 -2
index 2963db83ab6b..dc7e92f2a4fb 100644
@@ -158,7 +158,6 @@ static void ipa_uc_response_hdlr(struct ipa *ipa)
 		if (ipa->uc_powered) {
 			ipa->uc_loaded = true;
 			ipa_power_retention(ipa, true);
-			pm_runtime_mark_last_busy(dev);
 			(void)pm_runtime_put_autosuspend(dev);
 			ipa->uc_powered = false;
 		} else {
@@ -203,7 +202,6 @@ void ipa_uc_deconfig(struct ipa *ipa)
 	if (!ipa->uc_powered)
 		return;
 
-	pm_runtime_mark_last_busy(dev);
 	(void)pm_runtime_put_autosuspend(dev);
 }
 
Signature · 1 line
2.39.5
author maintainer
#101 lore raw

PATCH 48/80 net: wireless: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/net/wireless/ath/wil6210/pm.c       |  1 -
 drivers/net/wireless/ti/wl18xx/debugfs.c    |  3 --
 drivers/net/wireless/ti/wlcore/cmd.c        |  1 -
 drivers/net/wireless/ti/wlcore/debugfs.c    | 11 -------
 drivers/net/wireless/ti/wlcore/main.c       | 36 ---------------------
 drivers/net/wireless/ti/wlcore/scan.c       |  1 -
 drivers/net/wireless/ti/wlcore/sysfs.c      |  1 -
 drivers/net/wireless/ti/wlcore/testmode.c   |  2 --
 drivers/net/wireless/ti/wlcore/tx.c         |  1 -
 drivers/net/wireless/ti/wlcore/vendor_cmd.c |  3 --
 10 files changed, 60 deletions(-)
drivers/net/wireless/ath/wil6210/pm.c +0 -1
index f521af575e9b..c866cfd144c7 100644
@@ -458,6 +458,5 @@ void wil_pm_runtime_put(struct wil6210_priv *wil)
 {
 	struct device *dev = wil_to_dev(wil);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 }
drivers/net/wireless/ti/wl18xx/debugfs.c +0 -3
index 80fbf740fe6d..ac756318e8ea 100644
@@ -272,7 +272,6 @@ static ssize_t radar_detection_write(struct file *file,
 	if (ret < 0)
 		count = ret;
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -312,7 +311,6 @@ static ssize_t dynamic_fw_traces_write(struct file *file,
 	if (ret < 0)
 		count = ret;
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -374,7 +372,6 @@ static ssize_t radar_debug_mode_write(struct file *file,
 				       wl->radar_debug_mode, 0);
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
drivers/net/wireless/ti/wlcore/cmd.c +0 -1
index fa3a3f71dd15..9d73ba933a16 100644
@@ -213,7 +213,6 @@ int wlcore_cmd_wait_for_event_or_timeout(struct wl1271 *wl,
 	} while (!event);
 
 out:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 free_vector:
 	kfree(events_vector);
drivers/net/wireless/ti/wlcore/debugfs.c +0 -11
index eb3d3f0e0b4d..bbfd2725215b 100644
@@ -63,7 +63,6 @@ void wl1271_debugfs_update_stats(struct wl1271 *wl)
 		wl->stats.fw_stats_update = jiffies;
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -113,7 +112,6 @@ static void chip_op_handler(struct wl1271 *wl, unsigned long value,
 	chip_op = arg;
 	chip_op(wl);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 }
 
@@ -287,7 +285,6 @@ static ssize_t dynamic_ps_timeout_write(struct file *file,
 			wl1271_ps_set_mode(wl, wlvif, STATION_AUTO_PS_MODE);
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -357,7 +354,6 @@ static ssize_t forced_ps_write(struct file *file,
 			wl1271_ps_set_mode(wl, wlvif, ps_mode);
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -830,7 +826,6 @@ static ssize_t rx_streaming_interval_write(struct file *file,
 		wl1271_recalc_rx_streaming(wl, wlvif);
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -886,7 +881,6 @@ static ssize_t rx_streaming_always_write(struct file *file,
 		wl1271_recalc_rx_streaming(wl, wlvif);
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -934,7 +928,6 @@ static ssize_t beacon_filtering_write(struct file *file,
 		ret = wl1271_acx_beacon_filter_opt(wl, wlvif, !!value);
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -1015,7 +1008,6 @@ static ssize_t sleep_auth_write(struct file *file,
 		goto out_sleep;
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -1090,7 +1082,6 @@ static ssize_t dev_mem_read(struct file *file,
 		goto part_err;
 
 part_err:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 skip_read:
@@ -1172,7 +1163,6 @@ static ssize_t dev_mem_write(struct file *file, const char __user *user_buf,
 		goto part_err;
 
 part_err:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 skip_write:
@@ -1247,7 +1237,6 @@ static ssize_t fw_logger_write(struct file *file,
 
 	ret = wl12xx_cmd_config_fwlog(wl);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
drivers/net/wireless/ti/wlcore/main.c +0 -36
index 6116a8522d96..12f0167d7380 100644
@@ -154,7 +154,6 @@ static void wl1271_rx_streaming_enable_work(struct work_struct *work)
 		  jiffies + msecs_to_jiffies(wl->conf.rx_streaming.duration));
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -181,7 +180,6 @@ static void wl1271_rx_streaming_disable_work(struct work_struct *work)
 		goto out_sleep;
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -234,7 +232,6 @@ static void wlcore_rc_update_work(struct work_struct *work)
 	}
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -711,7 +708,6 @@ static int wlcore_irq_locked(struct wl1271 *wl)
 	}
 
 err_ret:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -1047,7 +1043,6 @@ static void wl1271_recovery_work(struct work_struct *work)
 	}
 
 	wlcore_op_stop_locked(wl);
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 	ieee80211_restart_hw(wl->hw);
@@ -1943,7 +1938,6 @@ static int __maybe_unused wl1271_op_resume(struct ieee80211_hw *hw)
 		goto out_sleep;
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -2131,7 +2125,6 @@ static void wlcore_channel_switch_work(struct work_struct *work)
 
 	wl12xx_cmd_stop_channel_switch(wl, wlvif);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -2201,7 +2194,6 @@ static void wlcore_pending_auth_complete_work(struct work_struct *work)
 	/* cancel the ROC if active */
 	wlcore_update_inconn_sta(wl, wlvif, NULL, false);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -2694,7 +2686,6 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
 	else
 		wl->sta_count++;
 out:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out_unlock:
 	mutex_unlock(&wl->mutex);
@@ -2774,7 +2765,6 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
 			}
 		}
 
-		pm_runtime_mark_last_busy(wl->dev);
 		pm_runtime_put_autosuspend(wl->dev);
 	}
 deinit:
@@ -3200,7 +3190,6 @@ static int wl1271_op_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
 	}
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -3315,7 +3304,6 @@ static void wl1271_op_configure_filter(struct ieee80211_hw *hw,
 	 */
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -3531,7 +3519,6 @@ static int wlcore_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 
 	ret = wlcore_hw_set_key(wl, cmd, vif, sta, key_conf);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out_wake_queues:
@@ -3695,7 +3682,6 @@ static void wl1271_op_set_default_key_idx(struct ieee80211_hw *hw,
 	}
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out_unlock:
@@ -3724,7 +3710,6 @@ void wlcore_regdomain_config(struct wl1271 *wl)
 		goto out;
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -3772,7 +3757,6 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
 
 	ret = wlcore_scan(hw->priv, vif, ssid, len, req);
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -3823,7 +3807,6 @@ static void wl1271_op_cancel_hw_scan(struct ieee80211_hw *hw,
 	ieee80211_scan_completed(wl->hw, &info);
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -3860,7 +3843,6 @@ static int wl1271_op_sched_scan_start(struct ieee80211_hw *hw,
 	wl->sched_vif = wlvif;
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -3887,7 +3869,6 @@ static int wl1271_op_sched_scan_stop(struct ieee80211_hw *hw,
 
 	wl->ops->sched_scan_stop(wl, wlvif);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -3916,7 +3897,6 @@ static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw,
 	if (ret < 0)
 		wl1271_warning("wl1271_op_set_frag_threshold failed: %d", ret);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -3948,7 +3928,6 @@ static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
 		if (ret < 0)
 			wl1271_warning("set rts threshold failed: %d", ret);
 	}
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -4714,7 +4693,6 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
 	else
 		wl1271_bss_info_changed_sta(wl, vif, bss_conf, changed);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -4779,7 +4757,6 @@ static void wlcore_op_change_chanctx(struct ieee80211_hw *hw,
 		}
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -4828,7 +4805,6 @@ static int wlcore_op_assign_vif_chanctx(struct ieee80211_hw *hw,
 		wlvif->radar_enabled = true;
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -4871,7 +4847,6 @@ static void wlcore_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
 		wlvif->radar_enabled = false;
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -4941,7 +4916,6 @@ wlcore_op_switch_vif_chanctx(struct ieee80211_hw *hw,
 			goto out_sleep;
 	}
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -4995,7 +4969,6 @@ static int wl1271_op_conf_tx(struct ieee80211_hw *hw,
 				 0, 0);
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -5029,7 +5002,6 @@ static u64 wl1271_op_get_tsf(struct ieee80211_hw *hw,
 		goto out_sleep;
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -5342,7 +5314,6 @@ static int wl12xx_op_sta_state(struct ieee80211_hw *hw,
 
 	ret = wl12xx_update_sta_state(wl, wlvif, sta, old_state, new_state);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -5467,7 +5438,6 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
 		ret = -EINVAL;
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -5511,7 +5481,6 @@ static int wl12xx_set_bitrate_mask(struct ieee80211_hw *hw,
 			wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set);
 		ret = wl1271_acx_sta_rate_policies(wl, wlvif);
 
-		pm_runtime_mark_last_busy(wl->dev);
 		pm_runtime_put_autosuspend(wl->dev);
 	}
 out:
@@ -5566,7 +5535,6 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
 	}
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
@@ -5645,7 +5613,6 @@ static void wlcore_op_channel_switch_beacon(struct ieee80211_hw *hw,
 	set_bit(WLVIF_FLAG_CS_PROGRESS, &wlvif->flags);
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -5699,7 +5666,6 @@ static int wlcore_op_remain_on_channel(struct ieee80211_hw *hw,
 	ieee80211_queue_delayed_work(hw, &wl->roc_complete_work,
 				     msecs_to_jiffies(duration));
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -5748,7 +5714,6 @@ static int wlcore_roc_completed(struct wl1271 *wl)
 
 	ret = __wlcore_roc_completed(wl);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -5839,7 +5804,6 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw,
 	sinfo->signal = rssi_dbm;
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 out:
drivers/net/wireless/ti/wlcore/scan.c +0 -1
index b414305acc32..f6dc54c1dbad 100644
@@ -69,7 +69,6 @@ void wl1271_scan_complete_work(struct work_struct *work)
 
 	wlcore_cmd_regdomain_config_locked(wl);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
 	ieee80211_scan_completed(wl->hw, &info);
drivers/net/wireless/ti/wlcore/sysfs.c +0 -1
index 65ca5dc569a0..5ab6c1683675 100644
@@ -58,7 +58,6 @@ static ssize_t bt_coex_state_store(struct device *dev,
 		goto out;
 
 	wl1271_acx_sg_enable(wl, wl->sg_enabled);
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 
  out:
drivers/net/wireless/ti/wlcore/testmode.c +0 -2
index fc8ea58bc165..7c0cb1b7fef0 100644
@@ -127,7 +127,6 @@ static int wl1271_tm_cmd_test(struct wl1271 *wl, struct nlattr *tb[])
 	}
 
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -192,7 +191,6 @@ static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[])
 out_free:
 	kfree(cmd);
 out_sleep:
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
drivers/net/wireless/ti/wlcore/tx.c +0 -1
index 464587d16ab2..f76087be2f75 100644
@@ -863,7 +863,6 @@ void wl1271_tx_work(struct work_struct *work)
 		goto out;
 	}
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
drivers/net/wireless/ti/wlcore/vendor_cmd.c +0 -3
index e4269e2b0098..5bb9eb300f97 100644
@@ -60,7 +60,6 @@ wlcore_vendor_cmd_smart_config_start(struct wiphy *wiphy,
 	ret = wlcore_smart_config_start(wl,
 			nla_get_u32(tb[WLCORE_VENDOR_ATTR_GROUP_ID]));
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -92,7 +91,6 @@ wlcore_vendor_cmd_smart_config_stop(struct wiphy *wiphy,
 
 	ret = wlcore_smart_config_stop(wl);
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
@@ -140,7 +138,6 @@ wlcore_vendor_cmd_smart_config_set_group_key(struct wiphy *wiphy,
 			nla_len(tb[WLCORE_VENDOR_ATTR_GROUP_KEY]),
 			nla_data(tb[WLCORE_VENDOR_ATTR_GROUP_KEY]));
 
-	pm_runtime_mark_last_busy(wl->dev);
 	pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
Signature · 1 line
2.39.5
author maintainer
#102 lore raw

PATCH 49/80 net: wwan: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/net/wwan/qcom_bam_dmux.c           | 2 --
 drivers/net/wwan/t7xx/t7xx_hif_cldma.c     | 3 ---
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c | 2 --
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c | 2 --
 4 files changed, 9 deletions(-)
drivers/net/wwan/qcom_bam_dmux.c +0 -2
index 64dab8b57611..6a5b22589af4 100644
@@ -162,7 +162,6 @@ static void bam_dmux_tx_done(struct bam_dmux_skb_dma *skb_dma)
 	struct bam_dmux *dmux = skb_dma->dmux;
 	unsigned long flags;
 
-	pm_runtime_mark_last_busy(dmux->dev);
 	pm_runtime_put_autosuspend(dmux->dev);
 
 	if (skb_dma->addr)
@@ -397,7 +396,6 @@ static void bam_dmux_tx_wakeup_work(struct work_struct *work)
 	dma_async_issue_pending(dmux->tx);
 
 out:
-	pm_runtime_mark_last_busy(dmux->dev);
 	pm_runtime_put_autosuspend(dmux->dev);
 }
 
drivers/net/wwan/t7xx/t7xx_hif_cldma.c +0 -3
index 97163e1e5783..689c920ca898 100644
@@ -250,7 +250,6 @@ static void t7xx_cldma_rx_done(struct work_struct *work)
 	t7xx_cldma_clear_ip_busy(&md_ctrl->hw_info);
 	t7xx_cldma_hw_irq_en_txrx(&md_ctrl->hw_info, queue->index, MTK_RX);
 	t7xx_cldma_hw_irq_en_eq(&md_ctrl->hw_info, queue->index, MTK_RX);
-	pm_runtime_mark_last_busy(md_ctrl->dev);
 	pm_runtime_put_autosuspend(md_ctrl->dev);
 }
 
@@ -362,7 +361,6 @@ static void t7xx_cldma_tx_done(struct work_struct *work)
 	}
 	spin_unlock_irqrestore(&md_ctrl->cldma_lock, flags);
 
-	pm_runtime_mark_last_busy(md_ctrl->dev);
 	pm_runtime_put_autosuspend(md_ctrl->dev);
 }
 
@@ -987,7 +985,6 @@ int t7xx_cldma_send_skb(struct cldma_ctrl *md_ctrl, int qno, struct sk_buff *skb
 
 allow_sleep:
 	t7xx_pci_enable_sleep(md_ctrl->t7xx_dev);
-	pm_runtime_mark_last_busy(md_ctrl->dev);
 	pm_runtime_put_autosuspend(md_ctrl->dev);
 	return ret;
 }
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c +0 -2
index 6a7a26085fc7..15d2a65a51de 100644
@@ -877,7 +877,6 @@ int t7xx_dpmaif_napi_rx_poll(struct napi_struct *napi, const int budget)
 		t7xx_dpmaif_clr_ip_busy_sts(&rxq->dpmaif_ctrl->hw_info);
 		t7xx_dpmaif_dlq_unmask_rx_done(&rxq->dpmaif_ctrl->hw_info, rxq->index);
 		t7xx_pci_enable_sleep(rxq->dpmaif_ctrl->t7xx_dev);
-		pm_runtime_mark_last_busy(rxq->dpmaif_ctrl->dev);
 		pm_runtime_put_autosuspend(rxq->dpmaif_ctrl->dev);
 		atomic_set(&rxq->rx_processing, 0);
 	} else {
@@ -1078,7 +1077,6 @@ static void t7xx_dpmaif_bat_release_work(struct work_struct *work)
 	}
 
 	t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
-	pm_runtime_mark_last_busy(dpmaif_ctrl->dev);
 	pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
 }
 
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c +0 -2
index 8dab025a088a..236d632cf591 100644
@@ -185,7 +185,6 @@ static void t7xx_dpmaif_tx_done(struct work_struct *work)
 	}
 
 	t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
-	pm_runtime_mark_last_busy(dpmaif_ctrl->dev);
 	pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
 }
 
@@ -468,7 +467,6 @@ static int t7xx_dpmaif_tx_hw_push_thread(void *arg)
 		t7xx_pci_disable_sleep(dpmaif_ctrl->t7xx_dev);
 		t7xx_do_tx_hw_push(dpmaif_ctrl);
 		t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
-		pm_runtime_mark_last_busy(dpmaif_ctrl->dev);
 		pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
 	}
 
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 49/80
#103 lore raw

Re: [PATCH 49/80] net: wwan: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 14 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

Quoted 8 lines
         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                 pm-runtime-6.17-rc1
  drivers/net/wwan/qcom_bam_dmux.c           | 2 --
  drivers/net/wwan/t7xx/t7xx_hif_cldma.c     | 3 ---
  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c | 2 --
  drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c | 2 --
  4 files changed, 9 deletions(-)
author maintainer
#104 lore raw

PATCH 50/80 nfc: trf7970a: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/nfc/trf7970a.c | 1 -
 1 file changed, 1 deletion(-)
drivers/nfc/trf7970a.c +0 -1
index d17c701c7888..2d0d348aa278 100644
@@ -1139,7 +1139,6 @@ static void trf7970a_switch_rf_off(struct trf7970a *trf)
 	trf->aborting = false;
 	trf->state = TRF7970A_ST_RF_OFF;
 
-	pm_runtime_mark_last_busy(trf->dev);
 	pm_runtime_put_autosuspend(trf->dev);
 }
 
Signature · 1 line
2.39.5
#105 lore raw

Re: [PATCH 50/80] nfc: trf7970a: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 5 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

Quoted 9 lines

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

You did not send cover letter to people, so this changelog should explain what I should do with this patch (what is the merging/dependency).

Best regards,
Krzysztof

author maintainer
#106 lore raw

Re: [PATCH 50/80] nfc: trf7970a: Remove redundant pm_runtime_mark_last_busy() calls

Hi Krzysztof,

Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

Quoted 7 lines
Quoted 4 lines

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

You did not send cover letter to people, so this changelog should explain what I should do with this patch (what is the merging/dependency).

I didn't as it would have had too many recipients (more than 200 in fact). As you may have noticed, the URL for the cover letter is a few lines above, also its Message-ID can be found in the In-reply-to: header.

Signature · 3 lines
Kind regards,

Sakari Ailus
author maintainer
#107 lore raw

PATCH 51/80 PCI/portdrv: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/pci/pcie/portdrv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/pci/pcie/portdrv.c +0 -1
index e8318fd5f6ed..437e27f63c82 100644
@@ -714,7 +714,6 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
 		 */
 		pm_runtime_set_autosuspend_delay(&dev->dev, 100);
 		pm_runtime_use_autosuspend(&dev->dev);
-		pm_runtime_mark_last_busy(&dev->dev);
 		pm_runtime_put_autosuspend(&dev->dev);
 		pm_runtime_allow(&dev->dev);
 	}
Signature · 1 line
2.39.5
author maintainer
#108 lore raw

PATCH 52/80 phy: motorola: phy-mapphone-mdm6600: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/phy/motorola/phy-mapphone-mdm6600.c | 2 --
 1 file changed, 2 deletions(-)
drivers/phy/motorola/phy-mapphone-mdm6600.c +0 -2
index fd0e0cd1c1cf..c82826bd2832 100644
@@ -248,7 +248,6 @@ static irqreturn_t phy_mdm6600_wakeirq_thread(int irq, void *data)
 	}
 
 	/* Just wake-up and kick the autosuspend timer */
-	pm_runtime_mark_last_busy(ddata->dev);
 	pm_runtime_put_autosuspend(ddata->dev);
 
 	return IRQ_HANDLED;
@@ -616,7 +615,6 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
 		error = PTR_ERR(ddata->phy_provider);
 
 idle:
-	pm_runtime_mark_last_busy(ddata->dev);
 	pm_runtime_put_autosuspend(ddata->dev);
 
 cleanup:
Signature · 1 line
2.39.5
author maintainer
#109 lore raw

PATCH 53/80 phy: ti: phy-twl4030-usb: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/phy/ti/phy-twl4030-usb.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/phy/ti/phy-twl4030-usb.c +0 -3
index a26aec3ab29e..1d26189ace4f 100644
@@ -505,7 +505,6 @@ static int twl4030_phy_power_on(struct phy *phy)
 	dev_dbg(twl->dev, "%s\n", __func__);
 	pm_runtime_get_sync(twl->dev);
 	schedule_delayed_work(&twl->id_workaround_work, HZ);
-	pm_runtime_mark_last_busy(twl->dev);
 	pm_runtime_put_autosuspend(twl->dev);
 
 	return 0;
@@ -598,7 +597,6 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
 		if (atomic_add_unless(&twl->connected, -1, 0)) {
 			dev_dbg(twl->dev, "%s: cable disconnected %i\n",
 				__func__, status);
-			pm_runtime_mark_last_busy(twl->dev);
 			pm_runtime_put_autosuspend(twl->dev);
 			twl->musb_mailbox_pending = true;
 		}
@@ -636,7 +634,6 @@ static int twl4030_phy_init(struct phy *phy)
 	pm_runtime_get_sync(twl->dev);
 	twl->linkstat = MUSB_UNKNOWN;
 	schedule_delayed_work(&twl->id_workaround_work, HZ);
-	pm_runtime_mark_last_busy(twl->dev);
 	pm_runtime_put_autosuspend(twl->dev);
 
 	return 0;
Signature · 1 line
2.39.5
author maintainer
#110 lore raw

PATCH 54/80 power: supply: bq24190: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/power/supply/bq24190_charger.c | 14 --------------
 1 file changed, 14 deletions(-)
drivers/power/supply/bq24190_charger.c +0 -14
index 2c3804e1207e..e1510c7fdab3 100644
@@ -504,7 +504,6 @@ static ssize_t bq24190_sysfs_show(struct device *dev,
 	else
 		count = sysfs_emit(buf, "%hhx\n", v);
 
-	pm_runtime_mark_last_busy(bdi->dev);
 	pm_runtime_put_autosuspend(bdi->dev);
 
 	return count;
@@ -535,7 +534,6 @@ static ssize_t bq24190_sysfs_store(struct device *dev,
 	if (ret)
 		count = ret;
 
-	pm_runtime_mark_last_busy(bdi->dev);
 	pm_runtime_put_autosuspend(bdi->dev);
 
 	return count;
@@ -562,7 +560,6 @@ static int bq24190_set_otg_vbus(struct bq24190_dev_info *bdi, bool enable)
 	else
 		ret = bq24190_charger_set_charge_type(bdi, &val);
 
-	pm_runtime_mark_last_busy(bdi->dev);
 	pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
@@ -605,7 +602,6 @@ static int bq24296_set_otg_vbus(struct bq24190_dev_info *bdi, bool enable)
 	}
 
 out:
-	pm_runtime_mark_last_busy(bdi->dev);
 	pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
@@ -638,7 +634,6 @@ static int bq24190_vbus_is_enabled(struct regulator_dev *dev)
 				BQ24190_REG_POC_CHG_CONFIG_MASK,
 				BQ24190_REG_POC_CHG_CONFIG_SHIFT, &val);
 
-	pm_runtime_mark_last_busy(bdi->dev);
 	pm_runtime_put_autosuspend(bdi->dev);
 
 	if (ret)
@@ -675,7 +670,6 @@ static int bq24296_vbus_is_enabled(struct regulator_dev *dev)
 				BQ24296_REG_POC_OTG_CONFIG_MASK,
 				BQ24296_REG_POC_OTG_CONFIG_SHIFT, &val);
 
-	pm_runtime_mark_last_busy(bdi->dev);
 	pm_runtime_put_autosuspend(bdi->dev);
 
 	if (ret)
@@ -1376,7 +1370,6 @@ static int bq24190_charger_get_property(struct power_supply *psy,
 		ret = -ENODATA;
 	}
 
-	pm_runtime_mark_last_busy(bdi->dev);
 	pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
@@ -1419,7 +1412,6 @@ static int bq24190_charger_set_property(struct power_supply *psy,
 		ret = -EINVAL;
 	}
 
-	pm_runtime_mark_last_busy(bdi->dev);
 	pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
@@ -1682,7 +1674,6 @@ static int bq24190_battery_get_property(struct power_supply *psy,
 		ret = -ENODATA;
 	}
 
-	pm_runtime_mark_last_busy(bdi->dev);
 	pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
@@ -1713,7 +1704,6 @@ static int bq24190_battery_set_property(struct power_supply *psy,
 		ret = -EINVAL;
 	}
 
-	pm_runtime_mark_last_busy(bdi->dev);
 	pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
@@ -1861,7 +1851,6 @@ static irqreturn_t bq24190_irq_handler_thread(int irq, void *data)
 		return IRQ_NONE;
 	}
 	bq24190_check_status(bdi);
-	pm_runtime_mark_last_busy(bdi->dev);
 	pm_runtime_put_autosuspend(bdi->dev);
 	bdi->irq_event = false;
 
@@ -2188,7 +2177,6 @@ static int bq24190_probe(struct i2c_client *client)
 
 	enable_irq_wake(client->irq);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -2275,7 +2263,6 @@ static __maybe_unused int bq24190_pm_suspend(struct device *dev)
 	bq24190_register_reset(bdi);
 
 	if (error >= 0) {
-		pm_runtime_mark_last_busy(bdi->dev);
 		pm_runtime_put_autosuspend(bdi->dev);
 	}
 
@@ -2300,7 +2287,6 @@ static __maybe_unused int bq24190_pm_resume(struct device *dev)
 	bq24190_read(bdi, BQ24190_REG_SS, &bdi->ss_reg);
 
 	if (error >= 0) {
-		pm_runtime_mark_last_busy(bdi->dev);
 		pm_runtime_put_autosuspend(bdi->dev);
 	}
 
Signature · 1 line
2.39.5
author maintainer
#111 lore raw

PATCH 55/80 power: supply: twl4030_charger: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/power/supply/twl4030_charger.c | 1 -
 1 file changed, 1 deletion(-)
drivers/power/supply/twl4030_charger.c +0 -1
index 9dcb5457bef4..04216b2bfb6c 100644
@@ -512,7 +512,6 @@ static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable)
 		ret |= twl_i2c_write_u8(TWL_MODULE_MAIN_CHARGE, 0x2a,
 					TWL4030_BCIMDKEY);
 		if (bci->usb_enabled) {
-			pm_runtime_mark_last_busy(bci->transceiver->dev);
 			pm_runtime_put_autosuspend(bci->transceiver->dev);
 			bci->usb_enabled = 0;
 		}
Signature · 1 line
2.39.5
author maintainer
#112 lore raw

PATCH 56/80 pwm: img: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/pwm/pwm-img.c | 2 --
 1 file changed, 2 deletions(-)
drivers/pwm/pwm-img.c +0 -2
index 71542956feca..91e0b19f0c08 100644
@@ -139,7 +139,6 @@ static int img_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	      (timebase << PWM_CH_CFG_TMBASE_SHIFT);
 	img_pwm_writel(imgchip, PWM_CH_CFG(pwm->hwpwm), val);
 
-	pm_runtime_mark_last_busy(pwmchip_parent(chip));
 	pm_runtime_put_autosuspend(pwmchip_parent(chip));
 
 	return 0;
@@ -175,7 +174,6 @@ static void img_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
 	val &= ~BIT(pwm->hwpwm);
 	img_pwm_writel(imgchip, PWM_CTRL_CFG, val);
 
-	pm_runtime_mark_last_busy(pwmchip_parent(chip));
 	pm_runtime_put_autosuspend(pwmchip_parent(chip));
 }
 
Signature · 1 line
2.39.5
#113 lore raw

Re: [PATCH 56/80] pwm: img: Remove redundant pm_runtime_mark_last_busy() calls

Quoted 10 lines · Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

Quoted 6 lines

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1

My tree is based on v6.16-rc1 and this tag on -rc2. I merged it anyhow and applied the pwm patch. We will see how much trouble this creates, I hope very little.

Find the result on
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next .

Best regards
Uwe

author maintainer
#114 lore raw

PATCH 57/80 regulator: stm32-vrefbuf: Remove redundant pm_runtime_mark_last_busy() calls

In reply to Sakari Ailus

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy().

---
The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/[email protected]>.

In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2:

        git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
                pm-runtime-6.17-rc1
 drivers/regulator/stm32-vrefbuf.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/regulator/stm32-vrefbuf.c +0 -6
index a85ea94f0673..9e391206f09d 100644
@@ -67,7 +67,6 @@ static int stm32_vrefbuf_enable(struct regulator_dev *rdev)
 		writel_relaxed(val, priv->base + STM32_VREFBUF_CSR);
 	}
 
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_autosuspend(priv->dev);
 
 	return ret;
@@ -87,7 +86,6 @@ static int stm32_vrefbuf_disable(struct regulator_dev *rdev)
 	val &= ~STM32_ENVR;
 	writel_relaxed(val, priv->base + STM32_VREFBUF_CSR);
 
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_autosuspend(priv->dev);
 
 	return 0;
@@ -104,7 +102,6 @@ static int stm32_vrefbuf_is_enabled(struct regulator_dev *rdev)
 
 	ret = readl_relaxed(priv->base + STM32_VREFBUF_CSR) & STM32_ENVR;
 
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_autosuspend(priv->dev);
 
 	return ret;
@@ -125,7 +122,6 @@ static int stm32_vrefbuf_set_voltage_sel(struct regulator_dev *rdev,
 	val = (val & ~STM32_VRS) | FIELD_PREP(STM32_VRS, sel);
 	writel_relaxed(val, priv->base + STM32_VREFBUF_CSR);
 
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_autosuspend(priv->dev);
 
 	return 0;
@@ -144,7 +140,6 @@ static int stm32_vrefbuf_get_voltage_sel(struct regulator_dev *rdev)
 	val = readl_relaxed(priv->base + STM32_VREFBUF_CSR);
 	ret = FIELD_GET(STM32_VRS, val);
 
-	pm_runtime_mark_last_busy(priv->dev);
 	pm_runtime_put_autosuspend(priv->dev);
 
 	return ret;
@@ -218,7 +213,6 @@ static int stm32_vrefbuf_probe(struct platform_device *pdev)
 	}
 	platform_set_drvdata(pdev, rdev);
 
-	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
Signature · 1 line
2.39.5