linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/10] Simplify MFD Core
@ 2019-10-24 16:38 Lee Jones
  2019-10-24 16:38 ` [PATCH v3 01/10] mfd: cs5535-mfd: Use PLATFORM_DEVID_* defines and tidy error message Lee Jones
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Lee Jones @ 2019-10-24 16:38 UTC (permalink / raw)
  To: daniel.thompson, arnd, broonie, linus.walleij
  Cc: linux-arm-kernel, linux-kernel, baohua, stephan, Lee Jones

MFD currently has one over-complicated user.  CS5535 uses a mixture of
cell cloning, reference counting and subsystem-level call-backs to
achieve its goal of requesting an IO memory region only once across 3
consumers.  The same can be achieved by handling the region centrally
during the parent device's .probe() sequence.  Releasing can be handed
in a similar way during .remove().
 
While we're here, take the opportunity to provide some clean-ups and
error checking to issues noticed along the way.
 
This also paves the way for clean cell disabling via Device Tree being
discussed at [0]
 
[0] https://lkml.org/lkml/2019/10/18/612.

Lee Jones (10):
  mfd: cs5535-mfd: Use PLATFORM_DEVID_* defines and tidy error message
  mfd: cs5535-mfd: Remove mfd_cell->id hack
  mfd: cs5535-mfd: Request shared IO regions centrally
  mfd: cs5535-mfd: Register clients using their own dedicated MFD cell
    entries
  mfd: mfd-core: Remove mfd_clone_cell()
  x86: olpc-xo1-pm: Remove invocation of MFD's .enable()/.disable()
    call-backs
  x86: olpc-xo1-sci: Remove invocation of MFD's .enable()/.disable()
    call-backs
  mfd: mfd-core: Protect against NULL call-back function pointer
  mfd: mfd-core: Remove usage counting for .{en,dis}able() call-backs
  mfd: mfd-core: Move pdev->mfd_cell creation back into mfd_add_device()

 arch/x86/platform/olpc/olpc-xo1-pm.c  |   8 --
 arch/x86/platform/olpc/olpc-xo1-sci.c |   6 --
 drivers/mfd/cs5535-mfd.c              | 105 +++++++++++-------------
 drivers/mfd/mfd-core.c                | 113 +++++---------------------
 include/linux/mfd/core.h              |  20 -----
 5 files changed, 65 insertions(+), 187 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2019-10-25 14:56 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24 16:38 [PATCH v3 00/10] Simplify MFD Core Lee Jones
2019-10-24 16:38 ` [PATCH v3 01/10] mfd: cs5535-mfd: Use PLATFORM_DEVID_* defines and tidy error message Lee Jones
2019-10-24 16:38 ` [PATCH v3 02/10] mfd: cs5535-mfd: Remove mfd_cell->id hack Lee Jones
2019-10-25  8:36   ` Daniel Thompson
2019-10-24 16:38 ` [PATCH v3 03/10] mfd: cs5535-mfd: Request shared IO regions centrally Lee Jones
2019-10-25  8:50   ` Daniel Thompson
2019-10-24 16:38 ` [PATCH v3 04/10] mfd: cs5535-mfd: Register clients using their own dedicated MFD cell entries Lee Jones
2019-10-25  8:50   ` Daniel Thompson
2019-10-24 16:38 ` [PATCH v3 05/10] mfd: mfd-core: Remove mfd_clone_cell() Lee Jones
2019-10-24 16:38 ` [PATCH v3 06/10] x86: olpc-xo1-pm: Remove invocation of MFD's .enable()/.disable() call-backs Lee Jones
2019-10-25  8:53   ` Daniel Thompson
2019-10-24 16:38 ` [PATCH v3 07/10] x86: olpc-xo1-sci: " Lee Jones
2019-10-25  8:54   ` Daniel Thompson
2019-10-24 16:38 ` [PATCH v3 08/10] mfd: mfd-core: Protect against NULL call-back function pointer Lee Jones
2019-10-25  8:52   ` Daniel Thompson
2019-10-25 14:55   ` Mark Brown
2019-10-24 16:38 ` [PATCH v3 09/10] mfd: mfd-core: Remove usage counting for .{en,dis}able() call-backs Lee Jones
2019-10-25 14:55   ` Mark Brown
2019-10-24 16:38 ` [PATCH v3 10/10] mfd: mfd-core: Move pdev->mfd_cell creation back into mfd_add_device() Lee Jones
2019-10-25  8:56   ` Daniel Thompson
2019-10-25 14:56   ` Mark Brown

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).