gs101: usb: remove flag "OLDER_GADGET"

The flag "OLDER_GADGET" is no need.
Using "11110000.dwc3" be the udc name.

Test: Build Pass and boot to home
Bug: 177879761
Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I43c9e2815a6384c4dffdc47312fa0f372b34d9e9
This commit is contained in:
Ricky Niu 2021-03-31 15:54:30 +08:00 committed by Saravana Kannan
parent f2eb39f4d6
commit 88313cf20b
7 changed files with 1 additions and 54 deletions

View file

@ -398,7 +398,6 @@ BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true
include device/google/gs101-sepolicy/gs101-sepolicy.mk include device/google/gs101-sepolicy/gs101-sepolicy.mk
-include device/google/gs101/soong/pixel_soong_config.mk
# Battery options # Battery options
BOARD_KERNEL_CMDLINE += at24.write_timeout=100 BOARD_KERNEL_CMDLINE += at24.write_timeout=100

View file

@ -335,8 +335,6 @@ endif
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.usb@1.3-service.gs101 android.hardware.usb@1.3-service.gs101
OLDER_GADGET := false
# MIDI feature # MIDI feature
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml

View file

@ -1,19 +0,0 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "//device/google/gs101:device_google_gs101_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/gs101:device_google_gs101_license",
],
}
soong_config_module_type {
name: "pixel_usbgadget_cc_defaults",
module_type: "cc_defaults",
config_namespace: "usb",
bool_variables: ["older_gadget"],
properties: ["cflags"],
}

View file

@ -1,8 +0,0 @@
# Add pixel common soong config here.
# Set the variables properly in ProductConfig Makefiles for each pixel device
#For USB
SOONG_CONFIG_NAMESPACES += usb
SOONG_CONFIG_usb += older_gadget
SOONG_CONFIG_usb_older_gadget := $(OLDER_GADGET)

View file

@ -24,20 +24,6 @@ package {
], ],
} }
soong_config_module_type_import {
from: "device/google/gs101/soong/Android.bp",
module_types: ["pixel_usbgadget_cc_defaults"],
}
pixel_usbgadget_cc_defaults {
name: "pixel_usbgadget",
soong_config_variables: {
older_gadget: {
cflags: ["-DOLDER_GADGET"],
},
},
}
cc_binary { cc_binary {
name: "android.hardware.usb@1.3-service.gs101", name: "android.hardware.usb@1.3-service.gs101",
relative_install_path: "hw", relative_install_path: "hw",
@ -48,7 +34,6 @@ cc_binary {
], ],
srcs: ["service.cpp", "Usb.cpp", "UsbGadget.cpp"], srcs: ["service.cpp", "Usb.cpp", "UsbGadget.cpp"],
cflags: ["-Wall", "-Werror"], cflags: ["-Wall", "-Werror"],
defaults: ["pixel_usbgadget"],
shared_libs: [ shared_libs: [
"libbase", "libbase",
"libhidlbase", "libhidlbase",

View file

@ -66,13 +66,8 @@ enum class HALVersion{
V1_3 V1_3
}; };
#ifdef OLDER_GADGET
constexpr char kGadgetName[] = "11110000.dwc3"; constexpr char kGadgetName[] = "11110000.dwc3";
#define UDC_PATH "/sys/class/udc/11110000.dwc3/" #define UDC_PATH "/sys/class/udc/11110000.dwc3/"
#else
constexpr char kGadgetName[] = "11110000.usb";
#define UDC_PATH "/sys/class/udc/11110000.usb/"
#endif
#define ID_PATH UDC_PATH "device/id" #define ID_PATH UDC_PATH "device/id"
#define VBUS_PATH UDC_PATH "device/b_sess" #define VBUS_PATH UDC_PATH "device/b_sess"

View file

@ -70,12 +70,9 @@ using ::android::hardware::usb::gadget::V1_2::IUsbGadget;
using ::android::hardware::usb::gadget::V1_2::GadgetFunction; using ::android::hardware::usb::gadget::V1_2::GadgetFunction;
using ::std::string; using ::std::string;
#ifdef OLDER_GADGET
constexpr char kGadgetName[] = "11110000.dwc3"; constexpr char kGadgetName[] = "11110000.dwc3";
#ifndef UDC_PATH
#define UDC_PATH "/sys/class/udc/11110000.dwc3/" #define UDC_PATH "/sys/class/udc/11110000.dwc3/"
#else
constexpr char kGadgetName[] = "11110000.usb";
#define UDC_PATH "/sys/class/udc/11110000.usb/"
#endif #endif
static MonitorFfs monitorFfs(kGadgetName); static MonitorFfs monitorFfs(kGadgetName);