[DO NOT MERGE] gs201: usb: provide extcon and gadget state to monitorffs am: bf79debcb2

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs201/+/20729654

Change-Id: I434a8b99b91895aedd025c03aad6a46191ee3104
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Ray Chi 2023-02-04 04:37:05 +00:00 committed by Automerger Merge Worker
commit eb86469ccc
2 changed files with 4 additions and 1 deletions

View file

@ -79,7 +79,9 @@ constexpr char kSmpAffinityList[] = "/smp_affinity_list";
#ifndef UDC_PATH #ifndef UDC_PATH
#define UDC_PATH "/sys/class/udc/11210000.dwc3/" #define UDC_PATH "/sys/class/udc/11210000.dwc3/"
#endif #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" #define SPEED_PATH UDC_PATH "current_speed"

View file

@ -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/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_b_sess
chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_id 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 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/power_role
chmod 664 /sys/class/typec/port0/data_role chmod 664 /sys/class/typec/port0/data_role