aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/uio_driver.h
diff options
context:
space:
mode:
authorHans J. Koch <hjk@linutronix.de>2009-01-06 18:15:39 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-24 19:38:24 -0400
commit8205779114e8f612549d191f8e151526a74ab9f2 (patch)
treefd26913320500193bd4078da0c164f9407aed47b /include/linux/uio_driver.h
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 'include/linux/uio_driver.h')
-rw-r--r--include/linux/uio_driver.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h
index a0bb6bd2e5c1..5dcc9ff72f69 100644
--- a/include/linux/uio_driver.h
+++ b/include/linux/uio_driver.h
@@ -22,6 +22,7 @@ struct uio_map;
22 22
23/** 23/**
24 * struct uio_mem - description of a UIO memory region 24 * struct uio_mem - description of a UIO memory region
25 * @name: name of the memory region for identification
25 * @addr: address of the device's memory 26 * @addr: address of the device's memory
26 * @size: size of IO 27 * @size: size of IO
27 * @memtype: type of memory addr points to 28 * @memtype: type of memory addr points to
@@ -29,6 +30,7 @@ struct uio_map;
29 * @map: for use by the UIO core only. 30 * @map: for use by the UIO core only.
30 */ 31 */
31struct uio_mem { 32struct uio_mem {
33 const char *name;
32 unsigned long addr; 34 unsigned long addr;
33 unsigned long size; 35 unsigned long size;
34 int memtype; 36 int memtype;
@@ -42,12 +44,14 @@ struct uio_portio;
42 44
43/** 45/**
44 * struct uio_port - description of a UIO port region 46 * struct uio_port - description of a UIO port region
47 * @name: name of the port region for identification
45 * @start: start of port region 48 * @start: start of port region
46 * @size: size of port region 49 * @size: size of port region
47 * @porttype: type of port (see UIO_PORT_* below) 50 * @porttype: type of port (see UIO_PORT_* below)
48 * @portio: for use by the UIO core only. 51 * @portio: for use by the UIO core only.
49 */ 52 */
50struct uio_port { 53struct uio_port {
54 const char *name;
51 unsigned long start; 55 unsigned long start;
52 unsigned long size; 56 unsigned long size;
53 int porttype; 57 int porttype;