Commit graph

11 commits

Author SHA1 Message Date
Badhri Jagan Sridharan
05e04a134e Remove redundant action triggers on persist.sys.usb.config
persist.sys.usb.config stores the usb functions which need to be enabled
when the phone boots up. When the phone is actually booted, setting this
would also activate the following action trigger on sys.usb.config

From init.usb.rc:
Used to set USB configuration at boot and to switch the configuration
when changing the default configuration
on property:persist.sys.usb.config=*
    setprop sys.usb.config ${persist.sys.usb.config}

sys.usb.config is anyways set to the actual functions by UsbDeviceManager
once it is set to none. Therefore add "on boot" condition to the above
action trigger so that persist.sys.usb.config does not race with
sys.usb.config.

BUG: 30440213
Change-Id: I3333d0b8334fb627469c7faad250bf3151bb1ebf
2016-08-01 21:56:23 +00:00
Vincent Palatin
2a0481109b am 100de590: am 5e294902: Merge "init.usb.rc: fix USB typec property names" into mnc-dr-dev
* commit '100de590e7f82e1039eebc10e60ea554deeb1c3f':
  init.usb.rc: fix USB typec property names
2015-09-04 20:06:28 +00:00
Tom Cherry
c74403b4c9 am b00a8a06: am e8b0fcec: Merge "combine adbd.rc with init.usb.rc"
* commit 'b00a8a066f5b6ae5b8d0c03ee7f680389b38a260':
  combine adbd.rc with init.usb.rc
2015-09-04 18:02:32 +00:00
Tom Cherry
2270dbbc84 combine adbd.rc with init.usb.rc
init.usb.rc and adbd.rc contain similar contents and belong in the same
file.

This file also belongs on the ramdisk as adbd is on the ramdisk, not the
system partition, therefore resolving to keep init.usb.rc in its current
location and combining the contents of adbd.rc is the best approach

Change-Id: I430f8fea58694679e7b8b7be69ce87daadd616f4
2015-09-03 16:19:04 -07:00
Vincent Palatin
3b7995b72e init.usb.rc: fix USB typec property names
Fix typos in the usb typec properties (sys.usb.typec.*),
so the data_role and the power_role can be written properly in the sysfs.

Bug: 23790832
Change-Id: I90f591ab37825a07e0610ef1fec0e831eb19515d
2015-09-03 13:53:04 -07:00
Badhri Jagan Sridharan
48d59acc57 init.usb.rc: Add new system property for configfs
This CL helps to execute a different set of
commands for the usb configs specified in
init.usb.rc. Aimed at using configfs based
commands over android composition driver.

Bug=23633457

Change-Id: Ifa5f804e1cff93d15ad57d0ed553300bc5868936
2015-09-01 15:39:22 -07:00
Tim Kilbourn
8c12fdf4ab Use init to write usb typec props
The sysfs nodes are owned by root, so use init to write role changes.

Bug: 21615151
Change-Id: I39ad03a23af0be9ac859d4fb79a46edc27e30f4e
2015-08-17 14:56:57 -07:00
Badhri Jagan Sridharan
97b536f1fb init.usb.rc: Change product id to for add only config
Change product id from D002 to 4EE7 when adb is the
only supported function

Change-Id: I8f6bcb9a1dc5ea6da0493a2dd730f9ac1f0bed24
2014-09-05 12:33:46 -07:00
Benoit Goby
31c8095cac Revert "init.usb.rc: set sys.usb.config to none before changing it"
This can cause init to be stucked in a loop in very rare cases where
persist.sys.usb.config is set to "none" (because the "setprop
sys.usb.config none" action is added twice to the action list).
The original issue on encrypted devices has been fixed differently
by change # I350c5aab986f8ca86b95f316398d03012553e581

This reverts commit 80828af3de.

Change-Id: Id0a7af8dd861c8d10b80a13b540c8a339b432007
2013-01-15 17:37:32 -08:00
Benoit Goby
80828af3de init.usb.rc: set sys.usb.config to none before changing it
On encrypted devices, persistent properties are loaded after the device
is decrypted. To properly change sys.usb.config to its persistent value,
it must first be set to "none" and then to ${persist.sys.usb.config}.

Bug: 7678835
Change-Id: I4f91245cedc04e3178ce9cee21390f5b657733c9
2012-12-05 18:04:01 -08:00
Mike Lockwood
4f5d5176a3 init.rc: Add support for new USB accessory configurations
Also moved USB scripts to new file init.usb.rc

Change-Id: I98e099fbd8de3eb3e1e18c9ef69312608033a50c
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-04-11 12:35:49 -07:00