Lines Matching defs:bfi

224  * The init function may use `bfi->dstate` to store additional state about the device.
226 * \param[in] bfi The instance of this driver.
237 static errval_t init(struct bfdriver_instance *bfi, uint64_t flags, iref_t *dev) {
238 FDIF_DEBUG("%s:%s:%d: %s\n", __FILE__, __FUNCTION__, __LINE__, bfi->driver->name);
240 bfi->dstate = malloc(sizeof(struct fdif_driver_state));
241 if (bfi->dstate == NULL) {
244 assert(bfi->dstate != NULL);
246 struct fdif_driver_state* st = (struct fdif_driver_state*)bfi->dstate;
258 err = map_device_cap(bfi->caps[3], &vbase);
264 manage_clocks(st, bfi->caps);
265 manage_power(st, bfi->caps);
340 * \param[in] bfi The instance of this driver.
343 static errval_t attach(struct bfdriver_instance* bfi) {
344 FDIF_DEBUG("%s:%s:%d: %s\n", __FILE__, __FUNCTION__, __LINE__, bfi->driver->name);
354 * \param[in] bfi The instance of this driver.
357 static errval_t detach(struct bfdriver_instance* bfi) {
358 FDIF_DEBUG("%s:%s:%d: %s\n", __FILE__, __FUNCTION__, __LINE__, bfi->driver->name);
367 * \param[in] bfi The instance of this driver.
370 static errval_t set_sleep_level(struct bfdriver_instance* bfi, uint32_t level) {
371 FDIF_DEBUG("%s:%s:%d: %s\n", __FILE__, __FUNCTION__, __LINE__, bfi->driver->name);
373 struct fdif_driver_state* uds = bfi->dstate;
382 * \param[in] bfi The instance of this driver.
385 static errval_t destroy(struct bfdriver_instance* bfi) {
386 FDIF_DEBUG("%s:%s:%d: %s\n", __FILE__, __FUNCTION__, __LINE__, bfi->driver->name);
387 struct fdif_driver_state* uds = bfi->dstate;
389 bfi->dstate = NULL;
392 bfi->device = 0x0;
397 static errval_t get_ep(struct bfdriver_instance* bfi, bool lmp, struct capref* ret_cap)