aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/pinctrl.txt
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-02-08 19:52:22 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-02-10 15:32:57 -0500
commit28a8d14cc74a0180323d9150c3d3dbf9dd60d55a (patch)
tree7c54436dbe7fbe172f6a293a21174a612ccd9634 /Documentation/pinctrl.txt
parentf4e66983293f78e177bb210d19a46f083f5e8197 (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.txt6
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
209For example, a platform may do this: 209For example, a platform may do this:
210 210
211#include <linux/pinctrl/consumer.h>
212
211ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP); 213ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP);
212 214
213To pull up a pin to VDD. The pin configuration driver implements callbacks for 215To pull up a pin to VDD. The pin configuration driver implements callbacks for
@@ -920,7 +922,7 @@ this is not possible.
920A driver may request a certain mux to be activated, usually just the default 922A driver may request a certain mux to be activated, usually just the default
921mux like this: 923mux like this:
922 924
923#include <linux/pinctrl/pinmux.h> 925#include <linux/pinctrl/consumer.h>
924 926
925struct foo_state { 927struct 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
1019This snippet first muxes the function in the pins defined by group A, enables 1021This snippet first muxes the function in the pins defined by group A, enables
1020it, disables and releases it, and muxes it in on the pins defined by group B: 1022it, disables and releases it, and muxes it in on the pins defined by group B:
1021 1023
1024#include <linux/pinctrl/consumer.h>
1025
1022foo_switch() 1026foo_switch()
1023{ 1027{
1024 struct pinmux *pmx; 1028 struct pinmux *pmx;