summaryrefslogtreecommitdiff
path: root/usb
Commit message (Collapse)AuthorAgeFilesLines
* b4s4: merge branch lineage-21 into U14.0Siluxsept2024-08-051-2/+2
| | | | Change-Id: I7c3451be9ca50acddafb9894776dbab73619d658
* Write the pullup value only if new value appliedJimmy Hu2022-09-202-21/+21
| | | | | | | | | | Also, remove the non-existing paths and set the initial value of mUsbDataEnabled. Bug: 221009551 Test: build, boot Signed-off-by: Jimmy Hu <hhhuuu@google.com> Change-Id: I30033a9dc5e2ccfd1fe1dcc5fe8a7796c56fce75
* Migrate IUsb implementation to AIDLBadhri Jagan Sridharan2022-09-2014-908/+1002
| | | | | | | | | | | | This change migrates IUsb implementation to AIDL. Also, IUsb and IUsbGadget now run in its own processes to improve stability and isolation. Port of 3c97a6bb68f6418ee41026f3bd0024405c97cf0c Bug: 200993386 Co-authored-by: Michael Bestas <mkbestas@gmail.com> Change-Id: I681c1ba9c4f547e3cf5dc0fa7c9ee1aaf4fd603c
* usb: clang-formatMichael Bestas2022-09-206-903/+936
| | | | | | Bring it closer to newer pixels Change-Id: I8a40f702b513b1c277439fc1fe6131bc2d919d9c
* Do not enable the funcion when it is not in listraychi2022-09-201-31/+58
| | | | | | | | | | | | | | | | | rndis and rmnet cannot co-exist in QCOM spec and cause ramdump. Besides, enabling functions with the wrong PID may cause it cannot install proper PC driver on Windows. A better way is to not allow enabling the function which is not in support list. Bug: 130733202 Test: enable tethering with/without rmnet enabled Signed-off-by: raychi <raychi@google.com> (cherry picked from commit 79ef1d2d35f3e00ce8ab98ff4a3430af579a5419 and fix merge conflict) Change-Id: Ia50058f498c5b99ff58251fd7064963ccdbdd940
* use epoll_create1Nick Kralevich2022-09-201-1/+1
| | | | | | | | | epoll_create leaks file descriptors. Use epoll_create1(EPOLL_CLOEXEC) instead. Bug: 120983106 Test: compiles and boots Change-Id: I15d5b23e70c6c8fcc5163202db430cfa884ea0f2
* usb: Import .clang-format from sunfishMichael Bestas2022-09-201-0/+14
| | | | Change-Id: Iade0918077fa6867d375282704ecf770908e0085
* usb: Fix LOG_TAG for bonitoMichael Bestas2022-03-261-1/+1
| | | | Change-Id: Id773f7d601d06b9161c53036f17f26c2e5781c15
* Revert "Add USB Gadget HAL 1.2 support"Albert Wang2021-03-307-350/+605
| | | | | | | | | | This reverts commit f9083c098a02dc8f18efaab0af4584442cc69d41. Bug: 183638816 Bug: 183670959 Bug: 183902935 Test: USB gadget function switch normally Change-Id: Iaffa6c7d02fde09c4e28652ecdba4fbfa48c100c
* Correct the attributes path for Bonito/SargoAlbert Wang2021-03-231-2/+2
| | | | | | | Bug: 161414036 Test: Pass USB V1.3 HIDL tests Signed-off-by: Albert Wang <albertccwang@google.com> Change-Id: If362e92671566262978728261d9d3893c5daa2b7
* Update USB HAL to V1.3 implementationAlbert Wang2021-03-217-36/+92
| | | | | | | | | Supports to enable/disable USB data signaling Bug: 161414036 Test: Pass USB V1.3 HIDL tests Signed-off-by: Albert Wang <albertccwang@google.com> Change-Id: I965f2bbb268f21020185a21d5dc36fad1c503afb
* Add USB Gadget HAL 1.2 supportAlbert Wang2021-03-215-602/+348
| | | | | | | Bug: 181938674 Test: Pass USB Gadget V1.2 HIDL tests Signed-off-by: Albert Wang <albertccwang@google.com> Change-Id: I17da3e7a22eea008663fafdd7b8a4be6cce0745a
* Merge "Update USB HAL to V1.2 implementation"Treehugger Robot2021-03-176-249/+296
|\
| * Update USB HAL to V1.2 implementationAlbert Wang2021-03-156-249/+296
| | | | | | | | | | | | | | Bug: 181938674 Test: Pass USB V1.2 HIDL tests Signed-off-by: Albert Wang <albertccwang@google.com> Change-Id: I7727901f1cf05375fb921ed3f7fd679edb71abd9
* | [LSC] Add LOCAL_LICENSE_KINDS to device/google/bonitoBob Badour2021-03-151-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added SPDX-license-identifier-Apache-2.0 to: bonito/overlay_packages/SettingsOverlayG020A/Android.bp bonito/overlay_packages/SettingsOverlayG020B/Android.bp bonito/overlay_packages/SettingsOverlayG020C/Android.bp bonito/overlay_packages/SettingsOverlayG020D/Android.bp bootctrl/Android.bp dumpstate/Android.mk health/Android.bp keymaster/Android.bp pixelstats/Android.bp powerstats/Android.bp rro_overlays/WifiOverlay/Android.bp sargo/overlay_packages/SettingsOverlayG020E/Android.bp sargo/overlay_packages/SettingsOverlayG020E_VN/Android.bp sargo/overlay_packages/SettingsOverlayG020F/Android.bp sargo/overlay_packages/SettingsOverlayG020F_VN/Android.bp sargo/overlay_packages/SettingsOverlayG020G/Android.bp sargo/overlay_packages/SettingsOverlayG020G_VN/Android.bp sargo/overlay_packages/SettingsOverlayG020H/Android.bp sargo/overlay_packages/SettingsOverlayG020H_VN/Android.bp self-extractors/qcom/staging/Android.mk self-extractors_sargo/qcom/staging/Android.mk usb/Android.bp voice_processing/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-MIT legacy_unencumbered to: Android.bp Added SPDX-license-identifier-BSD to: gpt-utils/Android.bp sdm710/thermal-engine/Android.mk Added SPDX-license-identifier-MIT legacy_unencumbered to: json-c/Android.mk Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Id006dcce02a1efa9e10fd6fe383a39a8c25d1ce5
* Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)Xin Li2020-08-296-23/+61
|\ | | | | | | | | | | Bug: 166295507 Merged-In: I62d8804c8b70e4d8ec1dd12e4e10952fa069bfaf Change-Id: I85283f312c12ada3aff38b68cab65e6c8bd564ea
| * Update USB Gadget HAL to V1.1 implementationHoward Yen2020-02-196-22/+59
| | | | | | | | | | | | Bug: 138702846 Test: build pass, function works Change-Id: Ib4f0a05841608b7a6002ed480c9033e70fbd95d8
| * Merge "Enable MS OS descriptors for adb."Josh Gao2020-01-271-0/+2
| |\
| | * Enable MS OS descriptors for adb.Josh Gao2019-09-051-0/+2
| | | | | | | | | | | | | | | | | | Bug: http://b/68993980 Test: none Change-Id: I3e4a6aac27c5fd123b82ff27946dfe5a84dad4fb
| * | Remove libhwbinder/libhidltransport depsSteven Moreland2019-10-021-1/+0
| |/ | | | | | | | | | | | | | | Since these were combined into libhidlbase. Bug: 135686713 Test: build only (libhwbinder/libhidltransport are empty) Change-Id: If6735b9754a632d26ed8b06e879d6819039cae44
* / Usb: Update language to comply with Android's inclusive language guidanceKyle Tso2020-07-311-1/+1
|/ | | | | | | | | See https://source.android.com/setup/contribute/respectful-code for reference BUG=162536543 Change-Id: Ie0e8e86ce4d8b3c4eda4b4761b77e0fe8dd3964b
* UsbGadget: Fix switching functionsBadhri Jagan Sridharan2018-09-042-7/+32
| | | | | | | | | | | | | | | | | | | | Sleep only when time elapsed since the last disconnect is less than the PULL_UP_DELAY. This ensures that the hal does not miss the 2 second timeout while switching between functions. Also, enclose write within TEMP_FAILURE_RETRY to prevent being returned from EINTR. Bug: 113775439 Test: a. Switch between multiple functions. b. while true; do fastboot reboot; adb wait-for-device; adb shell getprop ro.bootmode; adb root; sleep 2; adb wait-for-device; adb reboot bootloader; done; Change-Id: Ic8c418c145e4fe070b407c22eef803e10ae41077 (cherry picked from commit 6aa47331376378baec051ccb846d28e85dee5f69) Signed-off-by: Howard Yen <howardyen@google.com>
* usb gadget: Introduce a delay between ep up and pull upBadhri Jagan Sridharan2018-09-041-10/+14
| | | | | | | | | | | | | | | adb root command fails occationally as the gadget gets pullep up too soon right after the end points show up. Introduce a delay to mitigate this. Bug: 113775439 Test: while true; do fastboot reboot; adb wait-for-device; adb shell getprop ro.bootmode; adb root; sleep 2; adb wait-for-device; adb reboot bootloader; done; Not adb root failures were seen. Change-Id: I3da6cac7c9d616da0c2fa88c8be998fe95a791a2 (cherry picked from commit 91d456d63cf3e2163f3cbbe0f36b4a6b60943475) Signed-off-by: Howard Yen <howardyen@google.com>
* Fix PTP mount pathpumahsu2018-08-281-2/+16
| | | | | | | | | | | | | (sync from commit:0c556bbbac9d3a2366d5d244cd5be720a42c0677) Ptp is now mounted in its own directory so the mtp endpoint does not need to be closed to write the ptp descriptors. Bug: 113145145 Test: Switch function between MTP/PTP/none Change-Id: Ib28a4e232e042ff2d6f49005ea12d3c7e64e7295 Signed-off-by: pumahsu <pumahsu@google.com> (cherry picked from commit da48caba738fcc31d5c391cff6674112d7949f9e)
* bonito and sargo: initial device supportRoger Liao2018-07-125-6/+6
| | | | | | Bug: 111163725 Change-Id: I00af3102379676cedf818caa2e86c5e1593a48da Signed-off-by: Roger Liao <rogerliao@google.com>
* Add audio_source combinations to usb halJerry Zhang2018-05-281-0/+26
| | | | | | | | | | This allows android auto and accessory hid to both work, and matches functionality on other device in O. Bug: 74172000 Test: auto starts Change-Id: I786cd66bed015c5ad2a4ca668f0d0fbc9c8af507
* Usb Gadget hal implementation for crosshatchrickyniu2018-05-281-2/+2
| | | | | | | | | | | (cherry-pick of commit: 5e309b924830644827182e039e915e5ba314a81f) Bug: 77927124 Test: Tested USB gadget configurations and verified that they enumerated. Change-Id: I780dee71e6410f316dc9b902b73c4214468f3762 Signed-off-by: rickyniu <rickyniu@google.com>
* Set VID/PID for diag functionsrickyniu2018-05-282-15/+101
| | | | | | | | | | | | | | | | | | | | | | | | persist.vendor.usb.config stores the vendor specific functions that are enabled in the target when ro.bootmode is set to usbradio through the adb command. Since its a persistent property, the oem functions are persisted once enabled. Alternatively, store the oem functions in vendor.usb.config. vendor.usb.config is not persisted though. vendor.usb.config will also reflect the enabled oem functions. Configurations supported in this CL: 1. diag 2. diag,serial_cdev,rmnet_gsi This would work irrespective of when ADB is not or not. (cherry-pick of commit: c5ec9e09d1e11b1f24b7519af505dd956d048631) Bug: 77927124 Test: Made sure the QXDM recognized crosshatch when adb is enabled/ disabled for diag and diag,serial_cdev,rmnet_gsi Change-Id: Ia3410ecc255f80014b53a634927164f8fe365419 Signed-off-by: rickyniu <rickyniu@google.com>
* Initialize booleansrickyniu2018-05-281-1/+3
| | | | | | | | | | | | Since mMonitorCreated wasnt initialized to false, join was called on the thread eventhough the thread didnt exist. (cherry-pick of commit: cb840d8de751e45daea008a7da912186a1884210) Bug: 77927124 Test: Booted asan and verified that adb was enabled. Change-Id: I6ff78b8d723892d2e33c2cdf99aa903a517e78c1 Signed-off-by: rickyniu <rickyniu@google.com>
* Usb Gadget hal implementation for crosshatchrickyniu2018-05-287-7/+614
| | | | | | | | | | | (cherry-pick of commit: 5e309b924830644827182e039e915e5ba314a81f) Bug: 77927124 Test: Tested USB gadget configurations and verified that they enumerated. Change-Id: I7be5f1df3a5e9edb8f7c60b82e48c31ed9e5cdde Signed-off-by: rickyniu <rickyniu@google.com>
* Fix potential racing by wall time change in USBhalWei Wang2018-04-122-8/+33
| | | | | | | | | | | pthread_cond_timedwait used wall time so it might introduce racing, pthread_cond_timedwait_monotonic_np is Android specific but it is being deprecated. And now Android support pthread_condattr_setclock so use it to wait on CLOCK_MONOTONIC instead. Bug: 64623895 Test: USB switch function works, charging/MTP/PTP Change-Id: I136533ff90ef1be2b042ef1e0829643f2f7aa968
* USB HAL: Use 1.1 IUsb intead of 1.0 IUsbBadhri Jagan Sridharan2018-04-122-2/+2
| | | | | | | | | | | | | Use 1.1 IUsb in order to make register the service as 1.1 compatible. This enables lshal to recognize the hal service as 1.1 implementation. Bug: 77853977 Bug: 62917546 Test: Manually verified lshal output android.hardware.usb@1.0::IUsb/default 0/1 782 6024 568 android.hardware.usb@1.1::IUsb/default 0/1 782 6024 568 Change-Id: I9b0817841dbcc345a1d854ee4a5193797181ea3f
* Use -Werror in device/google/crosshatchChih-Hung Hsieh2017-10-302-2/+1
| | | | | | | | | * Remove unused local variable. * Fix warning of unused return status value. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: If035c7870d3109ae27e51651054e74daa571439c
* Add 'vendor.' prefix to a vendor HAL service nameJaekyun Seok2017-08-311-1/+1
| | | | | | | | | | | To prevent property name collisions between properties of system and vendor, 'vendor.' prefix must be added to a vendor HAL service name. You can see the details in http://go/treble-sysprop-compatibility. Test: succeeded building, and confirmed that service names were renamed correctly. Bug: 36796459 Change-Id: I7c51123aa83b93b65208c8cfa1766fcc1af4b45b
* crosshatch: Re-add crosshatch, and switch to sdm845Chris Fries2017-06-274-5/+5
| | | | Change-Id: I303e8fe6be155c8c0d5385f5598c7f27c19282b1
* crosshatch: Reset to wahoo on master.Chris Fries2017-06-275-0/+862
commit dc78ac4aaa64e427c0f5c0672dc22939a9a7b85f Merge: 820b880 163a21c Author: Glenn Kasten <gkasten@google.com> Date: Tue Jun 27 15:12:54 2017 +0000 Merge "Report feature android.software.midi to enable testing" into oc-dr1-dev am: 614e203677 am: 163a21c15f Change-Id: I18876c0ce8e0435fdcb947d475c66fe7fae57da1 Change-Id: Id08e99f0603407199020818485eb29d92d421c43