Changeset 925a21e in mainline for uspace/lib/drv/include/ddf/driver.h
- Timestamp:
- 2011-09-24T14:20:29Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5bf76c1
- Parents:
- 867e2555 (diff), 1ab4aca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/include/ddf/driver.h
r867e2555 r925a21e 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 */ … … 132 136 typedef struct driver_ops { 133 137 /** Callback method for passing a new device to the device driver */ 134 int (*add_device)(ddf_dev_t *dev); 135 /* 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 *); 136 147 } driver_ops_t; 137 148 … … 146 157 extern int ddf_driver_main(driver_t *); 147 158 159 extern void *ddf_dev_data_alloc(ddf_dev_t *, size_t); 148 160 extern ddf_fun_t *ddf_fun_create(ddf_dev_t *, fun_type_t, const char *); 149 161 extern void ddf_fun_destroy(ddf_fun_t *); 162 extern void *ddf_fun_data_alloc(ddf_fun_t *, size_t); 150 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 *); 151 167 extern int ddf_fun_add_match_id(ddf_fun_t *, const char *, int); 152 168 153 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 *); 154 170 155 171 #endif
Note:
See TracChangeset
for help on using the changeset viewer.