Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
[pandora-kernel.git] / include / linux / uio_driver.h
index 44c28e9..cdf338d 100644 (file)
 #include <linux/fs.h>
 #include <linux/interrupt.h>
 
+struct uio_map;
+
 /**
  * struct uio_mem - description of a UIO memory region
- * @kobj:              kobject for this mapping
  * @addr:              address of the device's memory
  * @size:              size of IO
  * @memtype:           type of memory addr points to
  * @internal_addr:     ioremap-ped version of addr, for driver internal use
+ * @map:               for use by the UIO core only.
  */
 struct uio_mem {
-       struct kobject          kobj;
        unsigned long           addr;
        unsigned long           size;
        int                     memtype;
        void __iomem            *internal_addr;
+       struct uio_map          *map;
 };
 
-#define MAX_UIO_MAPS   5
+#define MAX_UIO_MAPS   5
 
 struct uio_device;
 
@@ -51,6 +53,7 @@ struct uio_device;
  * @mmap:              mmap operation for this uio device
  * @open:              open operation for this uio device
  * @release:           release operation for this uio device
+ * @irqcontrol:                disable/enable irqs when 0/1 is written to /dev/uioX
  */
 struct uio_info {
        struct uio_device       *uio_dev;
@@ -64,6 +67,7 @@ struct uio_info {
        int (*mmap)(struct uio_info *info, struct vm_area_struct *vma);
        int (*open)(struct uio_info *info, struct inode *inode);
        int (*release)(struct uio_info *info, struct inode *inode);
+       int (*irqcontrol)(struct uio_info *info, s32 irq_on);
 };
 
 extern int __must_check
@@ -78,11 +82,11 @@ static inline int __must_check
 extern void uio_unregister_device(struct uio_info *info);
 extern void uio_event_notify(struct uio_info *info);
 
-/* defines for uio_device->irq */
+/* defines for uio_info->irq */
 #define UIO_IRQ_CUSTOM -1
 #define UIO_IRQ_NONE   -2
 
-/* defines for uio_device->memtype */
+/* defines for uio_mem->memtype */
 #define UIO_MEM_NONE   0
 #define UIO_MEM_PHYS   1
 #define UIO_MEM_LOGICAL        2