All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/28] mfd: Remove #ifdef guards for PM functions
@ 2022-08-07 14:52 Paul Cercueil
  2022-08-07 14:52 ` [PATCH 01/28] mfd: 88pm80x: Remove #ifdef guards for PM related functions Paul Cercueil
                   ` (27 more replies)
  0 siblings, 28 replies; 63+ messages in thread
From: Paul Cercueil @ 2022-08-07 14:52 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Paul Cercueil

Hi Lee,

Here is a set of 28 patches that should convert all MFD drivers to use
the proper PM macros introduced recently.

These macros allow the PM related functions to be automatically dropped
by the compiler when CONFIG_SUSPEND or CONFIG_PM is disabled, without
having to use #ifdef guards.

The rationale behind this change, is that these functions are now
always compiled independently of any Kconfig option, and thanks to that
bugs and regressions are easier to catch.

Most of the changes are trivial. Some patches come with a caveat:
- patch 06/28 moves the PM functions to pcf50633-irq.c, and uses
  EXPORT_GPL_SIMPLE_DEV_PM_OPS(). This means that we're now exporting a
  symbol that wasn't exported before. This is the only solution I found
  in order to have all PM related functions dropped in case PM is
  disabled.
- patch 12/28 was not compile-tested (all other were) since it doesn't
  build on x86. The change is trivial though, so there's no reason why
  it wouldn't compile.
- patch 14, 15, 19 and 28 use (platform_driver.suspend) instead of
  (platform_driver.driver.pm.suspend). Is the former deprecated?
  The scope of this patchset is just to convert to the new PM macros,
  but it left me wondering if this should be using the standard
  dev_pm_ops structure instead.
- patch 17/28 could probably use DEFINE_RUNTIME_DEV_PM_OPS(), which
  registers pm_runtime_force_suspend() and pm_runtime_force_resume() as
  the .suspend/.resume callbacks. I didn't know if the callbacks were
  missing on purpose, so I chose not to use this macro.
- patch 20/28 is a bit messy, because the EXPORT_GPL_SIMPLE_DEV_PM_OPS()
  does not support noirq callbacks. If you think it looks too bad, we
  can maybe add a new PM macro to handle this case.
- patch 26/28 exports the "stmpe_dev_pm_ops", which wasn't exported
  before. If you think this is a problem, we can export the symbol to a
  stmpe namespace.

Cheers,
-Paul

Paul Cercueil (28):
  mfd: 88pm80x: Remove #ifdef guards for PM related functions
  mfd: aat2870: Remove #ifdef guards for PM related functions
  mfd: adp5520: Remove #ifdef guards for PM related functions
  mfd: max8925-i2c: Remove #ifdef guards for PM related functions
  mfd: mt6397-irq: Remove #ifdef guards for PM related functions
  mfd: pcf50633: Remove #ifdef guards for PM related functions
  mfd: rc5t583-irq: Remove #ifdef guards for PM related functions
  mfd: stpmic1: Remove #ifdef guards for PM related functions
  mfd: ucb1x00: Remove #ifdef guards for PM related functions
  mfd: 88pm860x: Remove #ifdef guards for PM related functions
  mfd: intel_soc_pmic: Remove #ifdef guards for PM related functions
  mfd: mcp-sa11x0: Remove #ifdef guards for PM related functions
  mfd: sec: Remove #ifdef guards for PM related functions
  mfd: sm501: Remove #ifdef guards for PM related functions
  mfd: tc6387xb: Remove #ifdef guards for PM related functions
  mfd: tps6586x: Remove #ifdef guards for PM related functions
  mfd: wm8994: Remove #ifdef guards for PM related functions
  mfd: max77620: Remove #ifdef guards for PM related functions
  mfd: t7l66xb: Remove #ifdef guards for PM related functions
  mfd: arizona: Remove #ifdef guards for PM related functions
  mfd: max14577: Remove #ifdef guards for PM related functions
  mfd: max77686: Remove #ifdef guards for PM related functions
  mfd: motorola-cpcap: Remove #ifdef guards for PM related functions
  mfd: sprd-sc27xx: Remove #ifdef guards for PM related functions
  mfd: stmfx: Remove #ifdef guards for PM related functions
  mfd: stmpe: Remove #ifdef guards for PM related functions
  mfd: tc3589x: Remove #ifdef guards for PM related functions
  mfd: tc6393xb: Remove #ifdef guards for PM related functions

 drivers/mfd/88pm800.c              |  2 +-
 drivers/mfd/88pm805.c              |  2 +-
 drivers/mfd/88pm80x.c              |  5 +----
 drivers/mfd/88pm860x-core.c        |  6 ++----
 drivers/mfd/aat2870-core.c         |  8 +++-----
 drivers/mfd/adp5520.c              |  6 ++----
 drivers/mfd/arizona-core.c         | 21 +++++++++++----------
 drivers/mfd/arizona-i2c.c          |  2 +-
 drivers/mfd/arizona-spi.c          |  2 +-
 drivers/mfd/intel_soc_pmic_bxtwc.c |  7 +++----
 drivers/mfd/intel_soc_pmic_core.c  |  8 +++-----
 drivers/mfd/max14577.c             |  6 ++----
 drivers/mfd/max77620.c             |  9 +++------
 drivers/mfd/max77686.c             |  6 ++----
 drivers/mfd/max8925-i2c.c          |  7 +++----
 drivers/mfd/mcp-sa11x0.c           |  6 +-----
 drivers/mfd/motorola-cpcap.c       |  6 ++----
 drivers/mfd/mt6397-irq.c           |  6 +-----
 drivers/mfd/pcf50633-core.c        | 22 +---------------------
 drivers/mfd/pcf50633-irq.c         | 13 ++++++++-----
 drivers/mfd/rc5t583-irq.c          |  7 ++-----
 drivers/mfd/sec-core.c             |  7 +++----
 drivers/mfd/sm501.c                | 10 ++--------
 drivers/mfd/sprd-sc27xx-spi.c      |  7 +++----
 drivers/mfd/stmfx.c                |  6 ++----
 drivers/mfd/stmpe-i2c.c            |  4 +---
 drivers/mfd/stmpe-spi.c            |  4 +---
 drivers/mfd/stmpe.c                |  8 ++------
 drivers/mfd/stpmic1.c              |  6 ++----
 drivers/mfd/t7l66xb.c              |  9 ++-------
 drivers/mfd/tc3589x.c              |  7 +++----
 drivers/mfd/tc6387xb.c             |  9 ++-------
 drivers/mfd/tc6393xb.c             |  9 ++-------
 drivers/mfd/tps6586x.c             |  6 +-----
 drivers/mfd/ucb1x00-core.c         |  7 +++----
 drivers/mfd/wm8994-core.c          |  6 ++----
 include/linux/mfd/pcf50633/core.h  |  6 ++----
 37 files changed, 87 insertions(+), 181 deletions(-)

-- 
2.35.1


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

end of thread, other threads:[~2022-08-09 17:26 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-07 14:52 [PATCH 00/28] mfd: Remove #ifdef guards for PM functions Paul Cercueil
2022-08-07 14:52 ` [PATCH 01/28] mfd: 88pm80x: Remove #ifdef guards for PM related functions Paul Cercueil
2022-08-07 14:52 ` [PATCH 02/28] mfd: aat2870: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 03/28] mfd: adp5520: " Paul Cercueil
2022-08-08  7:46   ` Hennerich, Michael
2022-08-07 14:52 ` [PATCH 04/28] mfd: max8925-i2c: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 05/28] mfd: mt6397-irq: " Paul Cercueil
2022-08-07 14:52   ` Paul Cercueil
2022-08-07 14:52 ` [PATCH 06/28] mfd: pcf50633: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 07/28] mfd: rc5t583-irq: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 08/28] mfd: stpmic1: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 09/28] mfd: ucb1x00: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 10/28] mfd: 88pm860x: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 11/28] mfd: intel_soc_pmic: " Paul Cercueil
2022-08-07 15:50   ` Andy Shevchenko
2022-08-07 15:58     ` Paul Cercueil
2022-08-08 11:56       ` Andy Shevchenko
2022-08-08 12:13         ` Lee Jones
2022-08-07 14:52 ` [PATCH 12/28] mfd: mcp-sa11x0: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 13/28] mfd: sec: " Paul Cercueil
2022-08-08  9:11   ` Krzysztof Kozlowski
2022-08-08  9:28     ` Paul Cercueil
2022-08-08 10:06       ` Krzysztof Kozlowski
2022-08-08 10:14         ` Paul Cercueil
2022-08-09 15:33     ` Lee Jones
2022-08-09 15:51       ` Krzysztof Kozlowski
2022-08-09 17:26         ` Lee Jones
2022-08-07 14:52 ` [PATCH 14/28] mfd: sm501: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 15/28] mfd: tc6387xb: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 16/28] mfd: tps6586x: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 17/28] mfd: wm8994: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 18/28] mfd: max77620: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 19/28] mfd: t7l66xb: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 20/28] mfd: arizona: " Paul Cercueil
2022-08-07 17:33   ` kernel test robot
2022-08-08  9:53   ` Richard Fitzgerald
2022-08-08 10:06     ` Paul Cercueil
2022-08-08 10:43       ` Richard Fitzgerald
2022-08-08 11:01         ` Paul Cercueil
2022-08-08 14:00           ` Richard Fitzgerald
2022-08-08 14:47             ` Lee Jones
2022-08-07 14:52 ` [PATCH 21/28] mfd: max14577: " Paul Cercueil
2022-08-08  9:11   ` Krzysztof Kozlowski
2022-08-08 10:06   ` Krzysztof Kozlowski
2022-08-07 14:52 ` [PATCH 22/28] mfd: max77686: " Paul Cercueil
2022-08-08  9:11   ` Krzysztof Kozlowski
2022-08-08 10:06   ` Krzysztof Kozlowski
2022-08-07 14:52 ` [PATCH 23/28] mfd: motorola-cpcap: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 24/28] mfd: sprd-sc27xx: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 25/28] mfd: stmfx: " Paul Cercueil
2022-08-07 14:52   ` Paul Cercueil
2022-08-07 16:00   ` kernel test robot
2022-08-07 16:00     ` kernel test robot
2022-08-07 18:15   ` kernel test robot
2022-08-07 18:15     ` kernel test robot
2022-08-07 14:52 ` [PATCH 26/28] mfd: stmpe: " Paul Cercueil
2022-08-07 14:52   ` Paul Cercueil
2022-08-07 16:42   ` kernel test robot
2022-08-07 16:42     ` kernel test robot
2022-08-07 17:13   ` kernel test robot
2022-08-07 17:13     ` kernel test robot
2022-08-07 14:52 ` [PATCH 27/28] mfd: tc3589x: " Paul Cercueil
2022-08-07 14:52 ` [PATCH 28/28] mfd: tc6393xb: " Paul Cercueil

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.