Revert "USB: ks_bridge: Enable autosuspend only for remote wakeup capable devices"

This reverts commit 2d7bdf58c64057ee4cd8d992b2bdf60bda84734a.
Revert "EHCI: HSIC: Halt the controller while resetting the port"

This reverts commit b6f72f60abd18e6557afb181c4ccedb061544cdb.
Revert "EHCI: HSIC: Fix a race between root hub resume and controller removal"

This reverts commit 503f7825b4be2b8c63516f09aeaf2117b97aaa6a.
Revert "EHCI: HSIC: Fix GPT timer count values used for resume sequence"

This reverts commit f5650d329febd06190c60e754ce548d276eb7343.
Revert "EHCI: HSIC: Implement new reset sequence to workaround PHY lockup issue"

This reverts commit fea518b3e7065c2991838db5d9070cfe51cc29c1.
Revert "EHCI: HSIC: Disable asynchronous interrupt when wakeup gpio is present"

This reverts commit 3d7f28d8192c9c808ac4525d892251b3fe354d12.
Revert "EHCI: HSIC: Handle asynchronous interrupt properly"

This reverts commit b51d129fd3318c0f1e2b7d8389068fdb8d866ed6.
Revert "EHCI: HSIC: Add support to vote for SVS digital voltage"

This reverts commit 37068fa2629655c93c26b42ed072326a7434ab5e.
Revert "USB: Prevent system suspend when HSIC device is active"

This reverts commit a27f5606fe700c4631496e50daab964d42ceebf1.
Revert "EHCI: HSIC: Fail root hub bus suspend when port is not enabled"

This reverts commit ce8e7209296c6c6fd3834ef92481c1dddc64695f.
Revert "EHCI: HSIC: Handle wakeup interrupt properly during probe"

This reverts commit 0cca7c9edadade93b04d2a89c35b4a80a88c4782.
Revert "EHCI: HSIC: Add enhancements to debug logging"

This reverts commit 0af9297cde4f2e11b63d41e998d942ea7616ad3a.
Revert "EHCI: HSIC: Prevent disabling wakeup irq twice"

This reverts commit 003c90b32505fd66e82497b66344e4280a9e61eb.
Revert "msm: hsic: Disallow processor idle sleep while driving resume signal"

This reverts commit ae1829b853ddb8a278bf7cd706d217f33c73e5f7.
Revert "Revert "USB: Prevent system suspend when HSIC device is active""

This reverts commit 2daa44a0d4dfe6b7ef93dbb932c056d700c68abf.
Less prima debugging
Enable pipe flag.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
USB: Allow skipping device resume during system resume

Some buses would like to keep their devices in suspend state during system
resume.  For example HSIC controller driver prevent system suspend when
HSIC device is active.  If this device is resumed, during system resume
HSIC controller acquire wake lock and prevent the subsequent suspend till
HSIC device is auto suspended.

CRs-Fixed: 403975
Change-Id: I93ccd874bf489190e4afb94b533db47bb2911db8
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>

Conflicts:
	drivers/usb/core/driver.c
	drivers/usb/host/ehci-msm-hsic.c
USB: Prevent system suspend when HSIC device is active

Some buses like HSIC would like to keep device in suspend state
after system resume.  The remote wakeup or interface activity
later will auto resume the device.  This will work only if the
device is auto suspended before system suspend.  If the device
runtime state had been active during system suspend and system
suspend routine put the device in suspend, it will not be resumed
during system resume.  When remote wakeup happen for this device,
the runtime resume will not bring the device to active as runtime
core think it is already active.

The HSIC bus ensure that device is auto suspended prior to system
suspend by holding a wakelock till the bus is suspended.  HSIC bus
is not handling the case where device is auto resumed immediately
after system suspend begins.  HSIC bus simply put the device into
suspend in system suspend routine.

This patch fixes above issue by returning an error code if the device
is not auto suspended during system suspend.  Also add a safe guard
check in HSIC system resume routine to skip device resume only if it
is auto suspended prior to system suspend.

CRs-Fixed: 422876
Change-Id: I888585ed872d808aa4dbca33b529fcc32994349b
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
EHCI: HSIC: Prevent disabling wakeup irq twice

If PM resume and Wakeup irq happen at same time
its possible to disable wakeup irq twice. Prevent
the same by protecting with spinlock

CRs-Fixed: 396895
Change-Id: I3320478d6c770787bc571964f4a38dce6927af63
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>