summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-23Merge tag 'upstream/0.1.0' into tizensubmit/tizen_unified/20170308.100414submit/tizen_3.0_wearable/20161015.000004submit/tizen_3.0_tv/20161015.000003submit/tizen_3.0_mobile/20161015.000004submit/tizen_3.0_ivi/20161010.000004submit/tizen_3.0_common/20161104.104000submit/tizen_3.0.m2/20170104.093753submit/tizen/20160923.132155accepted/tizen/wearable/20160927.020616accepted/tizen/unified/20170309.035941accepted/tizen/tv/20160927.020601accepted/tizen/mobile/20160927.020620accepted/tizen/ivi/20160927.020623accepted/tizen/common/20160923.161301accepted/tizen/3.0/wearable/20161015.083513accepted/tizen/3.0/tv/20161016.004828accepted/tizen/3.0/mobile/20161015.033614accepted/tizen/3.0/ivi/20161011.050501accepted/tizen/3.0/common/20161114.111051accepted/tizen/3.0.m2/wearable/20170105.024959accepted/tizen/3.0.m2/tv/20170105.024830accepted/tizen/3.0.m2/mobile/20170105.024644tizen_backup_before_libusbg_to_libusbgx_changetizen_3.0_tvtizen_3.0.m2tizen_3.0accepted/tizen_wearableaccepted/tizen_tvaccepted/tizen_mobileaccepted/tizen_iviaccepted/tizen_commonaccepted/tizen_3.0_wearableaccepted/tizen_3.0_tvaccepted/tizen_3.0_mobileaccepted/tizen_3.0_iviaccepted/tizen_3.0_commonaccepted/tizen_3.0.m2_wearableaccepted/tizen_3.0.m2_tvaccepted/tizen_3.0.m2_mobiletaeyoung7-14/+11
Change-Id: I4965ba341147d86880fb2aac49b196290f1465ec Signed-off-by: taeyoung <ty317.kim@samsung.com>
2016-09-23Imported Upstream version 0.0.1upstream/0.1.0upstream_backup_before_libusbg_to_libusbgx_changetaeyoung33-457/+11053
Change-Id: I8c015fe84734a1020227040699dc4bbf9a081ccd
2016-09-23Revert "Imported Upstream version 0.0.1"taeyoung33-11053/+457
This reverts commit af80c789ed18bffe59ff815f0fddabbda56b9442. Change-Id: I21d25ee142e12b9111664bd7ce3b2b190a56bb88
2016-09-23Imported Upstream version 0.0.1taeyoung33-457/+11053
Change-Id: I7f9821384b1c58f400c5e4935edb8b89f30d503e
2016-09-23Revert "Imported Upstream version 0.0.1"Taeyoung Kim33-11053/+457
This reverts commit 1521b31edc929f9b2d2551d2548765fa953f357d. Change-Id: Id43ea1856c1d1a02b0f5667a80e5f25bb5e641e5
2016-09-23Imported Upstream version 0.0.1taeyoung33-457/+11053
Change-Id: I3ef3d374cc9e58ac062a426b9113a2f90d46e60f
2016-09-23Revert "common: fix minor issues."taeyoung6-24/+18
This reverts commit d25dbaed77aeb19345d57af73f64989a1d5e6265. Change-Id: Ic6abcb23180f4b015b41a994b36f78607bd0081c Signed-off-by: taeyoung <ty317.kim@samsung.com>
2016-09-23common: fix minor issues.submit/tizen/20160923.084807taeyoung6-18/+24
- thread unsafe functions are removed. - sprintf is changed to snprintf Change-Id: I129984005ae538496a1135cbc8a191f588a432ff Signed-off-by: taeyoung <ty317.kim@samsung.com>
2016-08-31license: move COPYING file to the example packagesubmit/tizen/20160909.084919submit/tizen/20160901.045726accepted/tizen/wearable/20160909.122619accepted/tizen/tv/20160909.122601accepted/tizen/mobile/20160909.122554accepted/tizen/ivi/20160909.122637accepted/tizen/common/20160909.115147taeyoung1-1/+2
- 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>
2015-12-23libusbg: packaging: Add packaging for generating rpm package.submit/tizen_common/20160304.143411accepted/tizen/common/20160304.195846Krzysztof Opasiak3-0/+83
Change-Id: I69eb6b752e35e0a718cce06b1634ece376c2bcb4 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2015-11-19libusbg: Fix memory leak in usbg_set_function_ms_attrs()Krzysztof Opasiak1-0/+1
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2015-09-21libusbg: Add support for importing/exporting loopback functionKrzysztof Opasiak1-0/+80
Now it is also possible to use loopback function in gadget schemes. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2015-09-21libusbg: Add support for loopback function.Krzysztof Opasiak2-0/+59
Now it is also possible to create and manage loopback function using libusbg library. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2015-08-20libusbg: tests: Add missing test casesPawel Szewczyk1-0/+38
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>
2015-08-19libusbg: tests: Add tests for gadget strings enumPawel Szewczyk1-0/+55
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>
2015-08-19libusbg: Add enum for gadget stringsPawel Szewczyk2-0/+96
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>
2015-08-19libusbg: Add USBG_ERROR_NOT_EMPTY error codePawel Szewczyk2-0/+10
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>
2015-07-30libusbg: tests: Add create function testPawel Szewczyk3-0/+60
Change-Id: I3a47f0d16b9259f09bb4ea3eeb3734a89af43019 Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com> Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2015-07-30libusbg: tests: Add getting function attributes testsPawel Szewczyk3-0/+520
Change-Id: Ia82f5f124e7b57c2694c605ddc942513fc337645 Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com> Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2015-07-30libusbg: tests: Add assertions for function attributesPawel Szewczyk1-0/+32
Change-Id: Idfc179ff08a0d23b73ca0f30519bbc73f6556e10 Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com> Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2015-07-30libusbg: tests: Add creating configuration testPawel Szewczyk1-0/+44
Change-Id: I0e5c09b5664f8e15d9ba70e9a5682992341e0884 Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com> Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2015-07-30libusbg: tests: Add framework setup for creating configPawel Szewczyk2-0/+50
Change-Id: I19b4777e9b61c7dc63c8bb0644de2a63089e6bd3 Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com> Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2015-07-30libusbg: tests: Move initialization from for_each functions to testsPawel Szewczyk3-48/+116
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>
2015-07-30libusbg: tests: Separate safe state initialization from testsPawel Szewczyk3-90/+35
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>
2015-07-30libusbg: tests: Add macros for structures definitionsPawel Szewczyk1-109/+57
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>
2015-07-30libusbg: tests: Separate common code of gadget testingPawel Szewczyk3-74/+62
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>
2015-07-30libusbg: tests: Add wrappers for safe allocationPawel Szewczyk3-193/+85
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>
2015-07-30libusbg: tests: Use new version of cmockaPawel Szewczyk2-61/+36
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>
2015-05-21libusbg: schemes: Allow to import midi functionPawel Szewczyk1-0/+59
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>
2015-05-21libusbg: schemes: Allow to export midi functionPawel Szewczyk1-0/+51
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>
2015-05-19libusbg: examples: Use digital format for bMaxPacketSize0Krzysztof Opasiak5-5/+5
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>
2015-05-19libusbg: examples: Print bcdUSB and bcdDevice as BCD not HEXKrzysztof Opasiak1-2/+7
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>
2015-05-19libusbg: examples: Print gadget data in the same order as lsusb.Krzysztof Opasiak1-3/+3
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2015-05-19libusbg: examples: Make examples easier to readKrzysztof Opasiak4-58/+64
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>
2015-05-19libusbg: Allow to pass NULL as name to usbg_add_config_function()Krzysztof Opasiak1-0/+3
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>
2015-05-19libusbg: examples: add example of midi function usagePawel Szewczyk2-1/+119
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>
2015-05-19libusbg: Update show-gadgets example to support MIDI gadgetsDominic Sacré1-0/+13
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>
2015-05-19libusbg: Add support for MIDI functionDominic Sacré2-0/+98
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>
2015-05-19libusbg: Mark char pointers in usbg_*_attrs as constDominic Sacré2-9/+9
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>
2015-05-19libusbg: Fix warnings when compiling with -WallDominic Sacré2-4/+2
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>
2015-05-19libusbg: Format switch statements more consistentlyDominic Sacré2-0/+9
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>
2015-05-19libusbg: Fix several typosDominic Sacré3-29/+29
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>
2015-04-28libusbg: Fix mapping function type into attributes typePawel Szewczyk1-1/+1
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>
2015-04-27libusbg: print leading zero for MAC address bytesStefan Agner3-6/+17
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>
2015-04-27libusbg: schemes: Allow to import mass storage functionKrzysztof Opasiak1-0/+148
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>
2015-04-27libusbg: schemes: Allow to export mass storage functionKrzysztof Opasiak1-0/+85
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>
2015-04-27libusbg: Add example with mass storage functionKrzysztof Opasiak2-1/+160
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>
2015-04-27libusbg: Update example to show also mass storage functionKrzysztof Opasiak1-0/+17
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>
2015-04-27libusbg: Add support for mass storage functionKrzysztof Opasiak2-0/+428
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
2015-04-27libusbg: Add rm callback to usbg_functionKrzysztof Opasiak2-0/+17
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>