Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I4965ba341147d86880fb2aac49b196290f1465ec
Signed-off-by: taeyoung <ty317.kim@samsung.com>
|
|
Change-Id: I8c015fe84734a1020227040699dc4bbf9a081ccd
|
|
This reverts commit af80c789ed18bffe59ff815f0fddabbda56b9442.
Change-Id: I21d25ee142e12b9111664bd7ce3b2b190a56bb88
|
|
Change-Id: I7f9821384b1c58f400c5e4935edb8b89f30d503e
|
|
This reverts commit 1521b31edc929f9b2d2551d2548765fa953f357d.
Change-Id: Id43ea1856c1d1a02b0f5667a80e5f25bb5e641e5
|
|
Change-Id: I3ef3d374cc9e58ac062a426b9113a2f90d46e60f
|
|
This reverts commit d25dbaed77aeb19345d57af73f64989a1d5e6265.
Change-Id: Ic6abcb23180f4b015b41a994b36f78607bd0081c
Signed-off-by: taeyoung <ty317.kim@samsung.com>
|
|
- thread unsafe functions are removed.
- sprintf is changed to snprintf
Change-Id: I129984005ae538496a1135cbc8a191f588a432ff
Signed-off-by: taeyoung <ty317.kim@samsung.com>
|
|
- COPYING file is for the GPL-2.0.
- Library is under LGPL-2.1 and the example apps are under GPL-2.0.
Thus COPYING is moved to the example package
Change-Id: I03810ef8adec37f6d1d943e9d1994cb4e765d315
Signed-off-by: taeyoung <ty317.kim@samsung.com>
|
|
Change-Id: I69eb6b752e35e0a718cce06b1634ece376c2bcb4
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Now it is also possible to use loopback function in gadget
schemes.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Now it is also possible to create and manage loopback
function using libusbg library.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Some test functions are not executed at all. This commit fix it.
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Test recently added functions using usbg_gadget_str enum.
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
This commit provides functionality for gadget strings similar to
existing gadget attributes api. It allows to iterate over gadget
strings and to write cleaner and more flexible code.
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
ENOTEMPTY error is common when removing configfs objects. This commit
adds proper error message and internal usbg error code for this
situation.
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Change-Id: I3a47f0d16b9259f09bb4ea3eeb3734a89af43019
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Change-Id: Ia82f5f124e7b57c2694c605ddc942513fc337645
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Change-Id: Idfc179ff08a0d23b73ca0f30519bbc73f6556e10
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Change-Id: I0e5c09b5664f8e15d9ba70e9a5682992341e0884
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Change-Id: I19b4777e9b61c7dc63c8bb0644de2a63089e6bd3
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Instead of passing void **state as argument for for_each_* functions and
initializing state there, we make initialization first and pass initialized
state as argument for them. It looks more natural this way. This also
allows to run these functions multiple times in single test function.
Change-Id: If84bbedf374f1f0ebf70315cea950dcd2e527d18
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Test functions usually need to initialize usbg state before testing.
However, initialization may fail, causing test to finish immediatelly,
running teardown function.
This commit add function which takes care of state pointer when
initializing.
Change-Id: I797e56ac3cda67e871c6c4fbd2184220b05068f6
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
To avoid defining the same or similar values multiple times, we can define
data by proper macros.
Change-Id: I8fa5fd02c76f16a1b9d65a33482a6cd1caa16b70
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Most gadget tests run the same initialization and loop through all
gadgets, performing single operation on them and checking results.
Common code is now separated to for_each_test_gadget function.
Change-Id: I0a1870487aa0c25153c96e57da5501e1bccb8132
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Every allocation here requires checking if it was successful and
storing it on queue to be freed later. Now it can all be done by single
function call.
Change-Id: I06c0099d0b44cb030b6ab8e338ccd58e078a92ac
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Deprecated functions of cmocka are no longer used.
Change-Id: If8804103492b089cf033a35d055260452553638e
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Add support for importing midi function from gadget scheme.
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Add support for exporting midi function to gadget scheme.
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
bMaxPacketSize0 is maximal size of packet which can be
used for communication with ep0. As most people use digital
format for size, lets use digital format for both
initialization of this member in gadget atributes and for
printing it in show-gadgets.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
bcdUSB and bcdDevice members should be interpreted as BCD.
So let's print them as BCD instea of HEX.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Use the same order of structure initialization in all
examples.
Initialize gadget attributes and strings using:
.member = val,
syntax to make examples easier to read.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Somtimes we would like to add function to configuration
without any extraordinary name. In that case we can simply
use type.instance as symlink name.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Support for midi function was recently added. This commit adds an example
program which shows how to create midi gadget with this function.
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Fix usbg_parse_function_midi_attrs() to store qlen value
in qlen member of attrs struct instead of in buflen
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
These attributes are const as far as a library user is concerned.
This change allows attributes to be cleanly initialized from string
literals.
Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Remove unused variables and duplicate const specifiers.
This makes libusbg compile cleanly using -Wall with both gcc and clang.
Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Insert blank lines between all cases in switch statements that branch
on attribute types.
Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Type of ffs function's attribute is not PHONET, but FFS.
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
The ethernet gadget driver requires the hex formatted MAC address
bytes with leading zero, in other words each byte needs to be two
characters in length (see get_ether_addr in u_ether.c). The libc
implementation ether_ntoa does not print leading zeros. Hence use
our own implementation which provides the format expected by the
kernel.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Rebased onto current master.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Allow to import mass storage function from gadget scheme
file. This make mass storage to be fully supported by
libusbg.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
|
|
Add support for exporting mass storage function to
gadget scheme.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
|
|
Mass storage support has been recently added to libusbg.
This commit adds an example program which show how to create
gadget with this function.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
|
|
Mass storage functions has been recently added to libusbg
so update show-gadgets example to show also attributes of
mass storage function.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
|
|
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
|
|
Some functions requires more complicated rm method
which will remove its sub directories. To avoid complexity
in usbg_rm_function() just add a callback which is called
there.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
|