diff options
Diffstat (limited to 'Documentation/gpio.txt')
-rw-r--r-- | Documentation/gpio.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index 54630095aa3c..c35ca9e40d4c 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt | |||
@@ -107,6 +107,16 @@ type of GPIO controller, and on one particular board 80-95 with an FPGA. | |||
107 | The numbers need not be contiguous; either of those platforms could also | 107 | The numbers need not be contiguous; either of those platforms could also |
108 | use numbers 2000-2063 to identify GPIOs in a bank of I2C GPIO expanders. | 108 | use numbers 2000-2063 to identify GPIOs in a bank of I2C GPIO expanders. |
109 | 109 | ||
110 | If you want to initialize a structure with an invalid GPIO number, use | ||
111 | some negative number (perhaps "-EINVAL"); that will never be valid. To | ||
112 | test if a number could reference a GPIO, you may use this predicate: | ||
113 | |||
114 | int gpio_is_valid(int number); | ||
115 | |||
116 | A number that's not valid will be rejected by calls which may request | ||
117 | or free GPIOs (see below). Other numbers may also be rejected; for | ||
118 | example, a number might be valid but unused on a given board. | ||
119 | |||
110 | Whether a platform supports multiple GPIO controllers is currently a | 120 | Whether a platform supports multiple GPIO controllers is currently a |
111 | platform-specific implementation issue. | 121 | platform-specific implementation issue. |
112 | 122 | ||