Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a78a292 authored by Aniket Randive's avatar Aniket Randive
Browse files

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: default avatarAniket Randive <arandive@codeaurora.org>
parent 17ed9893
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);

+0 −3
Original line number Diff line number Diff line
@@ -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;
	}