usb: gadget: Add boot marker for logging boot_kpi in sys node
This boot marker indicate the timestamp when USB device is
enumerated successfully and when USB device is entered from
suspend state to resume state. Boot marker is removed from
configfs.c file.
Change-Id: Ib0a97ba2702e94a87d15e7e94fa985c011d31908
Signed-off-by: Aniket Randive <arandive@codeaurora.org>
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 9e3cfae..12331e5 100755
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/device.h>
#include <linux/utsname.h>
+#include <soc/qcom/boot_stats.h>
#include <linux/usb/composite.h>
#include <linux/usb/otg.h>
@@ -927,6 +928,7 @@ static int set_config(struct usb_composite_dev *cdev,
if (!c)
goto done;
+ place_marker("M - USB Device is enumerated");
usb_gadget_set_state(gadget, USB_STATE_CONFIGURED);
cdev->config = c;
c->num_ineps_used = 0;
@@ -2492,6 +2494,7 @@ void composite_resume(struct usb_gadget *gadget)
* suspend/resume callbacks?
*/
DBG(cdev, "resume\n");
+ place_marker("M - USB device is resumed");
if (cdev->driver->resume)
cdev->driver->resume(cdev);
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 92127ab..1a7ebc5 100755
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -18,8 +18,6 @@
#include <function/u_ncm.h>
#endif
-#include <soc/qcom/boot_stats.h>
-
#ifdef CONFIG_USB_CONFIGFS_F_ACC
extern int acc_ctrlrequest(struct usb_composite_dev *cdev,
const struct usb_ctrlrequest *ctrl);
@@ -1460,7 +1458,6 @@ static void android_work(struct work_struct *data)
kobject_uevent_env(&gi->dev->kobj,
KOBJ_CHANGE, configured);
pr_info("%s: sent uevent %s\n", __func__, configured[0]);
- place_marker("M - USB enumeration complete");
uevent_sent = true;
}