aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/pinctrl.txt
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-03-01 20:48:33 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-03-02 10:20:54 -0500
commit110e4ec5a1cfe20190e7f8c2b8b4eef369de3c99 (patch)
tree2e20b44478f47069ac19f0ef9f5a92bee7576bdd /Documentation/pinctrl.txt
parent46919ae63d4820e76724beb655274ce143f0da0b (diff)
pinctrl: assume map table entries can't have a NULL name field
pinctrl_register_mappings() already requires that every mapping table entry have a non-NULL name field. Logically, this makes sense too; drivers should always request a specific named state so they know what they're getting. Relying on getting the first mentioned state in the mapping table is error-prone, and a nasty special case to implement, given that a given the mapping table may define multiple states for a device. Remove a small part of the documentation that talked about optionally requesting a specific state; it's mandatory now. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'Documentation/pinctrl.txt')
-rw-r--r--Documentation/pinctrl.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt
index 6fe3232e798e..558aac554d09 100644
--- a/Documentation/pinctrl.txt
+++ b/Documentation/pinctrl.txt
@@ -782,16 +782,19 @@ spi on the second function mapping:
782static const struct pinctrl_map __initdata mapping[] = { 782static const struct pinctrl_map __initdata mapping[] = {
783 { 783 {
784 .dev_name = "foo-spi.0", 784 .dev_name = "foo-spi.0",
785 .name = PINCTRL_STATE_DEFAULT,
785 .ctrl_dev_name = "pinctrl-foo", 786 .ctrl_dev_name = "pinctrl-foo",
786 .function = "spi0", 787 .function = "spi0",
787 }, 788 },
788 { 789 {
789 .dev_name = "foo-i2c.0", 790 .dev_name = "foo-i2c.0",
791 .name = PINCTRL_STATE_DEFAULT,
790 .ctrl_dev_name = "pinctrl-foo", 792 .ctrl_dev_name = "pinctrl-foo",
791 .function = "i2c0", 793 .function = "i2c0",
792 }, 794 },
793 { 795 {
794 .dev_name = "foo-mmc.0", 796 .dev_name = "foo-mmc.0",
797 .name = PINCTRL_STATE_DEFAULT,
795 .ctrl_dev_name = "pinctrl-foo", 798 .ctrl_dev_name = "pinctrl-foo",
796 .function = "mmc0", 799 .function = "mmc0",
797 }, 800 },
@@ -944,10 +947,6 @@ foo_remove()
944 pinctrl_put(state->p); 947 pinctrl_put(state->p);
945} 948}
946 949
947If you want to grab a specific control mapping and not just the first one
948found for this device you can specify a specific mapping name, for example in
949the above example the second i2c0 setting: pinctrl_get(&device, "spi0-pos-B");
950
951This get/enable/disable/put sequence can just as well be handled by bus drivers 950This get/enable/disable/put sequence can just as well be handled by bus drivers
952if you don't want each and every driver to handle it and you know the 951if you don't want each and every driver to handle it and you know the
953arrangement on your bus. 952arrangement on your bus.