From b17381ae8446a54b2ebdf542c0cd73f61d26b0c3 Mon Sep 17 00:00:00 2001 From: Ray Chi Date: Wed, 14 Apr 2021 18:03:49 +0800 Subject: [PATCH 1/3] [DO NOT MERGE] gs201: usb: provide extcon and gadget state to monitorffs Monitorffs needs to check the state of usb extcon and gadget state to pull up USB gadget. Therefore, this patch provide extcon and gadget state to monitorffs. Bug: 263435622 Test: verified pass Change-Id: Iceaade6ed0060e4006405a29a81af3c5a1ab1b8b (cherry picked from commit bf79debcb284d985c4ac33d88aeb2d7b938acd9e) Merged-In: Iceaade6ed0060e4006405a29a81af3c5a1ab1b8b --- usb/gadget/UsbGadget.h | 4 +++- usb/gadget/android.hardware.usb.gadget-service.rc | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/usb/gadget/UsbGadget.h b/usb/gadget/UsbGadget.h index 61e6e798..f036c8e0 100644 --- a/usb/gadget/UsbGadget.h +++ b/usb/gadget/UsbGadget.h @@ -79,7 +79,9 @@ constexpr char kSmpAffinityList[] = "/smp_affinity_list"; #ifndef UDC_PATH #define UDC_PATH "/sys/class/udc/11210000.dwc3/" #endif -static MonitorFfs monitorFfs(kGadgetName); +constexpr char kExtconTypecState[] = "/sys/class/extcon/extcon0/cable.0/state"; +constexpr char kUsbGadgetState[] = "/sys/devices/platform/11210000.usb/dwc3_exynos_gadget_state"; +static MonitorFfs monitorFfs(kGadgetName, kExtconTypecState, kUsbGadgetState); #define SPEED_PATH UDC_PATH "current_speed" diff --git a/usb/gadget/android.hardware.usb.gadget-service.rc b/usb/gadget/android.hardware.usb.gadget-service.rc index e3c3b0db..0395862d 100644 --- a/usb/gadget/android.hardware.usb.gadget-service.rc +++ b/usb/gadget/android.hardware.usb.gadget-service.rc @@ -10,6 +10,7 @@ on post-fs chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_b_sess chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_id + chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_gadget_state chown root system /sys/devices/platform/11210000.usb/usb_data_enabled chmod 664 /sys/class/typec/port0/power_role chmod 664 /sys/class/typec/port0/data_role From 714ff42ac82d15091d6d418f1c497e5a9b0b71d0 Mon Sep 17 00:00:00 2001 From: kadirpili Date: Thu, 23 Mar 2023 02:50:09 +0000 Subject: [PATCH 2/3] gs201: Create folder for OTA UECap Bug: 274737512 Change-Id: Ic2bd29d2f8a36fe8b432cf567aded0e9f27c8925 --- conf/init.modem.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/init.modem.rc b/conf/init.modem.rc index 96ed0678..6c89e3b2 100644 --- a/conf/init.modem.rc +++ b/conf/init.modem.rc @@ -16,6 +16,9 @@ on post-fs-data # Modem MDS log folder mkdir /data/vendor/radio/mds 0771 radio system + # Modem OTA UECap folder + mkdir /data/vendor/radio/ota_uecap 0773 radio system + # Unzipped modem images folder mkdir /data/vendor/radio/image 0771 radio system From 21cea1d88eb8fcc094bea3bb08fd79a2f64e02fa Mon Sep 17 00:00:00 2001 From: Minchan Kim Date: Tue, 11 Apr 2023 16:44:57 +0000 Subject: [PATCH 3/3] remove dump_gs201 The event trace dumping moved into gs-common. Bug: 276901078 Test: dumpstate_board.txt on adb bugreport includes the info Change-Id: I4d0f0886ef9292f854c1009a80ba525347aa45a0 Signed-off-by: Minchan Kim --- dumpstate/Android.bp | 16 ---------------- dumpstate/dump_gs201.cpp | 22 ---------------------- 2 files changed, 38 deletions(-) delete mode 100644 dumpstate/dump_gs201.cpp diff --git a/dumpstate/Android.bp b/dumpstate/Android.bp index bcddbb6d..a325151d 100644 --- a/dumpstate/Android.bp +++ b/dumpstate/Android.bp @@ -8,19 +8,3 @@ sh_binary { vendor: true, sub_dir: "dump", } - -cc_binary { - name: "dump_gs201", - srcs: ["dump_gs201.cpp"], - cflags: [ - "-Wall", - "-Wextra", - "-Werror", - ], - shared_libs: [ - "libdump", - ], - vendor: true, - relative_install_path: "dump", -} - diff --git a/dumpstate/dump_gs201.cpp b/dumpstate/dump_gs201.cpp deleted file mode 100644 index 062f4ded..00000000 --- a/dumpstate/dump_gs201.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2022 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include - -// Dump gs201 info -int main() { - dumpFileContent("Pixel trace", "/sys/kernel/tracing/instances/pixel/trace"); - return 0; -}