#include <g_dnl.h>
 #include <usb_mass_storage.h>
 #include <dfu.h>
+#include <thor.h>
 
 #include "gadget_chips.h"
 #include "composite.c"
                ret = dfu_add(c);
        else if (!strcmp(s, "usb_dnl_ums"))
                ret = fsg_add(c);
+       else if (!strcmp(s, "usb_dnl_thor"))
+               ret = thor_add(c);
 
        return ret;
 }
 
 int g_dnl_register(const char *type)
 {
-       /* We only allow "dfu" atm, so 3 should be enough */
-       static char name[sizeof(shortname) + 3];
+       /* The largest function name is 4 */
+       static char name[sizeof(shortname) + 4];
        int ret;
 
        if (!strcmp(type, "dfu")) {
        } else if (!strcmp(type, "ums")) {
                strcpy(name, shortname);
                strcat(name, type);
+       } else if (!strcmp(type, "thor")) {
+               strcpy(name, shortname);
+               strcat(name, type);
        } else {
                printf("%s: unknown command: %s\n", __func__, type);
                return -EINVAL;