diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-02-08 19:52:22 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-02-10 15:32:57 -0500 |
commit | 28a8d14cc74a0180323d9150c3d3dbf9dd60d55a (patch) | |
tree | 7c54436dbe7fbe172f6a293a21174a612ccd9634 /Documentation/pinctrl.txt | |
parent | f4e66983293f78e177bb210d19a46f083f5e8197 (diff) |
pinctrl: break out a pinctrl consumer header
This breaks out a <linux/pinctrl/consumer.h> header to be used by
all pinmux and pinconfig alike, so drivers needing services from
pinctrl does not need to include different headers. This is similar
to the approach taken by the regulator API.
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'Documentation/pinctrl.txt')
-rw-r--r-- | Documentation/pinctrl.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index 14aecd2b2dbc..b268832c49d2 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt | |||
@@ -208,6 +208,8 @@ unconnected. | |||
208 | 208 | ||
209 | For example, a platform may do this: | 209 | For example, a platform may do this: |
210 | 210 | ||
211 | #include <linux/pinctrl/consumer.h> | ||
212 | |||
211 | ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP); | 213 | ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP); |
212 | 214 | ||
213 | To pull up a pin to VDD. The pin configuration driver implements callbacks for | 215 | To pull up a pin to VDD. The pin configuration driver implements callbacks for |
@@ -920,7 +922,7 @@ this is not possible. | |||
920 | A driver may request a certain mux to be activated, usually just the default | 922 | A driver may request a certain mux to be activated, usually just the default |
921 | mux like this: | 923 | mux like this: |
922 | 924 | ||
923 | #include <linux/pinctrl/pinmux.h> | 925 | #include <linux/pinctrl/consumer.h> |
924 | 926 | ||
925 | struct foo_state { | 927 | struct foo_state { |
926 | struct pinmux *pmx; | 928 | struct pinmux *pmx; |
@@ -1019,6 +1021,8 @@ function, but with different named in the mapping as described under | |||
1019 | This snippet first muxes the function in the pins defined by group A, enables | 1021 | This snippet first muxes the function in the pins defined by group A, enables |
1020 | it, disables and releases it, and muxes it in on the pins defined by group B: | 1022 | it, disables and releases it, and muxes it in on the pins defined by group B: |
1021 | 1023 | ||
1024 | #include <linux/pinctrl/consumer.h> | ||
1025 | |||
1022 | foo_switch() | 1026 | foo_switch() |
1023 | { | 1027 | { |
1024 | struct pinmux *pmx; | 1028 | struct pinmux *pmx; |