linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH 00/28] IIO: Runtime PM related cleanups.
@ 2021-05-09 11:33 Jonathan Cameron
  2021-05-09 11:33 ` [PATCH 01/28] iio: gyro: fxa210002c: Balance runtime pm + use pm_runtime_resume_and_get() Jonathan Cameron
                   ` (27 more replies)
  0 siblings, 28 replies; 99+ messages in thread
From: Jonathan Cameron @ 2021-05-09 11:33 UTC (permalink / raw)
  To: linux-iio
  Cc: Mauro Carvalho Chehab, Julia Lawall, Rafael J . Wysocki,
	Jonathan Cameron, Andreas Klinger, Brian Masney, Fabrice Gasnier,
	Hans de Goede, Jean-Baptiste Maneyrol, Linus Walleij,
	Marek Vasut, Matt Ranostay, Mathieu Othacehe, Mike Looijmans,
	Mikko Koivunen, Parthiban Nallathambi, Rui Miguel Silva,
	Sean Nyekjaer, Sebastian Reichel, Srinivas Pandruvada, jic23

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Resend because I managed to misstype kernel.org in the first set of
email addresses. Sorry all who hence get this twice.

Two basic types of tidying up in here.
1) Cases where pm_runtime_put_noidle() is called in remove() path
   but not matched with any form of get
2) Using pm_runtime_resume_and_get() to either replace existing error
   handling or to introduce it where errors were previously ignored.

Note the unbalanced put is not a bug as such, because the runtime pm core
protects against the reference count going negative.  However, it is
a bad pattern to have copied into new drivers (as it confuses me)
so I'd like to clear it out.

Inspired by Mauro's work on similar issues in media and Julia's
coccicheck script.

There will be at least one more set of these once this first set
have flushed out any mistakes I may have made.

I checked my assumptions around the excess pm_runtime_put_noidle
calls in QEMU but may well be missing something even so.

Cc: Andreas Klinger <ak@it-klinger.de>
Cc: Brian Masney <masneyb@onstation.org>
Cc: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: Mike Looijmans <mike.looijmans@topic.nl>
Cc: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Cc: Parthiban Nallathambi <pn@denx.de>
Cc: Rui Miguel Silva <rui.silva@linaro.org>
Cc: Sean Nyekjaer <sean@geanix.com>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: jic23@kernel.org

Jonathan Cameron (28):
  iio: gyro: fxa210002c: Balance runtime pm + use
    pm_runtime_resume_and_get().
  iio: light: isl29028: Balance runtime pm + use
    pm_runtime_resume_and_get()
  iio: light: tsl2583: Balance runtime pm + use
    pm_runtime_resume_and_get()
  iio: accel: bmc150-accel: Balanced runtime pm + use
    pm_runtime_resume_and_get()
  iio: accel: mma8452: Balance runtime pm + use
    pm_runtime_resume_and_get()
  iio: accel: mma9551/3: Balance untime pm + use
    pm_runtime_resume_and_get()
  iio: accel: kxcjk-1013: Balance runtime pm + use
    pm_runtime_resume_and_get()
  iio: hid: trigger: Balance runtime pm + use
    pm_runtime_resume_and_get()
  iio: imu: kmx61: Balance runtime pm + use pm_runtime_resume_and_get()
  iio: light: rpr0521: Balance runtime pm + use
    pm_runtime_resume_and_get()
  iio: magn: bmc150: Balance runtime pm + use
    pm_runtime_resume_and_get()
  iio: accel: bmi088: Balance runtime pm + use
    pm_runtime_resume_and_get()
  iio: imu: mpu6050: Use pm_runtime_resume_and_get() to replace open
    coding.
  iio: adc: stm32-adc: Use pm_runtime_resume_and_get() to replace open
    coding.
  iio: adc: stm32-dfsdm: Use pm_runtime_resume_and_get() to replace open
    coding.
  iio: dac: stm32-dac: Use pm_runtime_resume_and_get() to replace open
    coding.
  iio: adc: ads1015: Use pm_runtime_resume_and_get() to replace open
    coding.
  iio: chemical: atlas-sensor: Use pm_runtime_resume_and_get() to
    replace open coding.
  iio: light: pa12203001: Use pm_runtime_resume_and_get() to replace
    open coding.
  iio: light: us5182: Use pm_runtime_resume_and_get() to replace open
    coding.
  iio: light: vcnl4000: Use pm_runtime_resume_and_get() to replace open
    coding.
  iio: light: vcnl4035: Use pm_runtime_resume_and_get() to replace open
    coding.
  iio: pressure: zpa2326: fix potential extra call of runtime suspend.
  iio: temp: mlx90614: Handle failure in pm_runtime_resume_and_get()
  iio: proximity: srf04: Use pm_runtime_resume_and_get() and handle
    error
  iio: prox: pulsed-light-v2: Switch pm_runtime_resume_and_get()
  iio: pressure: icp10100: Use pm_runtime_resume_and_get() + handle
    errors
  iio: adc: rcar-gyroadc: Use pm_runtime_resume_and_get() and check in
    probe()

 drivers/iio/accel/bmc150-accel-core.c         |  6 +----
 drivers/iio/accel/bmi088-accel-core.c         | 26 ++++++++++++++-----
 drivers/iio/accel/kxcjk-1013.c                |  5 +---
 drivers/iio/accel/mma8452.c                   |  5 +---
 drivers/iio/accel/mma9551.c                   |  1 -
 drivers/iio/accel/mma9551_core.c              |  4 +--
 drivers/iio/accel/mma9553.c                   |  1 -
 drivers/iio/adc/rcar-gyroadc.c                | 15 +++++------
 drivers/iio/adc/stm32-adc.c                   | 24 ++++++-----------
 drivers/iio/adc/stm32-dfsdm-core.c            |  6 ++---
 drivers/iio/adc/ti-ads1015.c                  |  4 +--
 drivers/iio/chemical/atlas-sensor.c           | 12 +++------
 .../common/hid-sensors/hid-sensor-trigger.c   |  8 ++----
 drivers/iio/dac/stm32-dac.c                   |  3 +--
 drivers/iio/gyro/fxas21002c_core.c            | 11 +-------
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    | 18 +++++--------
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |  6 ++---
 drivers/iio/imu/kmx61.c                       |  5 +---
 drivers/iio/light/isl29028.c                  |  5 +---
 drivers/iio/light/pa12203001.c                |  4 +--
 drivers/iio/light/rpr0521.c                   |  7 +----
 drivers/iio/light/tsl2583.c                   | 13 +++++-----
 drivers/iio/light/us5182d.c                   |  4 +--
 drivers/iio/light/vcnl4000.c                  |  4 +--
 drivers/iio/light/vcnl4035.c                  |  4 +--
 drivers/iio/magnetometer/bmc150_magn.c        | 10 +++----
 drivers/iio/pressure/icp10100.c               |  4 ++-
 drivers/iio/pressure/zpa2326.c                |  6 ++---
 .../iio/proximity/pulsedlight-lidar-lite-v2.c |  4 ++-
 drivers/iio/proximity/srf04.c                 |  8 +++---
 drivers/iio/temperature/mlx90614.c            | 25 ++++++++++++++----
 31 files changed, 109 insertions(+), 149 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2021-05-17 21:49 UTC | newest]

Thread overview: 99+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-09 11:33 [RESEND PATCH 00/28] IIO: Runtime PM related cleanups Jonathan Cameron
2021-05-09 11:33 ` [PATCH 01/28] iio: gyro: fxa210002c: Balance runtime pm + use pm_runtime_resume_and_get() Jonathan Cameron
2021-05-09 17:26   ` Rui Miguel Silva
2021-05-12 13:22   ` Mauro Carvalho Chehab
2021-05-12 13:30     ` Mauro Carvalho Chehab
2021-05-13  8:34       ` Rui Miguel Silva
2021-05-13 16:31         ` Jonathan Cameron
2021-05-13 16:35           ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 02/28] iio: light: isl29028: " Jonathan Cameron
2021-05-12 13:33   ` Mauro Carvalho Chehab
2021-05-13 16:37     ` Jonathan Cameron
2021-05-17 21:44   ` Linus Walleij
2021-05-09 11:33 ` [PATCH 03/28] iio: light: tsl2583: " Jonathan Cameron
2021-05-10 10:46   ` Brian Masney
2021-05-13 16:39     ` Jonathan Cameron
2021-05-12 13:35   ` Mauro Carvalho Chehab
2021-05-09 11:33 ` [PATCH 04/28] iio: accel: bmc150-accel: Balanced " Jonathan Cameron
2021-05-09 13:52   ` Hans de Goede
2021-05-13 16:41     ` Jonathan Cameron
2021-05-12 13:36   ` Mauro Carvalho Chehab
2021-05-09 11:33 ` [PATCH 05/28] iio: accel: mma8452: Balance " Jonathan Cameron
2021-05-12 13:37   ` Mauro Carvalho Chehab
2021-05-13 17:06     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 06/28] iio: accel: mma9551/3: Balance untime " Jonathan Cameron
2021-05-12 13:37   ` Mauro Carvalho Chehab
2021-05-13 16:42     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 07/28] iio: accel: kxcjk-1013: Balance runtime " Jonathan Cameron
2021-05-09 13:53   ` Hans de Goede
2021-05-12 13:39   ` Mauro Carvalho Chehab
2021-05-09 11:33 ` [PATCH 08/28] iio: hid: trigger: " Jonathan Cameron
2021-05-12 13:44   ` Mauro Carvalho Chehab
2021-05-16 15:19     ` Jonathan Cameron
2021-05-17  2:19       ` Srinivas Pandruvada
2021-05-17  8:43         ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 09/28] iio: imu: kmx61: " Jonathan Cameron
2021-05-12 13:45   ` Mauro Carvalho Chehab
2021-05-13 16:46     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 10/28] iio: light: rpr0521: " Jonathan Cameron
2021-05-12 13:46   ` Mauro Carvalho Chehab
2021-05-13 17:03     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 11/28] iio: magn: bmc150: " Jonathan Cameron
2021-05-12 13:48   ` Mauro Carvalho Chehab
2021-05-13 17:02     ` Jonathan Cameron
2021-05-17 21:49   ` Linus Walleij
2021-05-09 11:33 ` [PATCH 12/28] iio: accel: bmi088: " Jonathan Cameron
2021-05-12 13:51   ` Mauro Carvalho Chehab
2021-05-13 17:00     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 13/28] iio: imu: mpu6050: Use pm_runtime_resume_and_get() to replace open coding Jonathan Cameron
2021-05-12 14:11   ` Mauro Carvalho Chehab
2021-05-16 15:36     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 14/28] iio: adc: stm32-adc: " Jonathan Cameron
2021-05-12 13:30   ` Fabrice Gasnier
2021-05-13 16:47     ` Jonathan Cameron
2021-05-12 14:17   ` Mauro Carvalho Chehab
2021-05-09 11:33 ` [PATCH 15/28] iio: adc: stm32-dfsdm: " Jonathan Cameron
2021-05-12 13:31   ` Fabrice Gasnier
2021-05-13 16:48     ` Jonathan Cameron
2021-05-12 14:19   ` Mauro Carvalho Chehab
2021-05-09 11:33 ` [PATCH 16/28] iio: dac: stm32-dac: " Jonathan Cameron
2021-05-12 13:32   ` Fabrice Gasnier
2021-05-12 14:20   ` Mauro Carvalho Chehab
2021-05-13 16:49     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 17/28] iio: adc: ads1015: " Jonathan Cameron
2021-05-12 14:22   ` Mauro Carvalho Chehab
2021-05-16 15:41     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 18/28] iio: chemical: atlas-sensor: " Jonathan Cameron
2021-05-10  0:36   ` Matt Ranostay
2021-05-12 14:25   ` Mauro Carvalho Chehab
2021-05-16 15:46     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 19/28] iio: light: pa12203001: " Jonathan Cameron
2021-05-14  7:35   ` Mauro Carvalho Chehab
2021-05-14  8:21     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 20/28] iio: light: us5182: " Jonathan Cameron
2021-05-12 14:35   ` Mauro Carvalho Chehab
2021-05-13 16:51     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 21/28] iio: light: vcnl4000: " Jonathan Cameron
2021-05-12 14:36   ` Mauro Carvalho Chehab
2021-05-13 16:57     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 22/28] iio: light: vcnl4035: " Jonathan Cameron
2021-05-12 14:39   ` Mauro Carvalho Chehab
2021-05-13 16:58     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 23/28] iio: pressure: zpa2326: fix potential extra call of runtime suspend Jonathan Cameron
2021-05-12 14:49   ` Mauro Carvalho Chehab
2021-05-16 16:08     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 24/28] iio: temp: mlx90614: Handle failure in pm_runtime_resume_and_get() Jonathan Cameron
2021-05-12 14:51   ` Mauro Carvalho Chehab
2021-05-13 16:53     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 25/28] iio: proximity: srf04: Use pm_runtime_resume_and_get() and handle error Jonathan Cameron
2021-05-12 14:53   ` Mauro Carvalho Chehab
2021-05-13 16:55     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 26/28] iio: prox: pulsed-light-v2: Switch pm_runtime_resume_and_get() Jonathan Cameron
2021-05-12 14:56   ` Mauro Carvalho Chehab
2021-05-16 16:08     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 27/28] iio: pressure: icp10100: Use pm_runtime_resume_and_get() + handle errors Jonathan Cameron
2021-05-12 15:00   ` Mauro Carvalho Chehab
2021-05-16 16:17     ` Jonathan Cameron
2021-05-09 11:33 ` [PATCH 28/28] iio: adc: rcar-gyroadc: Use pm_runtime_resume_and_get() and check in probe() Jonathan Cameron
2021-05-12 15:01   ` Mauro Carvalho Chehab
2021-05-13 16:54     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).