usb: gadget: fastboot: Add external command execution support
Custom projects may need vendor specific expansions to the fastboot
command execution. Allow these to be implemented without messing in
the fastboot code directly.
We have a hook for all commands and also one for the "flash" command.
Each hook can decide if the generic command parser is executed
afterwards (return value FASTBOOT_CMD_FALLTHROUGH) or if the generic
parser shall be skipped (return value 0 or negative error code).

This allows board code to implement vendor specific "oem" commands
or to handle the downloaded image in a special way (i.e. do signature
checks on them)

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent e509849 commit ed1dded0898faa1f917309172f2065014756c59f
@Sascha Hauer Sascha Hauer authored on 26 Jan 2018
Showing 3 changed files
View
drivers/usb/gadget/f_fastboot.c
View
drivers/usb/gadget/multi.c
View
include/usb/fastboot.h