Skip to content

Simplify MFD Core

Lee Jones linux-arm-kernel lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest10 patches 1 replyIn review
  2. v310 patches 10 repliesSuperseded
  3. v29 patches 24 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches2 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10mfd: cs5535-mfd: Use PLATFORM_DEVID_* defines and tidy error messagedrivers/mfd/cs5535-mfd.c+3 -20 replies
2/10mfd: cs5535-mfd: Remove mfd_cell->id hackdrivers/mfd/cs5535-mfd.c+2 -120 replies
3/10mfd: cs5535-mfd: Request shared IO regions centrallydrivers/mfd/cs5535-mfd.c+33 -411 reply
4/10mfd: cs5535-mfd: Register clients using their own dedicated MFD cell entriesdrivers/mfd/cs5535-mfd.c+16 -90 replies
5/10mfd: mfd-core: Protect against NULL call-back function pointerdrivers/mfd/mfd-core.c+10 -00 replies
6/10mfd: mfd-core: Remove mfd_clone_cell()drivers/mfd/mfd-core.c include/linux/mfd/core.h+0 -510 replies
7/10x86: olpc-xo1-pm: Remove invocation of MFD's .enable()/.disable() call-backsarch/x86/platform/olpc/olpc-xo1-pm.c+0 -80 replies
8/10x86: olpc-xo1-sci: Remove invocation of MFD's .enable()/.disable() call-backsarch/x86/platform/olpc/olpc-xo1-sci.c+0 -60 replies
9/10mfd: mfd-core: Remove usage counting for .{en,dis}able() call-backsdrivers/mfd/mfd-core.c include/linux/mfd/core.h+9 -500 replies
10/10mfd: mfd-core: Move pdev->mfd_cell creation back into mfd_add_device()drivers/mfd/mfd-core.c+4 -170 replies

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchDaniel ThompsonMark Brown
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b R-b
10/10R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/10] Simplify MFD Core

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: Protect against NULL call-back function pointer
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: 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              | 108 +++++++++++-------------
 drivers/mfd/mfd-core.c                | 113 +++++---------------------
 include/linux/mfd/core.h              |  20 -----
 5 files changed, 68 insertions(+), 187 deletions(-)
Signature · 1 line
2.17.1