All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/51] iio: Tree wide switch from CONFIG_PM* to pm_[sleep]_ptr etc.
@ 2022-01-02 12:55 Jonathan Cameron
  2022-01-02 12:55 ` [PATCH v2 01/51] iio:accel:da311: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
                   ` (50 more replies)
  0 siblings, 51 replies; 65+ messages in thread
From: Jonathan Cameron @ 2022-01-02 12:55 UTC (permalink / raw)
  To: linux-iio
  Cc: Paul Cercueil, Arnd Bergmann, Rafael J . Wysocki,
	Gwendal Grignou, Jonathan Cameron, Alexandre Belloni,
	Anson Huang, Brian Masney, Crt Mori, Fabrice Gasnier,
	Hans de Goede, Heiko Stuebner, Icenowy Zheng, Jonathan Albrieux,
	Krzysztof Kozlowski, Linus Walleij, Luca Weiss,
	Ludovic Desroches, Manivannan Sadhasivam, Martijn Braam,
	Maslov Dmitry, Mikko Koivunen, Olivier Moysan,
	Stefan-Gabriel Mirea, Vaishnav M A

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

Previously "iio: Tree wide switch from CONFIG_PM* to __maybe_unused etc."

Note I've kept tags given for v1 having concluded the changes were fairly
minor, but if anyone wants me to drop a tag let me know (it was a bit
borderline in my view).

I have a follow up series to convert the existing cases that looked like the
results of the v1 version of this series but will sit on that until this
has had some review given this set is already rather too large.  For those
I'll probably do some groupings rather than one patch per file.

In the discussion of v1 Paul proposed a change to how pm_ptr() and
related macros are defined to remove the need to mark the various
functions as __maybe_unused.  That culminated in the patch:

https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?id=1a3c7bb088266fa2db017be299f91f1c1894c857

which is currently queued up by Rafael in the linux-pm tree for the
merge window.  This series depends on that patch.

So the main changes since v1:

* Drop all the __maybe_unused markings
* Switch from SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS()
* Switch from SET_RUNTIME_PM_OPS() to RUNTIME_PM_OPS()
* Switch from SET_SYSTEM_SLEEP_PM_OPS() to SYSTEM_SLEEP_PM_OPS()
* Use pm_sleep_ptr() with DEFINE_SIMPLE_DEV_PM_OPS() cases
* Use pm_ptr() with al other cases
* Drop patches change cases where the dev_pm_ops structure is exported
  to other modules as the compiler can't remove those cases automatically
  and more thought is needed.
* Add some additional drivers that I'd missed on the first round.

Note this does not cover all cases of CONFIG_PM* in IIO as some are
considerably more complicated and this approach may not be suitable.

Overall motivation for the series remains the same as for V1:
* Code reduction and improvement in readability.
* Reduce the chance I'll have to ask people to change how they do
  this in future drivers (cut and paste fun)

Note that in some cases letting the compiler remove the code results
in small reductions in module size, particularly when CONFIG_PM_SLEEP
is not defined.

I've kept this at one patch per driver as personally I prefer to
do this for all but most trivial of patches as it makes backports that
cross with this series simpler (though they will now require the
dependency called out above). It also avoids the complexity of tagging
when people wish to call out the subset they have reviewed.

Note there are drivers in here where the author has probably moved
onto other things, so if people have time to review patches in addition
to those I've explicitly cc'd them on that would be great!

Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Anson Huang <anson.huang@nxp.com>
Cc: Brian Masney <masneyb@onstation.org>
Cc: Crt Mori <cmo@melexis.com>
Cc: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Cc: Icenowy Zheng <icenowy@aosc.io>
Cc: Jonathan Albrieux <jonathan.albrieux@gmail.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Luca Weiss <luca@z3ntu.xyz>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: Manivannan Sadhasivam <mani@kernel.org>
Cc: Martijn Braam <martijn@brixit.nl>
Cc: Maslov Dmitry <maslovdmitry@seeed.cc>
Cc: Matt Ranostay <matt.ranostay@konsulko.com
Cc: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Cc: Olivier Moysan <olivier.moysan@foss.st.com>
Cc: Stefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com>
Cc: Vaishnav M A <vaishnav@beagleboard.org>

Jonathan Cameron (51):
  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:accel:kxsd9: Switch from CONFIG_PM guards to pm_ptr() etc
  iio:adc:ab8500: Switch from CONFIG_PM guards to pm_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:stm32:Switch from CONFIG_PM guards to pm_ptr()
  iio:adc:rcar: Switch from CONFIG_PM guards to pm_ptr() etc
  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:bh1780: Switch from CONFIG_PM guards to pm_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:light:us5182: Switch from CONFIG_PM guards to pm_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:pulsedlight: Switch from CONFIG_PM guards to pm_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:chemical:atlas: Switch from CONFIG_PM guards to pm_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:light:rpr0521: Switch from CONFIG_PM guards to pm_ptr() etc
  iio:temperature:mlx90614: Switch from CONFIG_PM* guards to pm_ptr()
    etc

 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/kxsd9-i2c.c                     |  2 +-
 drivers/iio/accel/kxsd9-spi.c                     |  2 +-
 drivers/iio/accel/kxsd9.c                         |  8 ++------
 drivers/iio/accel/mc3230.c                        |  6 ++----
 drivers/iio/accel/mma7660.c                       | 10 ++--------
 drivers/iio/accel/mma9551.c                       | 11 +++--------
 drivers/iio/accel/mma9553.c                       | 11 +++--------
 drivers/iio/accel/stk8312.c                       | 10 ++--------
 drivers/iio/accel/stk8ba50.c                      | 10 ++--------
 drivers/iio/adc/ab8500-gpadc.c                    | 12 ++++--------
 drivers/iio/adc/at91_adc.c                        |  6 ++----
 drivers/iio/adc/exynos_adc.c                      | 10 ++++------
 drivers/iio/adc/palmas_gpadc.c                    | 10 +++-------
 drivers/iio/adc/rcar-gyroadc.c                    |  6 ++----
 drivers/iio/adc/rockchip_saradc.c                 |  6 ++----
 drivers/iio/adc/stm32-adc-core.c                  | 13 +++++--------
 drivers/iio/adc/stm32-adc.c                       | 12 ++++--------
 drivers/iio/adc/twl6030-gpadc.c                   |  8 +++-----
 drivers/iio/adc/vf610_adc.c                       |  6 ++----
 drivers/iio/chemical/atlas-sensor.c               |  7 ++-----
 drivers/iio/common/ssp_sensors/ssp_dev.c          |  8 ++------
 drivers/iio/dac/m62332.c                          |  9 ++-------
 drivers/iio/dac/vf610_dac.c                       |  6 ++----
 drivers/iio/imu/kmx61.c                           | 10 +++-------
 drivers/iio/light/apds9300.c                      |  9 ++-------
 drivers/iio/light/bh1780.c                        | 10 +++-------
 drivers/iio/light/cm3232.c                        |  9 ++-------
 drivers/iio/light/isl29018.c                      |  9 ++-------
 drivers/iio/light/isl29125.c                      |  6 ++----
 drivers/iio/light/jsa1212.c                       | 10 ++--------
 drivers/iio/light/ltr501.c                        |  6 ++----
 drivers/iio/light/rpr0521.c                       |  7 ++-----
 drivers/iio/light/stk3310.c                       | 10 ++--------
 drivers/iio/light/tcs3414.c                       |  6 ++----
 drivers/iio/light/tcs3472.c                       |  6 ++----
 drivers/iio/light/tsl2563.c                       |  9 ++-------
 drivers/iio/light/tsl4531.c                       |  9 ++-------
 drivers/iio/light/us5182d.c                       |  8 +++-----
 drivers/iio/magnetometer/ak8975.c                 | 10 +++-------
 drivers/iio/magnetometer/mag3110.c                |  9 ++-------
 drivers/iio/magnetometer/mmc35240.c               |  8 ++------
 drivers/iio/pressure/mpl3115.c                    |  9 ++-------
 drivers/iio/proximity/as3935.c                    | 10 ++--------
 drivers/iio/proximity/pulsedlight-lidar-lite-v2.c |  7 ++-----
 drivers/iio/proximity/rfd77402.c                  |  6 ++----
 drivers/iio/proximity/sx9500.c                    |  8 ++------
 drivers/iio/temperature/mlx90614.c                | 12 ++++--------
 drivers/iio/temperature/tmp006.c                  |  6 ++----
 drivers/iio/temperature/tmp007.c                  |  6 ++----
 54 files changed, 127 insertions(+), 315 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2022-01-30 19:06 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-02 12:55 [PATCH v2 00/51] iio: Tree wide switch from CONFIG_PM* to pm_[sleep]_ptr etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 01/51] iio:accel:da311: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 14:15   ` Arnd Bergmann
2022-01-03 15:24     ` Jonathan Cameron
2022-01-03 17:58       ` Arnd Bergmann
2022-01-04 14:16         ` Jonathan Cameron
2022-01-04 14:24           ` Rafael J. Wysocki
2022-01-04 15:08           ` Paul Cercueil
2022-01-04 18:06             ` Arnd Bergmann
2022-01-02 12:55 ` [PATCH v2 02/51] iio:accel:da280: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 03/51] iio:accel:dmard06: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 04/51] iio:accel:dmard10: Switch from CONFIG_PM " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 05/51] iio:accel:mc3230: Switch from CONFIG_PM_SLEEP " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 06/51] iio:accel:mma7660: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 07/51] iio:accel:mma9551: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 08/51] iio:accel:mma9553: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 09/51] iio:accel:stk8ba50: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 10/51] iio:accel:kxsd9: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-30 19:08   ` Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 11/51] iio:adc:ab8500: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 12/51] iio:adc:at91-adc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 13/51] iio:adc:exynos_adc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 14/51] iio:adc:palmas_gpadc: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 15/51] iio:adc:stm32:Switch from CONFIG_PM guards to pm_ptr() Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 16/51] iio:adc:rcar: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 17/51] iio:adc:rockchip: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 18/51] iio:adc:twl6030: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 19/51] iio:adc:vf610: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 20/51] iio:common:ssp: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 21/51] iio:dac:vf610: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 22/51] iio:light:apds9300: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 23/51] iio:light:bh1780: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 24/51] iio:light:cm3232: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 25/51] iio:light:isl29018: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 26/51] iio:light:isl29125: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 27/51] iio:light:jsa1212: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 28/51] iio:light:ltr501: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 29/51] iio:light:stk3310: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 30/51] iio:light:tcs3414: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 31/51] iio:light:tcs3472: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 32/51] iio:light:tsl2563: " Jonathan Cameron
2022-01-02 12:55 ` [PATCH v2 33/51] iio:light:tsl4531: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 34/51] iio:light:us5182: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-30 19:12   ` Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 35/51] iio:magn:ak8975: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 36/51] iio:magn:mag3110: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 37/51] iio:magn:mmc35240: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 38/51] iio:pressure:mpl3115: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 39/51] iio:proximity:as3935: " Jonathan Cameron
2022-01-04  6:41   ` Gwendal Grignou
2022-01-02 12:56 ` [PATCH v2 40/51] iio:proximity:pulsedlight: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 41/51] iio:proximity:rfd77492: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 42/51] iio:proximity:sx9500: " Jonathan Cameron
2022-01-03 18:58   ` Gwendal Grignou
2022-01-02 12:56 ` [PATCH v2 43/51] iio:temperature:tmp006: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 44/51] iio:temperature:tmp007: " Jonathan Cameron
2022-01-03  6:03   ` Manivannan Sadhasivam
2022-01-02 12:56 ` [PATCH v2 45/51] iio:chemical:atlas: Switch from CONFIG_PM guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 46/51] iio:accel:stk8312: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 47/51] iio:accel:bma180: " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 48/51] iio:dac:m62332: " Jonathan Cameron
2022-01-05 10:52   ` Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 49/51] iio:imu:kmx61: Switch from CONFIG_PM* guards to pm_ptr() etc Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 50/51] iio:light:rpr0521: Switch from CONFIG_PM " Jonathan Cameron
2022-01-02 12:56 ` [PATCH v2 51/51] iio:temperature:mlx90614: Switch from CONFIG_PM* " Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.