Index: uspace/lib/usb/include/usb/ddfiface.h
===================================================================
--- uspace/lib/usb/include/usb/ddfiface.h	(revision 0f21c0c8a600adbbfbe315431bff13a9695a1692)
+++ uspace/lib/usb/include/usb/ddfiface.h	(revision eb1a2f485e907e821965b3aafca2d8a5355f3518)
@@ -40,15 +40,15 @@
 #include <usb_iface.h>
 
-int usb_iface_get_hc_handle_hub_impl(device_t *, devman_handle_t *);
-int usb_iface_get_address_hub_impl(device_t *, devman_handle_t,
+int usb_iface_get_hc_handle_hub_impl(ddf_fun_t *, devman_handle_t *);
+int usb_iface_get_address_hub_impl(ddf_fun_t *, devman_handle_t,
     usb_address_t *);
 extern usb_iface_t usb_iface_hub_impl;
 
-int usb_iface_get_hc_handle_hub_child_impl(device_t *, devman_handle_t *);
-int usb_iface_get_address_hub_child_impl(device_t *, devman_handle_t,
+int usb_iface_get_hc_handle_hub_child_impl(ddf_fun_t *, devman_handle_t *);
+int usb_iface_get_address_hub_child_impl(ddf_fun_t *, devman_handle_t,
     usb_address_t *);
 extern usb_iface_t usb_iface_hub_child_impl;
 
-int usb_iface_get_hc_handle_hc_impl(device_t *, devman_handle_t *);
+int usb_iface_get_hc_handle_hc_impl(ddf_fun_t *, devman_handle_t *);
 
 
Index: uspace/lib/usb/include/usb/hub.h
===================================================================
--- uspace/lib/usb/include/usb/hub.h	(revision 0f21c0c8a600adbbfbe315431bff13a9695a1692)
+++ uspace/lib/usb/include/usb/hub.h	(revision eb1a2f485e907e821965b3aafca2d8a5355f3518)
@@ -39,6 +39,8 @@
 #include <usb/usbdevice.h>
 
-int usb_hc_new_device_wrapper(device_t *, usb_hc_connection_t *, usb_speed_t,
-    int (*)(int, void *), int, void *, usb_address_t *, devman_handle_t *);
+int usb_hc_new_device_wrapper(ddf_dev_t *, usb_hc_connection_t *, usb_speed_t,
+    int (*)(int, void *), int, void *,
+    usb_address_t *, devman_handle_t *,
+    ddf_dev_ops_t *, void *, ddf_fun_t **);
 
 /** Info about device attached to host controller.
Index: uspace/lib/usb/include/usb/pipes.h
===================================================================
--- uspace/lib/usb/include/usb/pipes.h	(revision 0f21c0c8a600adbbfbe315431bff13a9695a1692)
+++ uspace/lib/usb/include/usb/pipes.h	(revision eb1a2f485e907e821965b3aafca2d8a5355f3518)
@@ -41,5 +41,5 @@
 #include <usb/descriptor.h>
 #include <ipc/devman.h>
-#include <driver.h>
+#include <ddf/driver.h>
 
 /**
@@ -120,9 +120,9 @@
     usb_device_connection_t *, usb_hc_connection_t *);
 int usb_device_connection_initialize_from_device(usb_device_connection_t *,
-    device_t *);
+    ddf_dev_t *);
 int usb_device_connection_initialize(usb_device_connection_t *,
     devman_handle_t, usb_address_t);
 
-int usb_device_get_assigned_interface(device_t *);
+int usb_device_get_assigned_interface(ddf_dev_t *);
 
 int usb_endpoint_pipe_initialize(usb_endpoint_pipe_t *,
Index: uspace/lib/usb/include/usb/recognise.h
===================================================================
--- uspace/lib/usb/include/usb/recognise.h	(revision 0f21c0c8a600adbbfbe315431bff13a9695a1692)
+++ uspace/lib/usb/include/usb/recognise.h	(revision eb1a2f485e907e821965b3aafca2d8a5355f3518)
@@ -50,6 +50,6 @@
 int usb_device_create_match_ids(usb_endpoint_pipe_t *, match_id_list_t *);
 
-int usb_device_register_child_in_devman(usb_address_t address, devman_handle_t hc_handle,
-    device_t *parent, devman_handle_t *child_handle);
+int usb_device_register_child_in_devman(usb_address_t, devman_handle_t,
+    ddf_dev_t *, devman_handle_t *, ddf_dev_ops_t *, void *, ddf_fun_t **);
 
 #endif
Index: uspace/lib/usb/include/usb/usbdevice.h
===================================================================
--- uspace/lib/usb/include/usb/usbdevice.h	(revision 0f21c0c8a600adbbfbe315431bff13a9695a1692)
+++ uspace/lib/usb/include/usb/usbdevice.h	(revision eb1a2f485e907e821965b3aafca2d8a5355f3518)
@@ -38,5 +38,5 @@
 #include <sys/types.h>
 #include <ipc/devman.h>
-#include <driver.h>
+#include <ddf/driver.h>
 #include <bool.h>
 #include <usb/usb.h>
@@ -53,5 +53,5 @@
 
 int usb_hc_connection_initialize_from_device(usb_hc_connection_t *,
-    device_t *);
+    ddf_dev_t *);
 int usb_hc_connection_initialize(usb_hc_connection_t *, devman_handle_t);
 
Index: uspace/lib/usb/src/ddfiface.c
===================================================================
--- uspace/lib/usb/src/ddfiface.c	(revision 0f21c0c8a600adbbfbe315431bff13a9695a1692)
+++ uspace/lib/usb/src/ddfiface.c	(revision eb1a2f485e907e821965b3aafca2d8a5355f3518)
@@ -34,6 +34,10 @@
  */
 #include <ipc/devman.h>
+#include <devman.h>
+#include <async.h>
 #include <usb/ddfiface.h>
+#include <usb/debug.h>
 #include <errno.h>
+#include <assert.h>
 
 /** DDF interface for USB device, implementation for typical hub. */
@@ -56,8 +60,8 @@
  * @return Error code.
  */
-int usb_iface_get_hc_handle_hub_impl(device_t *device, devman_handle_t *handle)
+int usb_iface_get_hc_handle_hub_impl(ddf_fun_t *fun, devman_handle_t *handle)
 {
-	assert(device);
-	return usb_hc_find(device->handle, handle);
+	assert(fun);
+	return usb_hc_find(fun->handle, handle);
 }
 
@@ -69,24 +73,26 @@
  * @return Error code.
  */
-int usb_iface_get_hc_handle_hub_child_impl(device_t *device,
+int usb_iface_get_hc_handle_hub_child_impl(ddf_fun_t *fun,
     devman_handle_t *handle)
 {
-	assert(device);
-	device_t *parent = device->parent;
+	assert(fun != NULL);
 
-	/* Default error, device does not support this operation. */
-	int rc = ENOTSUP;
-
-	if (parent && parent->ops && parent->ops->interfaces[USB_DEV_IFACE]) {
-		usb_iface_t *usb_iface
-		    = (usb_iface_t *) parent->ops->interfaces[USB_DEV_IFACE];
-		assert(usb_iface != NULL);
-
-		if (usb_iface->get_hc_handle) {
-			rc = usb_iface->get_hc_handle(parent, handle);
-		}
+	int parent_phone = devman_parent_device_connect(fun->handle,
+	    IPC_FLAG_BLOCKING);
+	if (parent_phone < 0) {
+		return parent_phone;
 	}
 
-	return rc;
+	sysarg_t hc_handle;
+	int rc = async_req_1_1(parent_phone, DEV_IFACE_ID(USB_DEV_IFACE),
+	    IPC_M_USB_GET_HOST_CONTROLLER_HANDLE, &hc_handle);
+
+	if (rc != EOK) {
+		return rc;
+	}
+
+	*handle = hc_handle;
+
+	return EOK;
 }
 
@@ -97,10 +103,10 @@
  * @return Always EOK.
  */
-int usb_iface_get_hc_handle_hc_impl(device_t *device, devman_handle_t *handle)
+int usb_iface_get_hc_handle_hc_impl(ddf_fun_t *fun, devman_handle_t *handle)
 {
-	assert(device);
+	assert(fun);
 
 	if (handle != NULL) {
-		*handle = device->handle;
+		*handle = fun->handle;
 	}
 
@@ -115,9 +121,9 @@
  * @return Error code.
  */
-int usb_iface_get_address_hub_impl(device_t *device, devman_handle_t handle,
+int usb_iface_get_address_hub_impl(ddf_fun_t *fun, devman_handle_t handle,
     usb_address_t *address)
 {
-	assert(device);
-	int parent_phone = devman_parent_device_connect(device->handle,
+	assert(fun);
+	int parent_phone = devman_parent_device_connect(fun->handle,
 	    IPC_FLAG_BLOCKING);
 	if (parent_phone < 0) {
@@ -150,24 +156,11 @@
  * @return Error code.
  */
-int usb_iface_get_address_hub_child_impl(device_t *device,
+int usb_iface_get_address_hub_child_impl(ddf_fun_t *fun,
     devman_handle_t handle, usb_address_t *address)
 {
-	assert(device);
-	device_t *parent = device->parent;
-
-	/* Default error, device does not support this operation. */
-	int rc = ENOTSUP;
-
-	if (parent && parent->ops && parent->ops->interfaces[USB_DEV_IFACE]) {
-		usb_iface_t *usb_iface
-		    = (usb_iface_t *) parent->ops->interfaces[USB_DEV_IFACE];
-		assert(usb_iface != NULL);
-
-		if (usb_iface->get_address) {
-			rc = usb_iface->get_address(parent, handle, address);
-		}
+	if (handle == 0) {
+		handle = fun->handle;
 	}
-
-	return rc;
+	return usb_iface_get_address_hub_impl(fun, handle, address);
 }
 
Index: uspace/lib/usb/src/hub.c
===================================================================
--- uspace/lib/usb/src/hub.c	(revision 0f21c0c8a600adbbfbe315431bff13a9695a1692)
+++ uspace/lib/usb/src/hub.c	(revision eb1a2f485e907e821965b3aafca2d8a5355f3518)
@@ -39,4 +39,5 @@
 #include <usbhc_iface.h>
 #include <errno.h>
+#include <assert.h>
 
 /** Check that HC connection is alright.
@@ -172,8 +173,9 @@
  *	request or requests for descriptors when creating match ids).
  */
-int usb_hc_new_device_wrapper(device_t *parent, usb_hc_connection_t *connection,
+int usb_hc_new_device_wrapper(ddf_dev_t *parent, usb_hc_connection_t *connection,
     usb_speed_t dev_speed,
     int (*enable_port)(int port_no, void *arg), int port_no, void *arg,
-    usb_address_t *assigned_address, devman_handle_t *assigned_handle)
+    usb_address_t *assigned_address, devman_handle_t *assigned_handle,
+    ddf_dev_ops_t *dev_ops, void *new_dev_data, ddf_fun_t **new_fun)
 {
 	CHECK_CONNECTION(connection);
@@ -251,5 +253,6 @@
 	devman_handle_t child_handle;
 	rc = usb_device_register_child_in_devman(dev_addr, dev_conn.hc_handle,
-	    parent, &child_handle);
+	    parent, &child_handle,
+	    dev_ops, new_dev_data, new_fun);
 	if (rc != EOK) {
 		rc = ESTALL;
Index: uspace/lib/usb/src/pipes.c
===================================================================
--- uspace/lib/usb/src/pipes.c	(revision 0f21c0c8a600adbbfbe315431bff13a9695a1692)
+++ uspace/lib/usb/src/pipes.c	(revision eb1a2f485e907e821965b3aafca2d8a5355f3518)
@@ -35,6 +35,8 @@
 #include <usb/usb.h>
 #include <usb/pipes.h>
+#include <usb/debug.h>
 #include <usbhc_iface.h>
 #include <usb_iface.h>
+#include <devman.h>
 #include <errno.h>
 #include <assert.h>
@@ -46,10 +48,17 @@
  * @return USB address or error code.
  */
-static usb_address_t get_my_address(int phone, device_t *dev)
+static usb_address_t get_my_address(int phone, ddf_dev_t *dev)
 {
 	sysarg_t address;
+
+
+	/*
+	 * We are sending special value as a handle - zero - to get
+	 * handle of the parent function (that handle was used
+	 * when registering our device @p dev.
+	 */
 	int rc = async_req_2_1(phone, DEV_IFACE_ID(USB_DEV_IFACE),
 	    IPC_M_USB_GET_ADDRESS,
-	    dev->handle, &address);
+	    0, &address);
 
 	if (rc != EOK) {
@@ -65,5 +74,5 @@
  * @return Interface number (negative code means any).
  */
-int usb_device_get_assigned_interface(device_t *device)
+int usb_device_get_assigned_interface(ddf_dev_t *device)
 {
 	int parent_phone = devman_parent_device_connect(device->handle,
@@ -94,8 +103,8 @@
  */
 int usb_device_connection_initialize_from_device(
-    usb_device_connection_t *connection, device_t *device)
+    usb_device_connection_t *connection, ddf_dev_t *dev)
 {
 	assert(connection);
-	assert(device);
+	assert(dev);
 
 	int rc;
@@ -103,10 +112,10 @@
 	usb_address_t my_address;
 
-	rc = usb_hc_find(device->handle, &hc_handle);
+	rc = usb_hc_find(dev->handle, &hc_handle);
 	if (rc != EOK) {
 		return rc;
 	}
 
-	int parent_phone = devman_parent_device_connect(device->handle,
+	int parent_phone = devman_parent_device_connect(dev->handle,
 	    IPC_FLAG_BLOCKING);
 	if (parent_phone < 0) {
@@ -114,5 +123,5 @@
 	}
 
-	my_address = get_my_address(parent_phone, device);
+	my_address = get_my_address(parent_phone, dev);
 	if (my_address < 0) {
 		rc = my_address;
Index: uspace/lib/usb/src/recognise.c
===================================================================
--- uspace/lib/usb/src/recognise.c	(revision 0f21c0c8a600adbbfbe315431bff13a9695a1692)
+++ uspace/lib/usb/src/recognise.c	(revision eb1a2f485e907e821965b3aafca2d8a5355f3518)
@@ -34,4 +34,5 @@
  */
 #include <sys/types.h>
+#include <fibril_synch.h>
 #include <usb/pipes.h>
 #include <usb/recognise.h>
@@ -41,9 +42,10 @@
 #include <stdio.h>
 #include <errno.h>
+#include <assert.h>
 
 static size_t device_name_index = 0;
 static FIBRIL_MUTEX_INITIALIZE(device_name_index_mutex);
 
-device_ops_t child_ops = {
+ddf_dev_ops_t child_ops = {
 	.interfaces[USB_DEV_IFACE] = &usb_iface_hub_child_impl
 };
@@ -326,5 +328,6 @@
 int usb_device_register_child_in_devman(usb_address_t address,
     devman_handle_t hc_handle,
-    device_t *parent, devman_handle_t *child_handle)
+    ddf_dev_t *parent, devman_handle_t *child_handle,
+    ddf_dev_ops_t *dev_ops, void *dev_data, ddf_fun_t **child_fun)
 {
 	size_t this_device_name_index;
@@ -335,5 +338,5 @@
 	fibril_mutex_unlock(&device_name_index_mutex);
 
-	device_t *child = NULL;
+	ddf_fun_t *child = NULL;
 	char *child_name = NULL;
 	int rc;
@@ -352,5 +355,14 @@
 	}
 
-	child = create_device();
+	/*
+	 * TODO: Once the device driver framework support persistent
+	 * naming etc., something more descriptive could be created.
+	 */
+	rc = asprintf(&child_name, "usbdev%02zu", this_device_name_index);
+	if (rc < 0) {
+		goto failure;
+	}
+
+	child = ddf_fun_create(parent, fun_inner, child_name);
 	if (child == NULL) {
 		rc = ENOMEM;
@@ -358,15 +370,11 @@
 	}
 
-	/*
-	 * TODO: Once the device driver framework support persistent
-	 * naming etc., something more descriptive could be created.
-	 */
-	rc = asprintf(&child_name, "usbdev%02zu", this_device_name_index);
-	if (rc < 0) {
-		goto failure;
-	}
-	child->parent = parent;
-	child->name = child_name;
-	child->ops = &child_ops;
+	if (dev_ops != NULL) {
+		child->ops = dev_ops;
+	} else {
+		child->ops = &child_ops;
+	}
+
+	child->driver_data = dev_data;
 
 	rc = usb_endpoint_pipe_start_session(&ctrl_pipe);
@@ -385,5 +393,5 @@
 	}
 
-	rc = child_device_register(child, parent);
+	rc = ddf_fun_bind(child);
 	if (rc != EOK) {
 		goto failure;
@@ -392,4 +400,8 @@
 	if (child_handle != NULL) {
 		*child_handle = child->handle;
+	}
+
+	if (child_fun != NULL) {
+		*child_fun = child;
 	}
 
@@ -400,5 +412,5 @@
 		child->name = NULL;
 		/* This takes care of match_id deallocation as well. */
-		delete_device(child);
+		ddf_fun_destroy(child);
 	}
 	if (child_name != NULL) {
Index: uspace/lib/usb/src/request.c
===================================================================
--- uspace/lib/usb/src/request.c	(revision 0f21c0c8a600adbbfbe315431bff13a9695a1692)
+++ uspace/lib/usb/src/request.c	(revision eb1a2f485e907e821965b3aafca2d8a5355f3518)
@@ -35,4 +35,5 @@
 #include <usb/request.h>
 #include <errno.h>
+#include <assert.h>
 
 #define MAX_DATA_LENGTH ((size_t)(0xFFFF))
Index: uspace/lib/usb/src/usbdevice.c
===================================================================
--- uspace/lib/usb/src/usbdevice.c	(revision 0f21c0c8a600adbbfbe315431bff13a9695a1692)
+++ uspace/lib/usb/src/usbdevice.c	(revision eb1a2f485e907e821965b3aafca2d8a5355f3518)
@@ -37,5 +37,7 @@
 #include <usb_iface.h>
 #include <usb/usbdevice.h>
+#include <usb/debug.h>
 #include <errno.h>
+#include <assert.h>
 
 /** Find host controller handle that is ancestor of given device.
@@ -55,4 +57,5 @@
 
 	devman_handle_t h;
+	usb_log_debug("asking for HC handle (my handle is %zu).\n", device_handle);
 	int rc = async_req_1_1(parent_phone, DEV_IFACE_ID(USB_DEV_IFACE),
 	    IPC_M_USB_GET_HOST_CONTROLLER_HANDLE, &h);
@@ -78,5 +81,5 @@
  */
 int usb_hc_connection_initialize_from_device(usb_hc_connection_t *connection,
-    device_t *device)
+    ddf_dev_t *device)
 {
 	assert(connection);
