mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
device: Reintroduce the alpaca "keep-usb-on" feature
For some reason the SC8180x Primus often fails to detect the attached USB stick if USB is toggled as part of a power cycle, so let's continue to support the property of not toggling it. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
6
device.c
6
device.c
@@ -105,6 +105,9 @@ found:
|
||||
if (device->console_dev)
|
||||
console_open(device);
|
||||
|
||||
if (device->usb_always_on)
|
||||
device_usb(device, true);
|
||||
|
||||
device->fastboot = fastboot_open(device->serial, fastboot_ops, NULL);
|
||||
|
||||
return device;
|
||||
@@ -309,7 +312,8 @@ void device_info(const void *data, size_t dlen)
|
||||
|
||||
void device_close(struct device *dev)
|
||||
{
|
||||
device_usb(dev, false);
|
||||
if (!dev->usb_always_on)
|
||||
device_usb(dev, false);
|
||||
device_power(dev, false);
|
||||
|
||||
if (dev->close)
|
||||
|
||||
Reference in New Issue
Block a user