Changeset a1b7e80 in mainline for uspace/lib/drv/include/ddf/driver.h
- Timestamp:
- 2011-09-02T16:54:18Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f480d7e
- Parents:
- 7a72ce1a (diff), 224c0e7 (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
r7a72ce1a ra1b7e80 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 /** Ask driver to online a specific function */ 142 int (*fun_online)(ddf_fun_t *); 143 /** Ask driver to offline a specific function */ 144 int (*fun_offline)(ddf_fun_t *); 136 145 } driver_ops_t; 137 146 … … 146 155 extern int ddf_driver_main(driver_t *); 147 156 157 extern void *ddf_dev_data_alloc(ddf_dev_t *, size_t); 148 158 extern ddf_fun_t *ddf_fun_create(ddf_dev_t *, fun_type_t, const char *); 149 159 extern void ddf_fun_destroy(ddf_fun_t *); 160 extern void *ddf_fun_data_alloc(ddf_fun_t *, size_t); 150 161 extern int ddf_fun_bind(ddf_fun_t *); 151 162 extern int ddf_fun_unbind(ddf_fun_t *); 163 extern int ddf_fun_online(ddf_fun_t *); 164 extern int ddf_fun_offline(ddf_fun_t *); 152 165 extern int ddf_fun_add_match_id(ddf_fun_t *, const char *, int); 153 166
Note:
See TracChangeset
for help on using the changeset viewer.