-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update USB HAL to V1.3 implementation
Supports to enable/disable USB data signaling Bug: 161414036 Test: Pass USB V1.3 HIDL tests Signed-off-by: Albert Wang <[email protected]> Change-Id: I370e69264bec6c2c7ac61094db49f5e3a4b317b6
- Loading branch information
Albert Wang
committed
Mar 24, 2021
1 parent
c991432
commit 89dfe03
Showing
9 changed files
with
127 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,3 +120,11 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.po | |
# Remove generic atrace HAL | ||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/[email protected]) | ||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/[email protected]) | ||
|
||
# Update to USB HAL 1.3 | ||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/[email protected]) | ||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/[email protected]) | ||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/[email protected]) | ||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/[email protected]) | ||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/[email protected]) | ||
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/[email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -451,7 +451,7 @@ PRODUCT_COPY_FILES += \ | |
device/google/sunfish/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf | ||
|
||
PRODUCT_PACKAGES += \ | ||
android.hardware.usb@1.2-service.sunfish | ||
android.hardware.usb@1.3-service.sunfish | ||
|
||
PRODUCT_PACKAGES += \ | ||
[email protected] \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Copyright (C) 2018 The Android Open Source Project | ||
// Copyright (C) 2021 The Android Open Source Project | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
|
@@ -18,18 +18,19 @@ package { | |
} | ||
|
||
cc_binary { | ||
name: "android.hardware.usb@1.2-service.sunfish", | ||
name: "android.hardware.usb@1.3-service.sunfish", | ||
relative_install_path: "hw", | ||
init_rc: ["android.hardware.usb@1.2-service.sunfish.rc"], | ||
init_rc: ["android.hardware.usb@1.3-service.sunfish.rc"], | ||
vintf_fragments: [ | ||
"android.hardware.usb@1.2-service.sunfish.xml", | ||
"android.hardware.usb@1.3-service.sunfish.xml", | ||
"[email protected]", | ||
], | ||
srcs: ["service.cpp", "Usb.cpp", "UsbGadget.cpp"], | ||
shared_libs: [ | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
service vendor.usb-hal-1-3 /vendor/bin/hw/[email protected] | ||
class hal | ||
user root | ||
group root system shell mtp | ||
|
||
on boot | ||
chown root system /sys/class/typec/port0/power_role | ||
chown root system /sys/class/typec/port0/data_role | ||
chown root system /sys/class/typec/port0/port_type | ||
chmod 664 /sys/class/typec/port0/power_role | ||
chmod 664 /sys/class/typec/port0/data_role | ||
chmod 664 /sys/class/typec/port0/port_type | ||
chmod 664 /sys/class/power_supply/usb/moisture_detection_enabled | ||
|
||
on post-fs | ||
chown root system /sys/devices/platform/soc/a600000.ssusb/id | ||
chown root system /sys/devices/platform/soc/a600000.ssusb/b_sess | ||
chown root system /sys/devices/platform/soc/a600000.ssusb/usb_data_enabled | ||
chmod 664 /sys/devices/platform/soc/a600000.ssusb/id | ||
chmod 664 /sys/devices/platform/soc/a600000.ssusb/b_sess | ||
chmod 664 /sys/devices/platform/soc/a600000.ssusb/usb_data_enabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters