diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/gpio.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index 8b69811a964..18022e249c5 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt | |||
@@ -389,11 +389,21 @@ either NULL or the label associated with that GPIO when it was requested. | |||
389 | 389 | ||
390 | Platform Support | 390 | Platform Support |
391 | ---------------- | 391 | ---------------- |
392 | To support this framework, a platform's Kconfig will "select HAVE_GPIO_LIB" | 392 | To support this framework, a platform's Kconfig will "select" either |
393 | ARCH_REQUIRE_GPIOLIB or ARCH_WANT_OPTIONAL_GPIOLIB | ||
393 | and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines | 394 | and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines |
394 | three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep(). | 395 | three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep(). |
395 | They may also want to provide a custom value for ARCH_NR_GPIOS. | 396 | They may also want to provide a custom value for ARCH_NR_GPIOS. |
396 | 397 | ||
398 | ARCH_REQUIRE_GPIOLIB means that the gpio-lib code will always get compiled | ||
399 | into the kernel on that architecture. | ||
400 | |||
401 | ARCH_WANT_OPTIONAL_GPIOLIB means the gpio-lib code defaults to off and the user | ||
402 | can enable it and build it into the kernel optionally. | ||
403 | |||
404 | If neither of these options are selected, the platform does not support | ||
405 | GPIOs through GPIO-lib and the code cannot be enabled by the user. | ||
406 | |||
397 | Trivial implementations of those functions can directly use framework | 407 | Trivial implementations of those functions can directly use framework |
398 | code, which always dispatches through the gpio_chip: | 408 | code, which always dispatches through the gpio_chip: |
399 | 409 | ||