summaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/uio-howto.tmpl
diff options
context:
space:
mode:
authorHans J. Koch <hjk@linutronix.de>2009-01-07 00:15:39 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-24 16:38:24 -0700
commit8205779114e8f612549d191f8e151526a74ab9f2 (patch)
treefd26913320500193bd4078da0c164f9407aed47b /Documentation/DocBook/uio-howto.tmpl
parent57fee4a58fe802272742caae248872c392a60670 (diff)
UIO: Add name attributes for mappings and port regions
If a UIO device has several memory mappings, it can be difficult for userspace to find the right one. The situation becomes even worse if the UIO driver can handle different versions of a card that have different numbers of mappings. Benedikt Spranger has such cards and pointed this out to me. Thanks, Bene! To address this problem, this patch adds "name" sysfs attributes for each mapping. Userspace can use these to clearly identify each mapping. The name string is optional. If a driver doesn't set it, an empty string will be returned, so this patch won't break existing drivers. The same problem exists for port region information, so a "name" attribute is added there, too. Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/DocBook/uio-howto.tmpl')
-rw-r--r--Documentation/DocBook/uio-howto.tmpl29
1 files changed, 25 insertions, 4 deletions
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index 52e1b79ce0e..8f6e3b2403c 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -42,6 +42,13 @@ GPL version 2.
<revhistory>
<revision>
+ <revnumber>0.8</revnumber>
+ <date>2008-12-24</date>
+ <authorinitials>hjk</authorinitials>
+ <revremark>Added name attributes in mem and portio sysfs directories.
+ </revremark>
+ </revision>
+ <revision>
<revnumber>0.7</revnumber>
<date>2008-12-23</date>
<authorinitials>hjk</authorinitials>
@@ -303,12 +310,19 @@ interested in translating it, please email me
appear if the size of the mapping is not 0.
</para>
<para>
- Each <filename>mapX/</filename> directory contains two read-only files
- that show start address and size of the memory:
+ Each <filename>mapX/</filename> directory contains four read-only files
+ that show attributes of the memory:
</para>
<itemizedlist>
<listitem>
<para>
+ <filename>name</filename>: A string identifier for this mapping. This
+ is optional, the string can be empty. Drivers can set this to make it
+ easier for userspace to find the correct mapping.
+ </para>
+</listitem>
+<listitem>
+ <para>
<filename>addr</filename>: The address of memory that can be mapped.
</para>
</listitem>
@@ -366,12 +380,19 @@ offset = N * getpagesize();
<filename>/sys/class/uio/uioX/portio/</filename>.
</para>
<para>
- Each <filename>portX/</filename> directory contains three read-only
- files that show start, size, and type of the port region:
+ Each <filename>portX/</filename> directory contains four read-only
+ files that show name, start, size, and type of the port region:
</para>
<itemizedlist>
<listitem>
<para>
+ <filename>name</filename>: A string identifier for this port region.
+ The string is optional and can be empty. Drivers can set it to make it
+ easier for userspace to find a certain port region.
+ </para>
+</listitem>
+<listitem>
+ <para>
<filename>start</filename>: The first port of this region.
</para>
</listitem>