summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJules Maselbas <jmaselbas@kalray.eu>2021-09-10 12:29:31 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-10-05 13:51:12 +0200
commit096c889c7502fc87f446388493f5673656fffa31 (patch)
treed067d89ed93202d2c332f757f71ab25e48152329 /include
parent5a5e67910d2e9e2584a2103c34c86eddaa43868c (diff)
downloadbarebox-096c889c7502fc87f446388493f5673656fffa31.tar.gz
barebox-096c889c7502fc87f446388493f5673656fffa31.tar.xz
usb: gadget: dfu: Rework dfu command to use usbgadget
The dfu command now uses the composite multi gadget to register the usb functionality. This allows the removal of the usb composite driver from dfu.c As the dfu command is blocking the command slice must be released while the dfu gadget is running in order to do operations on the file system. The usb_dfu_register() function is replaced with usb_dfu_detached() for the dfu command to return a different value depending on if it has been interrupted with CTRL-C or if the gadget has been detached. Tested-by: Anže Lešnik <anze.lesnik@norik.com> Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu> Link: https://lore.barebox.org/20210910102931.26078-1-jmaselbas@kalray.eu Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/usb/dfu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/usb/dfu.h b/include/usb/dfu.h
index 560a0318fe..81425f7c62 100644
--- a/include/usb/dfu.h
+++ b/include/usb/dfu.h
@@ -29,6 +29,6 @@ struct f_dfu_opts {
struct file_list *files;
};
-int usb_dfu_register(struct f_dfu_opts *);
+int usb_dfu_detached(void);
#endif /* _USB_DFU_H */