]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: rzg2l: Cleanup suspend/resume path
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Sun, 10 Aug 2025 12:33:27 +0000 (15:33 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 16 Aug 2025 13:52:20 +0000 (14:52 +0100)
commita3c6eabe3bbd6b0e7124d68b2d3bc32fed17362e
treeea2deec1711524c7a7d034955c2f5671272c4396
parentb04e4551893fb8a06106a175ed7055d41a9279c4
iio: adc: rzg2l: Cleanup suspend/resume path

There is no need to manually track the runtime PM status in the driver.
The pm_runtime_force_suspend() and pm_runtime_force_resume() functions
already call pm_runtime_status_suspended() to check the runtime PM state.

Additionally, avoid calling pm_runtime_put_autosuspend() during the
suspend/resume path, as this would decrease the usage counter of a
potential user that had the ADC open before the suspend/resume cycle.

Fixes: 563cf94f9329 ("iio: adc: rzg2l_adc: Add suspend/resume support")
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20250810123328.800104-2-claudiu.beznea.uj@bp.renesas.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/rzg2l_adc.c