diff options
author | Rob Herring <robh@kernel.org> | 2014-12-10 14:43:03 -0600 |
---|---|---|
committer | Lukasz Majewski <l.majewski@samsung.com> | 2014-12-18 12:26:05 +0100 |
commit | fe1b28c9f0954047f20b20253596b5ca9aef4a32 (patch) | |
tree | f4e2f85dc522e473ccb7f8df4615b12d4ae24988 /drivers/usb/gadget/g_dnl.c | |
parent | 68ae882596524a2dde9da73283241b01d56375d5 (diff) | |
download | u-boot-fe1b28c9f0954047f20b20253596b5ca9aef4a32.tar.gz u-boot-fe1b28c9f0954047f20b20253596b5ca9aef4a32.tar.bz2 u-boot-fe1b28c9f0954047f20b20253596b5ca9aef4a32.zip |
usb, g_dnl: generalize DFU detach functions
In order to add detach functions for fastboot, make the DFU detach related
functions common so they can be shared.
Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
[TestHW: Exynos4412-Trats2]
Diffstat (limited to 'drivers/usb/gadget/g_dnl.c')
-rw-r--r-- | drivers/usb/gadget/g_dnl.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index 25611acd60..ee52a29467 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -163,6 +163,23 @@ __weak int g_dnl_board_usb_cable_connected(void) return -EOPNOTSUPP; } +static bool g_dnl_detach_request; + +bool g_dnl_detach(void) +{ + return g_dnl_detach_request; +} + +void g_dnl_trigger_detach(void) +{ + g_dnl_detach_request = true; +} + +void g_dnl_clear_detach(void) +{ + g_dnl_detach_request = false; +} + static int g_dnl_get_bcd_device_number(struct usb_composite_dev *cdev) { struct usb_gadget *gadget = cdev->gadget; |