aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/pinctrl.txt
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-02-23 19:04:39 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-02-29 13:10:55 -0500
commit806d314325812fb8ffe7059bd84a23d334350c21 (patch)
treece904d5ddab97e25b71b547f7b20844d507b9529 /Documentation/pinctrl.txt
parent1cf94c45ca31c0ad563e72b095782346cba26b6c (diff)
pinctrl: re-order struct pinctrl_map
The lookup key in struct pinctrl_map is (.dev_name, .name). Re-order the struct definition to put the lookup key fields first, and the result values afterwards. To me at least, this slightly better reflects the lookup process. Update the documentation in a similar fashion. Note: PIN_MAP*() macros aren't updated; I plan to update this once later when enhancing the mapping table format to support pin config to reduce churn. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> [Rebased for cherry-picking] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'Documentation/pinctrl.txt')
-rw-r--r--Documentation/pinctrl.txt24
1 files changed, 12 insertions, 12 deletions
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt
index fa9163af34f6..5e314cecab77 100644
--- a/Documentation/pinctrl.txt
+++ b/Documentation/pinctrl.txt
@@ -781,19 +781,19 @@ spi on the second function mapping:
781 781
782static const struct pinctrl_map __initdata mapping[] = { 782static const struct pinctrl_map __initdata mapping[] = {
783 { 783 {
784 .dev_name = "foo-spi.0",
784 .ctrl_dev_name = "pinctrl-foo", 785 .ctrl_dev_name = "pinctrl-foo",
785 .function = "spi0", 786 .function = "spi0",
786 .dev_name = "foo-spi.0",
787 }, 787 },
788 { 788 {
789 .dev_name = "foo-i2c.0",
789 .ctrl_dev_name = "pinctrl-foo", 790 .ctrl_dev_name = "pinctrl-foo",
790 .function = "i2c0", 791 .function = "i2c0",
791 .dev_name = "foo-i2c.0",
792 }, 792 },
793 { 793 {
794 .dev_name = "foo-mmc.0",
794 .ctrl_dev_name = "pinctrl-foo", 795 .ctrl_dev_name = "pinctrl-foo",
795 .function = "mmc0", 796 .function = "mmc0",
796 .dev_name = "foo-mmc.0",
797 }, 797 },
798}; 798};
799 799
@@ -826,18 +826,18 @@ As it is possible to map a function to different groups of pins an optional
826 826
827... 827...
828{ 828{
829 .dev_name = "foo-spi.0",
829 .name = "spi0-pos-A", 830 .name = "spi0-pos-A",
830 .ctrl_dev_name = "pinctrl-foo", 831 .ctrl_dev_name = "pinctrl-foo",
831 .function = "spi0", 832 .function = "spi0",
832 .group = "spi0_0_grp", 833 .group = "spi0_0_grp",
833 .dev_name = "foo-spi.0",
834}, 834},
835{ 835{
836 .dev_name = "foo-spi.0",
836 .name = "spi0-pos-B", 837 .name = "spi0-pos-B",
837 .ctrl_dev_name = "pinctrl-foo", 838 .ctrl_dev_name = "pinctrl-foo",
838 .function = "spi0", 839 .function = "spi0",
839 .group = "spi0_1_grp", 840 .group = "spi0_1_grp",
840 .dev_name = "foo-spi.0",
841}, 841},
842... 842...
843 843
@@ -852,45 +852,45 @@ case), we define a mapping like this:
852 852
853... 853...
854{ 854{
855 .dev_name = "foo-mmc.0",
855 .name = "2bit" 856 .name = "2bit"
856 .ctrl_dev_name = "pinctrl-foo", 857 .ctrl_dev_name = "pinctrl-foo",
857 .function = "mmc0", 858 .function = "mmc0",
858 .group = "mmc0_1_grp", 859 .group = "mmc0_1_grp",
859 .dev_name = "foo-mmc.0",
860}, 860},
861{ 861{
862 .dev_name = "foo-mmc.0",
862 .name = "4bit" 863 .name = "4bit"
863 .ctrl_dev_name = "pinctrl-foo", 864 .ctrl_dev_name = "pinctrl-foo",
864 .function = "mmc0", 865 .function = "mmc0",
865 .group = "mmc0_1_grp", 866 .group = "mmc0_1_grp",
866 .dev_name = "foo-mmc.0",
867}, 867},
868{ 868{
869 .dev_name = "foo-mmc.0",
869 .name = "4bit" 870 .name = "4bit"
870 .ctrl_dev_name = "pinctrl-foo", 871 .ctrl_dev_name = "pinctrl-foo",
871 .function = "mmc0", 872 .function = "mmc0",
872 .group = "mmc0_2_grp", 873 .group = "mmc0_2_grp",
873 .dev_name = "foo-mmc.0",
874}, 874},
875{ 875{
876 .dev_name = "foo-mmc.0",
876 .name = "8bit" 877 .name = "8bit"
877 .ctrl_dev_name = "pinctrl-foo", 878 .ctrl_dev_name = "pinctrl-foo",
878 .group = "mmc0_1_grp", 879 .group = "mmc0_1_grp",
879 .dev_name = "foo-mmc.0",
880}, 880},
881{ 881{
882 .dev_name = "foo-mmc.0",
882 .name = "8bit" 883 .name = "8bit"
883 .ctrl_dev_name = "pinctrl-foo", 884 .ctrl_dev_name = "pinctrl-foo",
884 .function = "mmc0", 885 .function = "mmc0",
885 .group = "mmc0_2_grp", 886 .group = "mmc0_2_grp",
886 .dev_name = "foo-mmc.0",
887}, 887},
888{ 888{
889 .dev_name = "foo-mmc.0",
889 .name = "8bit" 890 .name = "8bit"
890 .ctrl_dev_name = "pinctrl-foo", 891 .ctrl_dev_name = "pinctrl-foo",
891 .function = "mmc0", 892 .function = "mmc0",
892 .group = "mmc0_3_grp", 893 .group = "mmc0_3_grp",
893 .dev_name = "foo-mmc.0",
894}, 894},
895... 895...
896 896
@@ -988,10 +988,10 @@ This is enabled by simply setting the .dev_name field in the map to the name
988of the pin controller itself, like this: 988of the pin controller itself, like this:
989 989
990{ 990{
991 .dev_name = "pinctrl-foo",
991 .name = "POWERMAP" 992 .name = "POWERMAP"
992 .ctrl_dev_name = "pinctrl-foo", 993 .ctrl_dev_name = "pinctrl-foo",
993 .function = "power_func", 994 .function = "power_func",
994 .dev_name = "pinctrl-foo",
995}, 995},
996 996
997Since it may be common to request the core to hog a few always-applicable 997Since it may be common to request the core to hog a few always-applicable