Skip to content

iio: Tree wide switch from CONFIG_PM* to pm_[sleep]_ptr etc.

Jonathan Cameron linux-iio 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest50 patches 6 repliesIn review
  2. v251 patches 13 repliesSuperseded
  3. v149 patches 33 repliesSuperseded

Changes in v3 from the cover letter

1) Move to new macros where relevant.
2) Add static as the macros no longer include it DEFINE_SIMPLE_DEV_PM_OPS etc.
3) Drop complex cases (I've noted those in reply to v2 so won't go into specifics here. I'll revisit all these but after this massive set is in place. Some of these are due to interaction with the ongoing namespace work in IIO.
4) Use the new DEFINE_RUNTIME_DEV_PM_OPS for cases where the force runtime functions were used for sleep ops.
5) Add a few cases that I'd missed the first time around.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/50iio:accel:da311: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/accel/da311.c+2 -40 replies
2/50iio:accel:da280: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/accel/da280.c+2 -40 replies
3/50iio:accel:dmard06: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/accel/dmard06.c+3 -70 replies
4/50iio:accel:dmard10: Switch from CONFIG_PM guards to pm_sleep_ptr() etcdrivers/iio/accel/dmard10.c+3 -40 replies
5/50iio:accel:mc3230: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/accel/mc3230.c+2 -40 replies
6/50iio:accel:mma7660: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()drivers/iio/accel/mma7660.c+3 -80 replies
7/50iio:accel:mma9551: Switch from CONFIG_PM guards to pm_ptr() etcdrivers/iio/accel/mma9551.c+3 -80 replies
8/50iio:accel:mma9553: Switch from CONFIG_PM guards to pm_ptr() etcdrivers/iio/accel/mma9553.c+3 -80 replies
9/50iio:accel:stk8ba50: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/accel/stk8ba50.c+3 -80 replies
10/50iio:adc:at91-adc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/adc/at91_adc.c+3 -40 replies
11/50iio:adc:exynos_adc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()drivers/iio/adc/exynos_adc.c+3 -60 replies
12/50iio:adc:palmas_gpadc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()drivers/iio/adc/palmas_gpadc.c+3 -70 replies
13/50iio:adc:rockchip: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/adc/rockchip_saradc.c+4 -50 replies
14/50iio:adc:twl6030: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/adc/twl6030-gpadc.c+3 -50 replies
15/50iio:adc:vf610: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/adc/vf610_adc.c+3 -40 replies
16/50iio:common:ssp: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/common/ssp_sensors/ssp_dev.c+2 -60 replies
17/50iio:dac:vf610: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/dac/vf610_dac.c+3 -40 replies
18/50iio:light:apds9300: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/light/apds9300.c+3 -70 replies
19/50iio:light:cm3232: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/light/cm3232.c+2 -70 replies
20/50iio:light:isl29018: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()drivers/iio/light/isl29018.c+3 -70 replies
21/50iio:light:isl29125: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/light/isl29125.c+3 -40 replies
22/50iio:light:jsa1212: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/light/jsa1212.c+3 -80 replies
23/50iio:light:ltr501: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/light/ltr501.c+2 -40 replies
24/50iio:light:stk3310: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/light/stk3310.c+3 -80 replies
25/50iio:light:tcs3414: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/light/tcs3414.c+3 -40 replies
26/50iio:light:tcs3472: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/light/tcs3472.c+3 -40 replies
27/50iio:light:tsl2563: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/light/tsl2563.c+3 -70 replies
28/50iio:light:tsl4531: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/light/tsl4531.c+3 -70 replies
29/50iio:magn:ak8975: Switch from CONFIG_PM guards to pm_ptr() etcdrivers/iio/magnetometer/ak8975.c+3 -90 replies
30/50iio:magn:mag3110: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/magnetometer/mag3110.c+3 -70 replies
31/50iio:magn:mmc35240: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/magnetometer/mmc35240.c+3 -60 replies
32/50iio:pressure:mpl3115: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/pressure/mpl3115.c+3 -70 replies
33/50iio:proximity:as3935: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/proximity/as3935.c+2 -80 replies
34/50iio:proximity:rfd77492: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/proximity/rfd77402.c+3 -40 replies
35/50iio:proximity:sx9500: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/proximity/sx9500.c+2 -60 replies
36/50iio:temperature:tmp006: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/temperature/tmp006.c+2 -40 replies
37/50iio:temperature:tmp007: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/temperature/tmp007.c+2 -40 replies
38/50iio:accel:stk8312: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/accel/stk8312.c+3 -80 replies
39/50iio:accel:bma180: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/accel/bma180.c+2 -70 replies
40/50iio:dac:m62332: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etcdrivers/iio/dac/m62332.c+2 -90 replies
41/50iio:imu:kmx61: Switch from CONFIG_PM* guards to pm_ptr() etcdrivers/iio/imu/kmx61.c+3 -70 replies
42/50iio:temperature:mlx90614: Switch from CONFIG_PM* guards to pm_ptr() etcdrivers/iio/temperature/mlx90614.c+4 -81 reply
43/50iio:adc:ab8500: Switch from CONFIG_PM guards to pm_ptr() etcdrivers/iio/adc/ab8500-gpadc.c+3 -101 reply
44/50iio:adc:stm32:Switch from CONFIG_PM guards to pm_ptr()drivers/iio/adc/stm32-adc-core.c drivers/iio/adc/stm32-adc.c+10 -190 replies
45/50iio:adc:rcar: Switch from CONFIG_PM guards to pm_ptr() etcdrivers/iio/adc/rcar-gyroadc.c+2 -40 replies
46/50iio:light:bh1780: Switch from CONFIG_PM guards to pm_ptr() etcdrivers/iio/light/bh1780.c+3 -90 replies
47/50iio:proximity:pulsedlight: Switch from CONFIG_PM guards to pm_ptr() etcdrivers/iio/proximity/pulsedlight-lidar-lite-v2.c+2 -50 replies
48/50iio:chemical:atlas: Switch from CONFIG_PM guards to pm_ptr() etcdrivers/iio/chemical/atlas-sensor.c+2 -50 replies
49/50iio:light:rpr0521: Switch from CONFIG_PM guards to pm_ptr() etcdrivers/iio/light/rpr0521.c+2 -50 replies
50/50iio:adc:stm32*: Use pm[_sleep]_ptr() etc to avoid need to make pm __maybe_unuseddrivers/iio/adc/stm32-dfsdm-adc.c drivers/iio/adc/stm32-dfsdm-core.c drivers/iio/dac/stm32-dac-core.c +2 more+33 -341 reply

Reviews trailers per patch

14 of 50 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchHans de GoedeAlexandre BelloniKrzysztof KozlowskiMatt RanostayGwendal GrignouManivannan SadhasivamLinus WalleijFabrice GasnierCrt MoriPaul Cercueil
SeriesR-b
1/50
2/50
3/50
4/50
5/50R-b
6/50
7/50
8/50
9/50
10/50R-b
11/50R-b
12/50
13/50
14/50
15/50
16/50
17/50
18/50
19/50
20/50
21/50
22/50
23/50
24/50
25/50
26/50
27/50
28/50
29/50A-b
30/50
31/50
32/50
33/50A-b R-b
34/50
35/50R-b
36/50
37/50A-b
38/50
39/50
40/50
41/50
42/50R-b
43/50R-b
44/50R-b
45/50
46/50R-b
47/50A-b
48/50A-b
49/50
50/50R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 10 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/50] iio: Tree wide switch from CONFIG_PM* to pm_[sleep]_ptr etc.

From: Jonathan Cameron <[email protected]>

Note that I have cc'd no one for a number of drivers touched in this set because we don't have a known active maintainer, so if anyone has time to sanity check those it would be much appreciated.

Now that Paul Cercueil's rework of the pm_ptr() and related macro magic to ensure we the compiler can remove unused struct dev_pm_ops and related functions when either CONFIG_PM_SLEEP is not set or both that and CONFIG_PM are not set is upstream [1], lets revisit this series of cleanup of CONFIG_PM* guards in IIO.

Changes since v2:
1) Move to new macros where relevant.
2) Add static as the macros no longer include it DEFINE_SIMPLE_DEV_PM_OPS etc.
3) Drop complex cases (I've noted those in reply to v2 so won't go into specifics here. I'll revisit all these but after this massive set is in place. Some of these are due to interaction with the ongoing namespace work in IIO.
4) Use the new DEFINE_RUNTIME_DEV_PM_OPS for cases where the force runtime functions were used for sleep ops.
5) Add a few cases that I'd missed the first time around.

Note that there are some drivers that provide runtime callbacks but not sleep ones. The chances are high that it would be sensible to use the force runtime pm calls for those, but I considered that a separate change which should potentially be part of a follow up patch set.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9d8619190031af0a314bee865262d8975473e4dd

Cc: Alexandre Belloni <[email protected]>
Cc: Anson Huang <[email protected]>
Cc: Brian Masney <[email protected]>
Cc: Crt Mori <[email protected]>
Cc: Fabrice Gasnier <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Heiko Stuebner <[email protected]>
Cc: Icenowy Zheng <[email protected]>
Cc: Jonathan Albrieux <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Luca Weiss <[email protected]>
Cc: Ludovic Desroches <[email protected]>
Cc: Manivannan Sadhasivam <[email protected]>
Cc: Martijn Braam <[email protected]>
Cc: Maslov Dmitry <[email protected]>
Cc: Matt Ranostay <[email protected]
Cc: Mikko Koivunen <[email protected]>
Cc: Olivier Moysan <[email protected]>
Cc: Stefan-Gabriel Mirea <[email protected]>
Cc: Vaishnav M A <[email protected]>
Jonathan Cameron (50):
iio:accel:da311: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
etc
iio:accel:da280: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
etc
iio:accel:dmard06: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:accel:dmard10: Switch from CONFIG_PM guards to pm_sleep_ptr() etc iio:accel:mc3230: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
etc
iio:accel:mma7660: Switch from CONFIG_PM_SLEEP guards to

    pm_sleep_ptr()
  iio:accel:mma9551: Switch from CONFIG_PM guards to pm_ptr() etc
  iio:accel:mma9553: Switch from CONFIG_PM guards to pm_ptr() etc
  iio:accel:stk8ba50: Switch from CONFIG_PM_SLEEP guards to
    pm_sleep_ptr() etc
  iio:adc:at91-adc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
    etc
  iio:adc:exynos_adc: Switch from CONFIG_PM_SLEEP guards to
    pm_sleep_ptr()
  iio:adc:palmas_gpadc: Switch from CONFIG_PM_SLEEP guards to
    pm_sleep_ptr()
  iio:adc:rockchip: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
    etc
  iio:adc:twl6030: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
    etc
  iio:adc:vf610: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
    etc
  iio:common:ssp: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
    etc
  iio:dac:vf610: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
    etc
  iio:light:apds9300: Switch from CONFIG_PM_SLEEP guards to
    pm_sleep_ptr() etc
  iio:light:cm3232: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
    etc
  iio:light:isl29018: Switch from CONFIG_PM_SLEEP guards to
    pm_sleep_ptr()

iio:light:isl29125: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:light:jsa1212: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:light:ltr501: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
etc
iio:light:stk3310: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:light:tcs3414: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:light:tcs3472: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:light:tsl2563: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:light:tsl4531: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:magn:ak8975: Switch from CONFIG_PM guards to pm_ptr() etc iio:magn:mag3110: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
etc
iio:magn:mmc35240: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:pressure:mpl3115: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:proximity:as3935: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:proximity:rfd77492: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:proximity:sx9500: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:temperature:tmp006: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:temperature:tmp007: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:accel:stk8312: Switch from CONFIG_PM_SLEEP guards to
pm_sleep_ptr() etc
iio:accel:bma180: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
etc
iio:dac:m62332: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
etc
iio:imu:kmx61: Switch from CONFIG_PM* guards to pm_ptr() etc iio:temperature:mlx90614: Switch from CONFIG_PM* guards to pm_ptr()
etc
iio:adc:ab8500: Switch from CONFIG_PM guards to pm_ptr() etc iio:adc:stm32:Switch from CONFIG_PM guards to pm_ptr() iio:adc:rcar: Switch from CONFIG_PM guards to pm_ptr() etc iio:light:bh1780: Switch from CONFIG_PM guards to pm_ptr() etc iio:proximity:pulsedlight: Switch from CONFIG_PM guards to pm_ptr()
etc
iio:chemical:atlas: Switch from CONFIG_PM guards to pm_ptr() etc iio:light:rpr0521: Switch from CONFIG_PM guards to pm_ptr() etc iio:adc:stm32*: Use pm[_sleep]_ptr() etc to avoid need to make pm
__maybe_unused

 drivers/iio/accel/bma180.c                    |  9 ++-------
 drivers/iio/accel/da280.c                     |  6 ++----
 drivers/iio/accel/da311.c                     |  6 ++----
 drivers/iio/accel/dmard06.c                   | 10 +++-------
 drivers/iio/accel/dmard10.c                   |  7 +++----
 drivers/iio/accel/mc3230.c                    |  6 ++----
 drivers/iio/accel/mma7660.c                   | 11 +++--------
 drivers/iio/accel/mma9551.c                   | 11 +++--------
 drivers/iio/accel/mma9553.c                   | 11 +++--------
 drivers/iio/accel/stk8312.c                   | 11 +++--------
 drivers/iio/accel/stk8ba50.c                  | 11 +++--------
 drivers/iio/adc/ab8500-gpadc.c                | 13 +++----------
 drivers/iio/adc/at91_adc.c                    |  7 +++----
 drivers/iio/adc/exynos_adc.c                  |  9 +++------
 drivers/iio/adc/palmas_gpadc.c                | 10 +++-------
 drivers/iio/adc/rcar-gyroadc.c                |  6 ++----
 drivers/iio/adc/rockchip_saradc.c             |  9 ++++-----
 drivers/iio/adc/stm32-adc-core.c              | 17 ++++++-----------
 drivers/iio/adc/stm32-adc.c                   | 12 ++++--------
 drivers/iio/adc/stm32-dfsdm-adc.c             | 11 ++++++-----
 drivers/iio/adc/stm32-dfsdm-core.c            | 19 +++++++++----------
 drivers/iio/adc/twl6030-gpadc.c               |  8 +++-----
 drivers/iio/adc/vf610_adc.c                   |  7 +++----
 drivers/iio/chemical/atlas-sensor.c           |  7 ++-----
 drivers/iio/common/ssp_sensors/ssp_dev.c      |  8 ++------
 drivers/iio/dac/m62332.c                      | 11 ++---------
 drivers/iio/dac/stm32-dac-core.c              | 16 ++++++++--------
 drivers/iio/dac/stm32-dac.c                   |  9 ++++-----
 drivers/iio/dac/vf610_dac.c                   |  7 +++----
 drivers/iio/imu/kmx61.c                       | 10 +++-------
 drivers/iio/light/apds9300.c                  | 10 +++-------
 drivers/iio/light/bh1780.c                    | 12 +++---------
 drivers/iio/light/cm3232.c                    |  9 ++-------
 drivers/iio/light/isl29018.c                  | 10 +++-------
 drivers/iio/light/isl29125.c                  |  7 +++----
 drivers/iio/light/jsa1212.c                   | 11 +++--------
 drivers/iio/light/ltr501.c                    |  6 ++----
 drivers/iio/light/rpr0521.c                   |  7 ++-----
 drivers/iio/light/stk3310.c                   | 11 +++--------
 drivers/iio/light/tcs3414.c                   |  7 +++----
 drivers/iio/light/tcs3472.c                   |  7 +++----
 drivers/iio/light/tsl2563.c                   | 10 +++-------
 drivers/iio/light/tsl4531.c                   | 10 +++-------
 drivers/iio/magnetometer/ak8975.c             | 12 +++---------
 drivers/iio/magnetometer/mag3110.c            | 10 +++-------
 drivers/iio/magnetometer/mmc35240.c           |  9 +++------
 drivers/iio/pressure/mpl3115.c                | 10 +++-------
 drivers/iio/proximity/as3935.c                | 10 ++--------
 .../iio/proximity/pulsedlight-lidar-lite-v2.c |  7 ++-----
 drivers/iio/proximity/rfd77402.c              |  7 +++----
 drivers/iio/proximity/sx9500.c                |  8 ++------
 drivers/iio/temperature/mlx90614.c            | 12 ++++--------
 drivers/iio/temperature/tmp006.c              |  6 ++----
 drivers/iio/temperature/tmp007.c              |  6 ++----
 drivers/iio/trigger/stm32-timer-trigger.c     | 12 ++++++------
 55 files changed, 173 insertions(+), 348 deletions(-)
Signature · 1 line
2.35.1