diff options
Diffstat (limited to 'Documentation')
-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 e4b6985044a2..566edaa56a53 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt | |||
@@ -555,6 +555,11 @@ requested using gpio_request(): | |||
555 | /* reverse gpio_export() */ | 555 | /* reverse gpio_export() */ |
556 | void gpio_unexport(); | 556 | void gpio_unexport(); |
557 | 557 | ||
558 | /* create a sysfs link to an exported GPIO node */ | ||
559 | int gpio_export_link(struct device *dev, const char *name, | ||
560 | unsigned gpio) | ||
561 | |||
562 | |||
558 | After a kernel driver requests a GPIO, it may only be made available in | 563 | After a kernel driver requests a GPIO, it may only be made available in |
559 | the sysfs interface by gpio_export(). The driver can control whether the | 564 | the sysfs interface by gpio_export(). The driver can control whether the |
560 | signal direction may change. This helps drivers prevent userspace code | 565 | signal direction may change. This helps drivers prevent userspace code |
@@ -563,3 +568,8 @@ from accidentally clobbering important system state. | |||
563 | This explicit exporting can help with debugging (by making some kinds | 568 | This explicit exporting can help with debugging (by making some kinds |
564 | of experiments easier), or can provide an always-there interface that's | 569 | of experiments easier), or can provide an always-there interface that's |
565 | suitable for documenting as part of a board support package. | 570 | suitable for documenting as part of a board support package. |
571 | |||
572 | After the GPIO has been exported, gpio_export_link() allows creating | ||
573 | symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can | ||
574 | use this to provide the interface under their own device in sysfs with | ||
575 | a descriptive name. | ||