Index: uspace/lib/c/generic/devman.c
===================================================================
--- uspace/lib/c/generic/devman.c	(revision 1b367b43dfe14499c72b40cc8dddfa6a0e6c62ea)
+++ uspace/lib/c/generic/devman.c	(revision 659ca07ee874dd73f2c55ae0f068de4649cef844)
@@ -158,8 +158,22 @@
 }
 
-int devman_child_device_register(const char *name, match_id_list_t *match_ids,
-    devman_handle_t parent_handle, devman_handle_t *handle)
+/** Add function to a device.
+ *
+ * Request devman to add a new function to the specified device owned by
+ * this driver task.
+ *
+ * @param name		Name of the new function
+ * @param ftype		Function type, fun_inner or fun_exposed
+ * @param match_ids	Match IDs (should be empty for fun_exposed)
+ * @param devh		Devman handle of the device
+ * @param funh		Place to store handle of the new function
+ *
+ * @return		EOK on success or negative error code.
+ */
+int devman_add_function(const char *name, fun_type_t ftype,
+    match_id_list_t *match_ids, devman_handle_t devh, devman_handle_t *funh)
 {
 	int phone = devman_get_phone(DEVMAN_DRIVER, IPC_FLAG_BLOCKING);
+	int fun_handle;
 	
 	if (phone < 0)
@@ -168,8 +182,9 @@
 	async_serialize_start();
 	
-	int match_count = list_count(&match_ids->ids);	
-	ipc_call_t answer;
-	aid_t req = async_send_2(phone, DEVMAN_ADD_CHILD_DEVICE, parent_handle, match_count,
-	    &answer);
+	int match_count = list_count(&match_ids->ids);
+	ipc_call_t answer;
+
+	aid_t req = async_send_3(phone, DEVMAN_ADD_FUNCTION, (sysarg_t) ftype,
+	    devh, match_count, &answer);
 
 	sysarg_t retval = async_data_write_start(phone, name, str_size(name));
@@ -186,14 +201,11 @@
 	async_serialize_end();
 	
-	if (retval != EOK) {
-		if (handle != NULL)
-			*handle = -1;
-
-		return retval;
-	}
-	
-	if (handle != NULL)
-		*handle = (int) IPC_GET_ARG1(answer);
-		
+	if (retval == EOK)
+		fun_handle = (int) IPC_GET_ARG1(answer);
+	else
+		fun_handle = -1;
+	
+	*funh = fun_handle;
+
 	return retval;
 }
Index: uspace/lib/c/include/devman.h
===================================================================
--- uspace/lib/c/include/devman.h	(revision 1b367b43dfe14499c72b40cc8dddfa6a0e6c62ea)
+++ uspace/lib/c/include/devman.h	(revision 659ca07ee874dd73f2c55ae0f068de4649cef844)
@@ -45,5 +45,5 @@
 
 extern int devman_driver_register(const char *, async_client_conn_t);
-extern int devman_child_device_register(const char *, match_id_list_t *,
+extern int devman_add_function(const char *, fun_type_t, match_id_list_t *,
     devman_handle_t, devman_handle_t *);
 
Index: uspace/lib/c/include/ipc/devman.h
===================================================================
--- uspace/lib/c/include/ipc/devman.h	(revision 1b367b43dfe14499c72b40cc8dddfa6a0e6c62ea)
+++ uspace/lib/c/include/ipc/devman.h	(revision 659ca07ee874dd73f2c55ae0f068de4649cef844)
@@ -42,4 +42,13 @@
 
 typedef sysarg_t devman_handle_t;
+
+typedef enum {
+	/** Invalid value for debugging purposes */
+	fun_invalid = 0,
+	/** Function to which child devices attach */
+	fun_inner,
+	/** Fuction exported to external clients (leaf function) */
+	fun_exposed
+} fun_type_t;
 
 /** Ids of device models used for device-to-driver matching.
@@ -127,5 +136,5 @@
 typedef enum {
 	DEVMAN_DRIVER_REGISTER = IPC_FIRST_USER_METHOD,
-	DEVMAN_ADD_CHILD_DEVICE,
+	DEVMAN_ADD_FUNCTION,
 	DEVMAN_ADD_MATCH_ID,
 	DEVMAN_ADD_DEVICE_TO_CLASS
