With the usb control fd changes, there
is no longer a need to wait for this
property to trigger before starting the
connection.
Bug: 72877174
Test: switch config to mtp/ptp
Change-Id: Ib29419e7948025be3f3295106cad18943d314f0b
This trigger resets ffs.ready in situations where
adbd is stopped via commandline.
Test: stop adbd
Change-Id: Ib5028d55c4883a8291d6de2dbcb0641ff8eb7a48
This allows devices to use functionfs for mtp and ptp instead
of the ordinary functions. The property is set regardless of
which function is enabled so mtp and ptp functions will continue
to work.
Bug: 33220530
Test: use mtp with ffs and non ffs devices
Change-Id: I4527e153bd10ef1e262e487482ae455835d1c698
for audio_source function instance, there exist 2 function name here:
"audio_source.gs2" and "audio_source.gs3"
I believe this usb accessory audio name "audio_source.gs2" is a typo,
as there is no need to create another audio_source instance.
Test: Manual
Change-Id: I70b513db474632eb990131c285c8d5105c17970f
Signed-off-by: Winter Wang <wente.wang@nxp.com>
Rndis n/w interface "usb0" registration/deregistration is broken. If a
user try to switch to other functions or disable usb tethering or unplug
the usb cable then it doesn't kill "usb0" interface.
Fix is to delete Rndis function to unregister tethering interface when
switching from tethering to other functions or disable/unplug the
tethering cable. If we don't do that then the rndis netdev interface
will never be freed or unregistered.
This also means the rndis function has to be created everytime user
enable tethering function from Settings instead of creating it at
"on boot" in init.$hardware.usb.rc like we do currently. A relevant fix,
Change-Id: Icb49020d624fb21ef2607d473948cbbf3b9cc469, for reference has
already been submitted for device/linaro/hikey
Change-Id: If1f922e02277cccdc8c0b263be63989ee102cc80
Reported-by: Winter Wang <wente.wang@nxp.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
In the case of adb enabled, When a usb function switch happens
e.g mtp,adb -> ptp,adb, framework will set sys.usb.config from
"mtp,adb" to "none" and stop adbd first.
At this time, the property "sys.usb.ffs.ready", which is set after
the ready of the perious start adbd, is still "1".
So , when framework goes on setting the sys.usb.config to "ptp,adb",
init.usb.configfs.rc will trigger actions to bind() f_fs without
waiting for adbd is actually ready.
This will produce some error messages:
------------
configfs-gadget ci_hdrc.0: failed to start g1: -19
init: write_file: Unable to write to '/config/usb_gadget/g1/UDC': No such device
------------
this error msg is caused by configFS start binding f_fs before adbd is ready.
Add setting the "sys.usb.ffs.ready" to "0" will help clear this error msg,
as the bind process in kernel gadget driver will wait for the set of
this property, which is the sign of adbd is ready.
Signed-off-by: Winter Wang <wente.wang@nxp.com>
This CL adds a new init script init.usb.configfs.rc
to add generic configfs commands. Setting
sys.usb.configfs in init.usb.{hardware}.rc
enables executing commands in this script
Bug=23633457
Change-Id: Iaae844a7957d6c9bf510648aaff86d56aa0c6243