diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2018-05-25 16:31:32 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-05-26 18:27:17 +0300 |
commit | 83fa2cb53742f43c3a254d0453bd96048ee29a82 (patch) | |
tree | 09896a840707250a4dc3f54b0902d86da3596d82 /configfs.h | |
parent | 03f3bc285a33397642c79eb94e366d5e18be53fe (diff) |
configfs: Provide configfs support
Parse a configuration name from the commandline, and utilise it to
identify the configfs configuration path.
Only the short-name (i.e. "uvc.1") is necessary to provide if there is
no ambiguity regarding the gadget, otherwise the gadget path should be
included ("g1/functions/uvc.1"). If the parameter is not provided then
the first function is utilised.
Legacy g_webcam is still supported, and the parameter will define the
UDC to match against if provided.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'configfs.h')
-rw-r--r-- | configfs.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/configfs.h b/configfs.h new file mode 100644 index 0000000..56056c1 --- /dev/null +++ b/configfs.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * ConfigFS Gadget device handling + * + * Copyright (C) 2018 Kieran Bingham + * + * Contact: Kieran Bingham <kieran.bingham@ideasonboard.com> + */ + +#ifndef __CONFIGFS_H__ +#define __CONFIGFS_H__ + +struct uvc_function_config { + char *video; + char *udc; + + unsigned int streaming_interval; + unsigned int streaming_maxburst; + unsigned int streaming_maxpacket; +}; + +struct uvc_function_config *configfs_parse_uvc_function(const char *function); +void configfs_free_uvc_function(struct uvc_function_config *fc); + +#endif |