Lines Matching defs:bfi

30  * The init function may use `bfi->dstate` to store additional state about the device.
32 * \param[in] bfi The instance of this driver.
43 static errval_t init(struct bfdriver_instance *bfi, uint64_t flags, iref_t *dev) {
44 CM2_DEBUG("%s:%s:%d: %s\n", __FILE__, __FUNCTION__, __LINE__, bfi->driver->name);
46 bfi->dstate = malloc(sizeof(struct cm2_driver_state));
47 if (bfi->dstate == NULL) {
51 assert(bfi->dstate != NULL);
53 struct cm2_driver_state* st = (struct cm2_driver_state*) bfi->dstate;
54 st->cap = bfi->caps[0];
71 * \param[in] bfi The instance of this driver.
74 static errval_t attach(struct bfdriver_instance* bfi) {
75 CM2_DEBUG("%s:%s:%d: %s\n", __FILE__, __FUNCTION__, __LINE__, bfi->driver->name);
85 * \param[in] bfi The instance of this driver.
88 static errval_t detach(struct bfdriver_instance* bfi) {
89 CM2_DEBUG("%s:%s:%d: %s\n", __FILE__, __FUNCTION__, __LINE__, bfi->driver->name);
98 * \param[in] bfi The instance of this driver.
101 static errval_t set_sleep_level(struct bfdriver_instance* bfi, uint32_t level) {
102 CM2_DEBUG("%s:%s:%d: %s\n", __FILE__, __FUNCTION__, __LINE__, bfi->driver->name);
104 struct cm2_driver_state* uds = bfi->dstate;
114 * \param[in] bfi The instance of this driver.
117 static errval_t destroy(struct bfdriver_instance* bfi) {
118 CM2_DEBUG("%s:%s:%d: %s\n", __FILE__, __FUNCTION__, __LINE__, bfi->driver->name);
119 struct cm2_driver_state* uds = bfi->dstate;
121 bfi->dstate = NULL;
124 bfi->device = 0x0;
129 static errval_t get_ep(struct bfdriver_instance* bfi, bool lmp, struct capref* ret_cap)