Xenomai API  2.6.5
driver.h
Go to the documentation of this file.
1 
23 #ifndef __ANALOGY_DRIVER__
24 #define __ANALOGY_DRIVER__
25 
26 #ifdef __KERNEL__
27 
28 #include <linux/list.h>
29 
30 struct a4l_link_desc;
31 struct a4l_device;
32 
37 /* Analogy driver descriptor */
38 struct a4l_driver {
39 
40  /* List stuff */
41  struct list_head list;
44  /* Visible description stuff */
45  struct module *owner;
47  unsigned int flags;
49  char *board_name;
54  /* Init/destroy procedures */
55  int (*attach) (struct a4l_device *, struct a4l_link_desc *);
57  int (*detach) (struct a4l_device *);
60 };
61 typedef struct a4l_driver a4l_drv_t;
62 
63 #ifndef DOXYGEN_CPP
64 
65 /* Driver list related functions */
66 
67 int a4l_register_drv(a4l_drv_t * drv);
68 int a4l_unregister_drv(a4l_drv_t * drv);
69 int a4l_lct_drv(char *pin, a4l_drv_t ** pio);
70 #ifdef CONFIG_PROC_FS
71 int a4l_rdproc_drvs(struct seq_file *p, void *data);
72 #endif /* CONFIG_PROC_FS */
73 
74 #endif /* !DOXYGEN_CPP */
75 
76 #endif /* __KERNEL__ */
77 
78 #endif /* __ANALOGY_DRIVER__ */
char * board_name
Board name.
Definition: driver.h:49
unsigned int flags
Type / status driver's flags.
Definition: driver.h:47
int a4l_register_drv(a4l_drv_t *drv)
Register an Analogy driver.
struct list_head list
List stuff.
Definition: driver.h:41
int a4l_unregister_drv(a4l_drv_t *drv)
Unregister an Analogy driver.
int privdata_size
Size of the driver's private data.
Definition: driver.h:51
int(* attach)(struct a4l_device *, struct a4l_link_desc *)
Attach procedure.
Definition: driver.h:55
struct module * owner
Pointer to module containing the code.
Definition: driver.h:45
Structure containing driver declaration data.
Definition: driver.h:38
int(* detach)(struct a4l_device *)
Detach procedure.
Definition: driver.h:57