doc: Fix typos and inconsistencies

Change-Id: I65365e7c413dcb160766182e930039c22fe4c654
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
parser: Expose program name globally

This should be useful at least for help screens.

Change-Id: Ic0d6c534c02cd523a0662046c79e7db5f580c509
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
parser: Add global help screen

Change-Id: I76dc5772bc77a27494b951ae29389970b3b04fcd
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
build: Add glib2 to build requirements

glib2 will be used by d-bus code.

Change-Id: Id6efeb10fbaebd990307e1f3fc9d1233733e6cb4
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
common: Add string helper macros

Change-Id: Id275f1215adca472605d023d843980bc0c593ce5
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
backend: Introduce notion of different backends

Backend is currently selected using argv[0] name:

 - gt selects libusbg (direct) backend
 - gadgetctl selects gadgetd (d-bus) backend

Any other program name will trigger autodetection
(d-bus then direct).

Change-Id: Ie8459416b11110afb6a09d1855c3b26b595e7067
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
gadget: create: Add initial implementation

Change-Id: Iefbb8c25804c25b7c00ee9a3d6e2a2c21c705531
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
gadget: create: Add one-line description of 'create' functionality

Change-Id: I966c52cb72d8d52088bc87ef07765fe72c556f60
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
func: Add global help screen

Change-Id: I7bbf795300f9dc1f1765047377e4a6fb3141e3ff
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
func: create: Add initial implementation and help screen

Change-Id: I32bdce3429af0091da57bcf3cc04093116608471
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
func: Add 'list-types' command

This will allow user to discover valid function types - either
provided by libusbg for gt backend, or detected on run-time by
gadgetd.

Change-Id: Ic01a41f291a77762eca7b1bd81f8366cbb0dbd7a
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
fix: add correct backend in "create gadget" for libusbg

Change-Id: I3bc279294364f17b3063fc2dedba48d9004b2644
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
common: add cleanup macros

Change-Id: I6b910081bcf053ed12f6bb0a56c2eba65cc51875
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
parser: fix probelms with parsing config name and funcion name

Change-Id: Ie68ed7237573c08c3e91423a17600cc54233bd3f
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
config: create: Add initial implementation

Change-Id: I071173db447d4d1712542003362af2a9068b3493
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
config: attach function: Add initial implementation

Change-Id: I5aaabdf8951b33d6dc453bad0c85f2437296ebc8
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
parser: Some small changes due to enable gadget parsing

Change-Id: I36a02e2d3c93b5ff34bba845f8643a6cf35f2697
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
gadget: enable: Add initial implementation

Change-Id: I35da61e09c6569ab87d6692709b7f63ab1d65c70
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
packaging: add missing dependency

Change-Id: I640305a804e6a8d70aeba1f48523b8bc21da8ce1
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
parser: Allow to use only type instance syntax

Using type.instance syntax may be ambiguous when
using gadgetctl so we should not use this convention

Change-Id: I3926907c21a1238f8267562caa190605f872afbb
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>