aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/gpio.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/gpio.txt')
-rw-r--r--Documentation/gpio.txt10
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
558After a kernel driver requests a GPIO, it may only be made available in 563After a kernel driver requests a GPIO, it may only be made available in
559the sysfs interface by gpio_export(). The driver can control whether the 564the sysfs interface by gpio_export(). The driver can control whether the
560signal direction may change. This helps drivers prevent userspace code 565signal direction may change. This helps drivers prevent userspace code
@@ -563,3 +568,8 @@ from accidentally clobbering important system state.
563This explicit exporting can help with debugging (by making some kinds 568This explicit exporting can help with debugging (by making some kinds
564of experiments easier), or can provide an always-there interface that's 569of experiments easier), or can provide an always-there interface that's
565suitable for documenting as part of a board support package. 570suitable for documenting as part of a board support package.
571
572After the GPIO has been exported, gpio_export_link() allows creating
573symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can
574use this to provide the interface under their own device in sysfs with
575a descriptive name.