Changes in uspace/lib/drv/include/ddf/driver.h [79ae36dd:80a96d2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/include/ddf/driver.h
r79ae36dd r80a96d2 81 81 */ 82 82 devman_handle_t handle; 83 /** Reference count */ 84 atomic_t refcnt; 83 85 84 86 /** … … 104 106 /** Function indentifier (asigned by device manager) */ 105 107 devman_handle_t handle; 108 /** Reference count */ 109 atomic_t refcnt; 106 110 107 111 /** Device which this function belogs to */ … … 118 122 /** Implementation of operations provided by this function */ 119 123 ddf_dev_ops_t *ops; 124 /** Connection handler or @c NULL to use the DDF default handler. */ 125 async_client_conn_t conn_handler; 120 126 121 127 /** Link in the list of functions handled by the driver */ … … 130 136 typedef struct driver_ops { 131 137 /** Callback method for passing a new device to the device driver */ 132 int (*add_device)(ddf_dev_t *dev); 133 /* TODO: add other generic driver operations */ 138 int (*add_device)(ddf_dev_t *); 139 /** Ask driver to remove a device */ 140 int (*dev_remove)(ddf_dev_t *); 141 /** Inform driver a device disappeared */ 142 int (*dev_gone)(ddf_dev_t *); 143 /** Ask driver to online a specific function */ 144 int (*fun_online)(ddf_fun_t *); 145 /** Ask driver to offline a specific function */ 146 int (*fun_offline)(ddf_fun_t *); 134 147 } driver_ops_t; 135 148 … … 144 157 extern int ddf_driver_main(driver_t *); 145 158 159 extern void *ddf_dev_data_alloc(ddf_dev_t *, size_t); 146 160 extern ddf_fun_t *ddf_fun_create(ddf_dev_t *, fun_type_t, const char *); 147 161 extern void ddf_fun_destroy(ddf_fun_t *); 162 extern void *ddf_fun_data_alloc(ddf_fun_t *, size_t); 148 163 extern int ddf_fun_bind(ddf_fun_t *); 164 extern int ddf_fun_unbind(ddf_fun_t *); 165 extern int ddf_fun_online(ddf_fun_t *); 166 extern int ddf_fun_offline(ddf_fun_t *); 149 167 extern int ddf_fun_add_match_id(ddf_fun_t *, const char *, int); 150 168 151 extern int ddf_fun_add_to_c lass(ddf_fun_t *, const char *);169 extern int ddf_fun_add_to_category(ddf_fun_t *, const char *); 152 170 153 171 #endif
Note:
See TracChangeset
for help on using the changeset viewer.