diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-05-23 22:11:50 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-28 06:31:30 -0400 |
commit | 70f5c9a4ddcbce3e6d7d54ec890a4bca19b4fc7a (patch) | |
tree | 614b4e8c7498cb813f1e0b355ec67e94d00aff2f /Documentation/arm | |
parent | b9f141acf2a6b456e262bc54fd69c19d76c319d3 (diff) |
ARM: S3C24XX: Documentation: update GPIO documentation
Upate the S3C24XX GPIO documentation after the changes for gpiolib
and show which calls are being replaced by gpiolib or the new s3c
generic calls.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'Documentation/arm')
-rw-r--r-- | Documentation/arm/Samsung-S3C24XX/GPIO.txt | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/Documentation/arm/Samsung-S3C24XX/GPIO.txt b/Documentation/arm/Samsung-S3C24XX/GPIO.txt index 2af2cf39915f..9fe5feac212d 100644 --- a/Documentation/arm/Samsung-S3C24XX/GPIO.txt +++ b/Documentation/arm/Samsung-S3C24XX/GPIO.txt | |||
@@ -24,8 +24,16 @@ GPIOLIB | |||
24 | listed below will be removed (they may be marked as __deprecated | 24 | listed below will be removed (they may be marked as __deprecated |
25 | in the near future). | 25 | in the near future). |
26 | 26 | ||
27 | - s3c2410_gpio_getpin | 27 | The following functions now either have a s3c_ specific variant |
28 | - s3c2410_gpio_setpin | 28 | or are merged into gpiolib. See the definitions in |
29 | arch/arm/plat-samsung/include/plat/gpio-cfg.h: | ||
30 | |||
31 | s3c2410_gpio_setpin() gpio_set_value() or gpio_direction_output() | ||
32 | s3c2410_gpio_getpin() gpio_get_value() or gpio_direction_input() | ||
33 | s3c2410_gpio_getirq() gpio_to_irq() | ||
34 | s3c2410_gpio_cfgpin() s3c_gpio_cfgpin() | ||
35 | s3c2410_gpio_getcfg() s3c_gpio_getcfg() | ||
36 | s3c2410_gpio_pullup() s3c_gpio_setpull() | ||
29 | 37 | ||
30 | 38 | ||
31 | Headers | 39 | Headers |
@@ -54,6 +62,11 @@ PIN Numbers | |||
54 | eg S3C2410_GPA(0) or S3C2410_GPF(1). These defines are used to tell | 62 | eg S3C2410_GPA(0) or S3C2410_GPF(1). These defines are used to tell |
55 | the GPIO functions which pin is to be used. | 63 | the GPIO functions which pin is to be used. |
56 | 64 | ||
65 | With the conversion to gpiolib, there is no longer a direct conversion | ||
66 | from gpio pin number to register base address as in earlier kernels. This | ||
67 | is due to the number space required for newer SoCs where the later | ||
68 | GPIOs are not contiguous. | ||
69 | |||
57 | 70 | ||
58 | Configuring a pin | 71 | Configuring a pin |
59 | ----------------- | 72 | ----------------- |
@@ -71,6 +84,8 @@ Configuring a pin | |||
71 | which would turn GPA(0) into the lowest Address line A0, and set | 84 | which would turn GPA(0) into the lowest Address line A0, and set |
72 | GPE(8) to be connected to the SDIO/MMC controller's SDDAT1 line. | 85 | GPE(8) to be connected to the SDIO/MMC controller's SDDAT1 line. |
73 | 86 | ||
87 | The s3c_gpio_cfgpin() call is a functional replacement for this call. | ||
88 | |||
74 | 89 | ||
75 | Reading the current configuration | 90 | Reading the current configuration |
76 | --------------------------------- | 91 | --------------------------------- |
@@ -82,6 +97,9 @@ Reading the current configuration | |||
82 | The return value will be from the same set of values which can be | 97 | The return value will be from the same set of values which can be |
83 | passed to s3c2410_gpio_cfgpin(). | 98 | passed to s3c2410_gpio_cfgpin(). |
84 | 99 | ||
100 | The s3c_gpio_getcfg() call should be a functional replacement for | ||
101 | this call. | ||
102 | |||
85 | 103 | ||
86 | Configuring a pull-up resistor | 104 | Configuring a pull-up resistor |
87 | ------------------------------ | 105 | ------------------------------ |
@@ -95,6 +113,10 @@ Configuring a pull-up resistor | |||
95 | Where the to value is zero to set the pull-up off, and 1 to enable | 113 | Where the to value is zero to set the pull-up off, and 1 to enable |
96 | the specified pull-up. Any other values are currently undefined. | 114 | the specified pull-up. Any other values are currently undefined. |
97 | 115 | ||
116 | The s3c_gpio_setpull() offers similar functionality, but with the | ||
117 | ability to encode whether the pull is up or down. Currently there | ||
118 | is no 'just on' state, so up or down must be selected. | ||
119 | |||
98 | 120 | ||
99 | Getting the state of a PIN | 121 | Getting the state of a PIN |
100 | -------------------------- | 122 | -------------------------- |
@@ -106,6 +128,9 @@ Getting the state of a PIN | |||
106 | This will return either zero or non-zero. Do not count on this | 128 | This will return either zero or non-zero. Do not count on this |
107 | function returning 1 if the pin is set. | 129 | function returning 1 if the pin is set. |
108 | 130 | ||
131 | This call is now implemented by the relevant gpiolib calls, convert | ||
132 | your board or driver to use gpiolib. | ||
133 | |||
109 | 134 | ||
110 | Setting the state of a PIN | 135 | Setting the state of a PIN |
111 | -------------------------- | 136 | -------------------------- |
@@ -117,6 +142,9 @@ Setting the state of a PIN | |||
117 | Which sets the given pin to the value. Use 0 to write 0, and 1 to | 142 | Which sets the given pin to the value. Use 0 to write 0, and 1 to |
118 | set the output to 1. | 143 | set the output to 1. |
119 | 144 | ||
145 | This call is now implemented by the relevant gpiolib calls, convert | ||
146 | your board or driver to use gpiolib. | ||
147 | |||
120 | 148 | ||
121 | Getting the IRQ number associated with a PIN | 149 | Getting the IRQ number associated with a PIN |
122 | -------------------------------------------- | 150 | -------------------------------------------- |
@@ -128,6 +156,9 @@ Getting the IRQ number associated with a PIN | |||
128 | 156 | ||
129 | Note, not all pins have an IRQ. | 157 | Note, not all pins have an IRQ. |
130 | 158 | ||
159 | This call is now implemented by the relevant gpiolib calls, convert | ||
160 | your board or driver to use gpiolib. | ||
161 | |||
131 | 162 | ||
132 | Authour | 163 | Authour |
133 | ------- | 164 | ------- |