X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=Documentation%2Fgpio.txt;h=c35ca9e40d4ca8ae0cbf7c06c639d8531ae8d9dd;hb=5f828546e1acb45678e73d3a9a796c1a3a8c7846;hp=54630095aa3c8f841c097e723eef518f660a30a7;hpb=6f58d79598c184dc4f18ceddfaa5fa7483bce0a5;p=linux-2.6-omap-h63xx.git diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index 54630095aa3..c35ca9e40d4 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. The numbers need not be contiguous; either of those platforms could also use numbers 2000-2063 to identify GPIOs in a bank of I2C GPIO expanders. +If you want to initialize a structure with an invalid GPIO number, use +some negative number (perhaps "-EINVAL"); that will never be valid. To +test if a number could reference a GPIO, you may use this predicate: + + int gpio_is_valid(int number); + +A number that's not valid will be rejected by calls which may request +or free GPIOs (see below). Other numbers may also be rejected; for +example, a number might be valid but unused on a given board. + Whether a platform supports multiple GPIO controllers is currently a platform-specific implementation issue.