net: rmnet_usb: Decrease autosuspend delay to 1.2s

Override the default autosuspend delay of 4 seconds--that is, 2
seconds for device and 2 seconds for the root hub, to 1s for the
HSIC-connected MDM device and 200ms for the root hub. This should
minimize the time spent active for better power savings.

CRs-fixed: 353213
Change-Id: Idfa49928dbb7fd2508deec0b9fab25e1cbcdf078
Signed-off-by: Jack Pham <jackp@codeaurora.org>
This commit is contained in:
Jack Pham
2012-06-19 17:52:51 -07:00
committed by Stephen Boyd
parent ac760faa9d
commit a940b9173e

View File

@@ -505,6 +505,7 @@ static int rmnet_usb_probe(struct usb_interface *iface,
{
struct usbnet *unet;
struct driver_info *info;
struct usb_device *udev;
unsigned int iface_num;
static int first_rmnet_iface_num = -EINVAL;
int status = 0;
@@ -555,8 +556,17 @@ static int rmnet_usb_probe(struct usb_interface *iface,
if (status)
dev_dbg(&iface->dev, "mode debugfs file is not available\n");
udev = unet->udev;
/* allow modem to wake up suspended system */
device_set_wakeup_enable(&unet->udev->dev, 1);
device_set_wakeup_enable(&udev->dev, 1);
/* set default autosuspend timeout for modem and roothub */
if (udev->parent && !udev->parent->parent) {
pm_runtime_set_autosuspend_delay(&udev->dev, 1000);
pm_runtime_set_autosuspend_delay(&udev->parent->dev, 200);
}
out:
return status;
}