Skip to content

pinctrl: API change, config in mapping table

Stephen Warren lkml 1 version Applied

Status from this message: Thanks, applied!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 64 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/20pinctrl: pinctrl_register_mappings() shouldn't be __initdrivers/pinctrl/core.c+5 -101 reply
2/20pinctrl: use list_add_tail instead of list_adddrivers/pinctrl/core.c drivers/pinctrl/pinmux.c+5 -51 reply
3/20pinctrl: Store mapping table as a list of chunksdrivers/pinctrl/core.c+75 -451 reply
4/20pinctrl: Record a pin owner, not mux function, when requesting pinsdrivers/pinctrl/core.h drivers/pinctrl/pinmux.c+32 -413 replies
5/20pinctrl: Re-order pinmux.[ch] to match each-otherdrivers/pinctrl/pinmux.c drivers/pinctrl/pinmux.h+36 -361 reply
6/20pinctrl: Re-order pinconf.[ch] to match each-otherdrivers/pinctrl/pinconf.c drivers/pinctrl/pinconf.h+16 -201 reply
7/20pinctrl: core.c/h cleanupsdrivers/pinctrl/core.c drivers/pinctrl/core.h+7 -81 reply
8/20pinctrl: Assume map table entries can't have a NULL name fieldDocumentation/pinctrl.txt drivers/pinctrl/core.c+10 -2317 replies
9/20pinctrl: Disallow map table entries with NULL dev_name fieldDocumentation/pinctrl.txt drivers/pinctrl/core.c include/linux/pinctrl/machine.h+29 -682 replies
10/20pinctrl: Assume map table entries can't have a NULL ctrl_dev_name fielddrivers/pinctrl/core.c+1 -22 replies
11/20pinctrl: Downgrade pinctrl_get warning when no maps are founddrivers/pinctrl/core.c+10 -75 replies
12/20pinctrl: Use dev_*() instead of pr_*(), add some msgs, minor cleanupsdrivers/pinctrl/core.c+22 -162 replies
13/20pinctrl: Error if mapping table's control dev can't be founddrivers/pinctrl/core.c+6 -52 replies
14/20pinctrl: Allocate sizeof(*p) instead of sizeof(struct foo)drivers/pinctrl/core.c drivers/pinctrl/pinmux.c+5 -52 replies
15/20pinctrl: Fix and simplify lockingdrivers/pinctrl/core.c drivers/pinctrl/core.h drivers/pinctrl/pinconf.c +2 more+225 -1553 replies
16/20pinctrl: Refactor struct pinctrl handling in core.c vs pinmux.cdrivers/pinctrl/core.c drivers/pinctrl/core.h drivers/pinctrl/pinmux.c +1 more+193 -3872 replies
17/20pinctrl: Add usecount to pins for muxingdrivers/pinctrl/core.h drivers/pinctrl/pinmux.c+23 -73 replies
18/20pinctrl: Fix pinconf_groups_show() to emit newlinedrivers/pinctrl/pinconf.c+2 -01 reply
19/20pinctrl: API changes to support multiple states per deviceDocumentation/pinctrl.txt arch/arm/mach-u300/core.c drivers/pinctrl/core.c +4 more+408 -3767 replies
20/20pinctrl: Enhance mapping table to support pin config operationsDocumentation/pinctrl.txt arch/arm/mach-u300/core.c drivers/pinctrl/core.c +6 more+609 -1066 replies

Reviews trailers per patch

7 of 20 patches have a Reviewed-by or Acked-by.

PatchLinus WalleijShawn GuoDong Aisheng
1/20
2/20
3/20
4/20
5/20
6/20
7/20
8/20
9/20A-b A-b
10/20A-b
11/20A-b
12/20A-b A-b
13/20
14/20A-b A-b
15/20
16/20A-b A-b
17/20A-b
18/20
19/20
20/20

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

Read the v1 thread

Cover letter [PATCH 00/20] pinctrl: API change, config in mapping table

These changes:
* Rework the pinctrl API as we discussed at Linaro Connect.
* Allow specifying pin config settings in the mapping table in addition to mux options, as we agreed upon at Linaro Connect.
* Various cleanups and refactorings aimed at supporting the changes above.

TODO in this patch set:
* Test build of non-Tegra platforms.
* Test build with pinmux/pinconf disabled.
... but I figure it was a good idea to send out for comments ASAP.

TODO in future patch sets:
* Implement device tree support in pinctrl core and a pinctrl driver.
* Remove pin config APIs from pinctrl now that the mapping table supports pin config?

I've tested this all on a couple Tegra boards, including hacking in a single pin config and dummy state mapping table entry. I've got patches for Tegra boards that use the explicit pin config APIs, and need to convert them to using the pin config mapping table entries for more complete testing.

(In the diffstat below, I /think/ the first 19 patches are a net negative in line-count, and only the last patch, which implements a new feature, adds a significant number of lines)

Stephen Warren (20):
pinctrl: pinctrl_register_mappings() shouldn't be __init
pinctrl: use list_add_tail instead of list_add
pinctrl: Store mapping table as a list of chunks
pinctrl: Record a pin owner, not mux function, when requesting pins
pinctrl: Re-order pinmux.[ch] to match each-other
pinctrl: Re-order pinconf.[ch] to match each-other
pinctrl: core.c/h cleanups
pinctrl: Assume map table entries can't have a NULL name field
pinctrl: Disallow map table entries with NULL dev_name field
pinctrl: Assume map table entries can't have a NULL ctrl_dev_name
field
pinctrl: Downgrade pinctrl_get warning when no maps are found
pinctrl: Use dev_*() instead of pr_*(), add some msgs, minor cleanups
pinctrl: Error if mapping table's control dev can't be found
pinctrl: Allocate sizeof(*p) instead of sizeof(struct foo)
pinctrl: Fix and simplify locking
pinctrl: Refactor struct pinctrl handling in core.c vs pinmux.c
pinctrl: Add usecount to pins for muxing
pinctrl: Fix pinconf_groups_show() to emit newline
pinctrl: API changes to support multiple states per device
pinctrl: Enhance mapping table to support pin config operations

 Documentation/pinctrl.txt         |  244 +++++++----
 arch/arm/mach-u300/core.c         |   28 +-
 drivers/pinctrl/core.c            |  936 +++++++++++++++++++++----------------
 drivers/pinctrl/core.h            |  100 +++--
 drivers/pinctrl/pinconf.c         |  288 ++++++++++--
 drivers/pinctrl/pinconf.h         |   45 ++-
 drivers/pinctrl/pinmux.c          |  578 ++++++++---------------
 drivers/pinctrl/pinmux.h          |   61 ++--
 drivers/tty/serial/sirfsoc_uart.c |   12 +-
 include/linux/pinctrl/consumer.h  |   55 ++-
 include/linux/pinctrl/machine.h   |  131 ++++--
 include/linux/pinctrl/pinctrl.h   |    1 -
 12 files changed, 1438 insertions(+), 1041 deletions(-)
Signature · 1 line
1.7.5.4