Changeset b0f00a9 in mainline for uspace/lib/drv/include
- Timestamp:
- 2011-11-06T22:21:05Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 898e847
- Parents:
- 2bdf8313 (diff), 7b5f4c9 (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. - Location:
- uspace/lib/drv/include
- Files:
-
- 9 added
- 3 edited
- 1 moved
-
ddf/driver.h (modified) (6 diffs)
-
ddf/interrupt.h (modified) (2 diffs)
-
ddf/log.h (modified) (1 diff)
-
ops/nic.h (added)
-
pci_dev_iface.h (added)
-
remote_nic.h (moved) (moved from uspace/srv/hid/fb/sgcn.h ) (2 diffs)
-
remote_pci.h (added)
-
remote_usb.h (added)
-
remote_usbhc.h (added)
-
remote_usbhid.h (added)
-
usb_iface.h (added)
-
usbhc_iface.h (added)
-
usbhid_iface.h (added)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/include/ddf/driver.h
r2bdf8313 rb0f00a9 37 37 #define DDF_DRIVER_H_ 38 38 39 #include <async.h> 39 40 #include <ipc/devman.h> 40 41 #include <ipc/dev_iface.h> 41 42 42 #include "../dev_iface.h" 43 43 … … 81 81 */ 82 82 devman_handle_t handle; 83 /** Reference count */ 84 atomic_t refcnt; 83 85 84 86 /** 85 * Phoneto the parent device driver (if it is different from this87 * Session to the parent device driver (if it is different from this 86 88 * driver) 87 89 */ 88 int parent_phone;90 async_sess_t *parent_sess; 89 91 90 92 /** Device name */ … … 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 /** 140 * Notification that the device was succesfully added. 141 * The driver can do any blocking operation without 142 * blocking the device manager. 143 */ 144 void (*device_added)(ddf_dev_t *dev); 145 /** Ask driver to remove a device */ 146 int (*dev_remove)(ddf_dev_t *); 147 /** Inform driver a device disappeared */ 148 int (*dev_gone)(ddf_dev_t *); 149 /** Ask driver to online a specific function */ 150 int (*fun_online)(ddf_fun_t *); 151 /** Ask driver to offline a specific function */ 152 int (*fun_offline)(ddf_fun_t *); 134 153 } driver_ops_t; 135 154 … … 144 163 extern int ddf_driver_main(driver_t *); 145 164 165 extern void *ddf_dev_data_alloc(ddf_dev_t *, size_t); 146 166 extern ddf_fun_t *ddf_fun_create(ddf_dev_t *, fun_type_t, const char *); 147 167 extern void ddf_fun_destroy(ddf_fun_t *); 168 extern void *ddf_fun_data_alloc(ddf_fun_t *, size_t); 148 169 extern int ddf_fun_bind(ddf_fun_t *); 170 extern int ddf_fun_unbind(ddf_fun_t *); 171 extern int ddf_fun_online(ddf_fun_t *); 172 extern int ddf_fun_offline(ddf_fun_t *); 149 173 extern int ddf_fun_add_match_id(ddf_fun_t *, const char *, int); 150 174 151 extern int ddf_fun_add_to_c lass(ddf_fun_t *, const char *);175 extern int ddf_fun_add_to_category(ddf_fun_t *, const char *); 152 176 153 177 #endif -
uspace/lib/drv/include/ddf/interrupt.h
r2bdf8313 rb0f00a9 36 36 #define DDF_INTERRUPT_H_ 37 37 38 #include < kernel/ddi/irq.h>38 #include <abi/ddi/irq.h> 39 39 #include <adt/list.h> 40 40 #include <ddi.h> … … 60 60 typedef struct interrupt_context_list { 61 61 int curr_id; 62 li nk_t contexts;62 list_t contexts; 63 63 fibril_mutex_t mutex; 64 64 } interrupt_context_list_t; -
uspace/lib/drv/include/ddf/log.h
r2bdf8313 rb0f00a9 39 39 extern void ddf_msg(log_level_t, const char *, ...); 40 40 41 extern void ddf_dump_buffer(char *, size_t, const void *, size_t, size_t, 42 size_t); 43 41 44 #endif 42 45 -
uspace/lib/drv/include/remote_nic.h
r2bdf8313 rb0f00a9 1 1 /* 2 * Copyright (c) 20 08 Pavel Rimsky2 * Copyright (c) 2011 Radim Vansa 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @defgroup sgcnfb SGCN 30 * @brief userland driver of the Serengeti console output 29 /** @addtogroup libdrv 31 30 * @{ 32 31 */ 33 34 32 /** @file 35 33 */ 36 34 37 #ifndef FB_SGCN_H_38 #define FB_SGCN_H_35 #ifndef LIBDRV_REMOTE_NIC_H_ 36 #define LIBDRV_REMOTE_NIC_H_ 39 37 40 int sgcn_init(void);38 extern remote_iface_t remote_nic_iface; 41 39 42 40 #endif 43 41 44 /** 42 /** 45 43 * @} 46 44 */
Note:
See TracChangeset
for help on using the changeset viewer.
