Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I4d4d349b51d7feeac6912e08ac79e0b2695d3e7e
(cherry picked from commit 30379cb9470e47417a07250d28177c335b1f4e5c)
|
|
Change-Id: I494c5dbb285870f226fe64392b6b880797309761
(cherry picked from commit 8e03ec0d2c4b7beb09d8a49fa626fb807b991789)
|
|
On SLP : check if /sys/class/usb_mode/usb0/f_[sdb|mtp|acm|rndis|diag|dm] exists
On CFS : check if /usr/lib/systemd/system/[sdb|mpt].service exists or the result of usbg_lookup_function_type()
Change-Id: I2cc8acc3553a8734484d50cfc0ede7a963a363b0
(cherry picked from commit 3bb736815986e6433b2a94555c4ceb64b2abea7a)
|
|
Change-Id: If2d574da915233d2849017892d64a7ea75191970
(cherry picked from commit 66aa88ba4c649532bef7c512eebdb24d9481568b)
|
|
The usb gadget's config uses only one string information.
So instead of dynamically creating string information, only use one fixed.
Change-Id: Ie7e5bb198a429c8ac766002711f6add47d06fa1e
(cherry picked from commit f4221a979f17129610293fed809d7fd822d59f54)
|
|
The usb gadget uses only one string information.
So instead of dynamically creating string information, only use one fixed.
Change-Id: I01adf3d0c7ce498e516b08b5a284c63d2940bcb6
(cherry picked from commit 998f44215d67cdf7aa33d63f012369c3a413bfaa)
|
|
Move common USB gadget attribute value to header
Change-Id: Id06fefc9af78876d46364b39893b4f25ebd9ed82
(cherry picked from commit a3a343526d84ad3c7097014bce38e7ca79bb3a0d)
|
|
Change-Id: Ib091544138444c4108c7b09eb3e70e830661648e
(cherry picked from commit d8d490bd8049ccad9e5a8bede183ce63bbb7e78d)
|
|
One usb function can be used in multiple config in configfs.
So when you create a usb function, you have to check if it exists.
Change-Id: I8f16fe4c542b277c12022d1c96d8ccb0aee32237
(cherry picked from commit 632729260576e9e7a81a18f8ef7dc9f51fe8c184)
|
|
This reverts commit 9065e52b99d5a10fa059c7337b7d693fa32584e5.
The const variable is assigned to the read-only memory map area.
So, we can not modify it.
Change-Id: I8719eef3af23bd7c33e3419d94afdf4f5f19261c
(cherry picked from commit 0eb9342b124760ee703d25bb4cd703338d58cdc1)
|
|
Since the _available_funcs global variable is used in many places, it should be prevented from changing to const.
Change-Id: I53404030e16361a70254fe2780176ac1441b1e13
(cherry picked from commit 9065e52b99d5a10fa059c7337b7d693fa32584e5)
|
|
To prevent the global variable _available_funcs from being exposed.
Change-Id: I26b09d3fa8fb5c8117c0029eb94dd3b7efe9a2c7
(cherry picked from commit 3d1a1c4e666cd31b88cd678968658368e988cbaa)
|
|
Before : add new functions -> enable new functions as linking to configs -> delete unused configs -> deleted unused functions
After : remove all configs -> remove all functions -> add new functions -> enable new functions as linking to configs
Change-Id: If0fdcb9a1cda9afcb6d865bee7f0db1539d4df2b
(cherry picked from commit e513020a513815371d18079de80c55f370aa6ed6)
|
|
Configfs can use more than one configs.
(/sys/kernel/config/usb_gadget/hal-gadget/configs/hal-config.1 and /sys/kernel/config/usb_gadget/hal-gadget/configs/hal-config.2)
One usb function can be included in two config simultaneously.
In this situation, a handler associated with function can be called twice for a usb function.
To prevent duplicate calls,
it handles only the handlers of functions enabled in configfs, not the usb functions included in all configs.
Change-Id: I5e02dadc5d2688f0ad9210ad5ab149fb95ab05ba
(cherry picked from commit 7803a3c5a1b0293a5bda490c26c95ae8b967e001)
|
|
Change-Id: I26a3d3db3fecdd5303d99fa1b003e446ba75e002
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
|
|
Change-Id: I0d9f5c77a729ca706b85ab988aecd76ccb4c12cc
(cherry picked from commit 94e1d8be764c68c97c6f2ec15a0dc07ce6e3837f)
|
|
Change-Id: I148b8b5b1463c3593f3f609c5ba137403b9272f9
(cherry picked from commit 2f3aa72c35df8b372a583701d477e42150e825c5)
|
|
After setting the new usb mode, the configfs functions that was not used remain.
For example, changing from rndis mode to sdb mode, /sys/kernel/config/usb_gadget/hal-gadget/rndis.default remains.
A functionfs has to do a few extra things.
- The socket and service associated with functionfs must be terminated.
- Umount /dev/usb-funcs/[sdb|mtp]/default
- Delete /dev/usb-funcs/[sdb|mtp]/default recursively
Change-Id: I2d66f033babd5bea20cfc74d8bf23eb9a89c3be1
(cherry picked from commit 19877fd6f2488dca79d89c5b06f1673a624a5f32)
|
|
When usb gadget is enabled/disabled in configfs,
it retrieves the list of currently used usb functions in order to run the service handler.
Before the modification, it retrieve a list of "all functions" used even once.
So if you run "ifconfig" after changing usb mode to "sdb mode" -> "rndis mode" -> "sdb mode",
even in sdb mode, the usb0 network interface appears.
Change-Id: I83564591cd899197077823fdb2fbe25d034fcf46
(cherry picked from commit 25b632db82163a339c23ffafc1095be225816b25)
|
|
Change-Id: Ibb74b5627ef1376be141fb23e56787e45b34c142
(cherry picked from commit c1ef88b5dc9a2e8014ebf290e802fb57c34fd5f0)
|
|
sdb.service and mtp-responder.service are alive when the usb cable is unplugged in the configfs environment.
If the usb cable is disconnected, gadget disable is called.
These services are stopped when the gadget is disabled.
Caution 1
Note that the socket units for these services should remain.
The scoket unit has ep0 in the functionfs environment.
If ep0 disappears because the socket unit is stopped, the functionfs can never be enabled.
Caution 2
Since ffs_service works by socket activation, it will be started automatically when data is enqueued to the usb socket.
So when enabling configfs gadget, it doesn't start ffs_service.
Change-Id: I660e0cf157320f6a4e8f152a028772547dd701f6
(cherry picked from commit 5e9327a2d5b5215b4371b406339dc83a89891074)
|
|
Excon does not work perfectly in Artik.
So I added the workaround code, which causes some strange USB initialization.
This problem disappears when the extcon value is always fixed at 1.
So I asked the kernel team to fix the extcon value to 1 and removed the workaround code.
If extcon is always 1, deviecd will not recognize when usb is disconnected, but it will work normally.
Conclusion: For targets where extcon does not work perfectly, deviced do not support usb connect/disconnect.
Change-Id: Idf06c987f589218a458df6904d8fb8f9132f05c3
(cherry picked from commit f68550cd0c83a60621de5ef70de2a9edcba8b5d7)
|
|
Change-Id: Ic3472d6b6da35b199704ca6150447cab05638a71
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit afc9e97d20d06918ade6e6cc555226bc30131889)
|
|
Change-Id: Ic9473dbbeee14d609e357c1d3fcc00dbea1dc434
(cherry picked from commit 1c426172aa3a5047914ee14bb0ade36bff0e6826)
|
|
Change-Id: I2a488ef551a3c92a36cfa428787cdfdd31f82cab
(cherry picked from commit 2dbaad820b5f0ca6c9b59ac61c3c14460775f915)
|
|
Change-Id: Ieb87a66543095a44773bdfba105c37b19b3b2cfa
|
|
Merge "struct usb_function_witch_service" into "struct usb_function".
Change-Id: I9ed616f7e5933594093e9a027dd7d56cf1b016c8
(cherry picked from commit c76e213a9ecef080b7dc3ae92105969e9d531deb)
|
|
environment
Rndis and acm need their services to complete initialization.
Change-Id: I24381f2e30a4cf1e3051ea4a304d65ad8eb59f50
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
(cherry picked from commit c0fb89192952ca0806c26abddf5daf0e3f3acc30)
|
|
Change-Id: I4df7a7dcb55382a18b93a9bd3afbe909c20c6998
(cherry picked from commit 5a43d7f0d0e7edc87e4afc5c1aa6fbc03b5cf212)
|
|
Change-Id: I8dc05a6e62fd0a6a10199639d4316e22823776cd
(cherry picked from commit 8725dfd7e408db4f59c1722475d2d98c71d48741)
|
|
To support CFS acm and rndis mode, add new USB_FUNCTION_GROUP_WITH_POST_SERVICE mode.
Legacy mode : usb prepare --> usb enable --> start sdb, mtp, rndis, and data-router service
CFS sdb, mtp mode : usb prepare -> start sdb and mtp service -> usb enable
CFS acm, rndis mode : usb prepare -> usb enable -> start acm and rndis service
Change-Id: I7199636d0b2bcfeac068e1c1575e89926c8f7134
(cherry picked from commit 6312d5a191ccc31b8c20ec109d4e2e3ba8406899)
|
|
Because it is a workround code for Artik, restrict this patch to artik.
(This workaround will be removed in tizen 6.0)
Change-Id: Ice81dd8c37359bdc4a37099ecff27d696f7f9ec0
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
|
|
Change-Id: I3611395b38a3858d0838ddf94dc12e958fd91856
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
|
|
Change-Id: I94d972c7dc68d9e6b246702b9217d0b92c908d0c
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
|
|
Change-Id: Ic498a2c56ffaccdcacf2c01d5d20a169fc5324cf
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
|
|
Change-Id: I632bd9813094ade3b03dadd7d21bc62dc2152710
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
|
|
Change-Id: I1fc61542b8228ff038b64ee1df3cd5b6c3947a1c
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
|
|
Each functionfs daemon spawned at gadget initialization should be closed
before functionfs can be succesfully cleaned up.
Change-Id: I97654fa882f5b7346e5aee3aedd3ea00e50fcb47
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
|
|
This workaround was introduced on artik, where gadget need to be enabled
before usb connection can be properly monitored. As this does little
harm, it's moved here to prevent regression on artik.
The side effect of this is starting some functionfs daemons long before
they are actually needed, so this should be removed when exton issue is
fixed.
Change-Id: Ia41c21e3c44d7d3a00d557f181e8c22766c6f31b
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
|
|
Change-Id: I863b5e9757f943eb6659e939118b9c03e22c8229
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
|