summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-09-27 13:46:40 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-09-27 14:02:21 +0200
commit05761813eff43493ee0519f0699a396de3f007a5 (patch)
tree9f9fa40d69ed2a5c0d4a31e28c6f6b8007b0fed9
parentfa92b0bf757084f69780e533bc498106d51f6f5e (diff)
downloadbarebox-05761813eff43493ee0519f0699a396de3f007a5.tar.gz
usbgadget autostart: add usbgadget.fastboot_bbu to automatically export bbu handlers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/usb/gadget/autostart.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/gadget/autostart.c b/drivers/usb/gadget/autostart.c
index 2ca9790..f640a96 100644
--- a/drivers/usb/gadget/autostart.c
+++ b/drivers/usb/gadget/autostart.c
@@ -30,6 +30,7 @@
static int autostart;
static int acm;
static char *fastboot_function;
+static int fastboot_bbu;
static int usbgadget_autostart(void)
{
@@ -49,6 +50,8 @@ static int usbgadget_autostart(void)
strerrorp(opts->fastboot_opts.files));
opts->fastboot_opts.files = NULL;
}
+
+ opts->fastboot_opts.export_bbu = fastboot_bbu;
}
opts->create_acm = acm;
@@ -75,6 +78,7 @@ static int usbgadget_globalvars_init(void)
globalvar_add_simple_bool("usbgadget.acm", &acm);
globalvar_add_simple_string("usbgadget.fastboot_function",
&fastboot_function);
+ globalvar_add_simple_bool("usbgadget.fastboot_bbu", &fastboot_bbu);
return 0;
}
@@ -89,3 +93,6 @@ BAREBOX_MAGICVAR_NAMED(global_usbgadget_acm,
BAREBOX_MAGICVAR_NAMED(global_usbgadget_fastboot_function,
global.usbgadget.fastboot_function,
"usbgadget: Create Android Fastboot function");
+BAREBOX_MAGICVAR_NAMED(global_usbgadget_fastboot_bbu,
+ global.usbgadget.fastboot_bbu,
+ "usbgadget: export barebox update handlers via fastboot");