musb: add the version of the forced hostmode API to proc
authorPaul Fertser <fercerpav@gmail.com>
Wed, 10 Nov 2010 00:16:26 +0000 (03:16 +0300)
committerPaul Fertser <fercerpav@gmail.com>
Wed, 10 Nov 2010 00:16:26 +0000 (03:16 +0300)
This allows userspace to determine at runtime the semantics of the
forced hostmode for the currently running kernel, the version is
presented at /proc/drivers/musb_hdrc.

drivers/usb/musb/musb_core.h
drivers/usb/musb/musb_procfs.c

index 0581261..00dcc94 100644 (file)
@@ -63,6 +63,9 @@ struct musb_ep;
 #include "../core/hcd.h"
 #include "musb_host.h"
 
+/* This is the version of forced hostmode userspace<->kernelspace API.
+ * Do not update to the build date, bump only on API changes */
+#define MUSB_VERSION_HOSTMODE  "20101104"
 
 #ifdef CONFIG_USB_MUSB_OTG
 
index 76161d3..8480b56 100644 (file)
@@ -479,7 +479,8 @@ static int dump_header_stats(struct musb *musb, char *buffer)
 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
                        "host"
 #endif
-                       ", debug=%d [eps=%d]\n",
+                       ", debug=%d [eps=%d]"
+                       ", version_hostmode=" MUSB_VERSION_HOSTMODE "\n",
                musb_debug,
                musb->nr_endpoints);
        if (code <= 0)