diff options
Diffstat (limited to 'include/linux/uio_driver.h')
-rw-r--r-- | include/linux/uio_driver.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index cdf338d94b7f..a0bb6bd2e5c1 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
@@ -38,6 +38,24 @@ struct uio_mem { | |||
38 | 38 | ||
39 | #define MAX_UIO_MAPS 5 | 39 | #define MAX_UIO_MAPS 5 |
40 | 40 | ||
41 | struct uio_portio; | ||
42 | |||
43 | /** | ||
44 | * struct uio_port - description of a UIO port region | ||
45 | * @start: start of port region | ||
46 | * @size: size of port region | ||
47 | * @porttype: type of port (see UIO_PORT_* below) | ||
48 | * @portio: for use by the UIO core only. | ||
49 | */ | ||
50 | struct uio_port { | ||
51 | unsigned long start; | ||
52 | unsigned long size; | ||
53 | int porttype; | ||
54 | struct uio_portio *portio; | ||
55 | }; | ||
56 | |||
57 | #define MAX_UIO_PORT_REGIONS 5 | ||
58 | |||
41 | struct uio_device; | 59 | struct uio_device; |
42 | 60 | ||
43 | /** | 61 | /** |
@@ -46,6 +64,7 @@ struct uio_device; | |||
46 | * @name: device name | 64 | * @name: device name |
47 | * @version: device driver version | 65 | * @version: device driver version |
48 | * @mem: list of mappable memory regions, size==0 for end of list | 66 | * @mem: list of mappable memory regions, size==0 for end of list |
67 | * @port: list of port regions, size==0 for end of list | ||
49 | * @irq: interrupt number or UIO_IRQ_CUSTOM | 68 | * @irq: interrupt number or UIO_IRQ_CUSTOM |
50 | * @irq_flags: flags for request_irq() | 69 | * @irq_flags: flags for request_irq() |
51 | * @priv: optional private data | 70 | * @priv: optional private data |
@@ -57,9 +76,10 @@ struct uio_device; | |||
57 | */ | 76 | */ |
58 | struct uio_info { | 77 | struct uio_info { |
59 | struct uio_device *uio_dev; | 78 | struct uio_device *uio_dev; |
60 | char *name; | 79 | const char *name; |
61 | char *version; | 80 | const char *version; |
62 | struct uio_mem mem[MAX_UIO_MAPS]; | 81 | struct uio_mem mem[MAX_UIO_MAPS]; |
82 | struct uio_port port[MAX_UIO_PORT_REGIONS]; | ||
63 | long irq; | 83 | long irq; |
64 | unsigned long irq_flags; | 84 | unsigned long irq_flags; |
65 | void *priv; | 85 | void *priv; |
@@ -92,4 +112,10 @@ extern void uio_event_notify(struct uio_info *info); | |||
92 | #define UIO_MEM_LOGICAL 2 | 112 | #define UIO_MEM_LOGICAL 2 |
93 | #define UIO_MEM_VIRTUAL 3 | 113 | #define UIO_MEM_VIRTUAL 3 |
94 | 114 | ||
115 | /* defines for uio_port->porttype */ | ||
116 | #define UIO_PORT_NONE 0 | ||
117 | #define UIO_PORT_X86 1 | ||
118 | #define UIO_PORT_GPIO 2 | ||
119 | #define UIO_PORT_OTHER 3 | ||
120 | |||
95 | #endif /* _LINUX_UIO_DRIVER_H_ */ | 121 | #endif /* _LINUX_UIO_DRIVER_H_ */ |