From d40dd074e586dfaf7a51d9c160c006d198dfffd1 Mon Sep 17 00:00:00 2001 From: Jack Pham Date: Tue, 11 Apr 2023 00:22:46 -0700 Subject: [PATCH] sm8550-common: ueventd.qcom.rc: Reassign Type-C sysfs node ownership Assign the /sys/class/typec/port0 entries for data and power role switching to system / usb ownership to allow the USB HAL to run as non-root and write to these nodes. Change-Id: I6317a5e6ef99179570e87705cd43a8fa667f0d03 --- init/ueventd.qcom.rc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/init/ueventd.qcom.rc b/init/ueventd.qcom.rc index 2897091..8c09cad 100644 --- a/init/ueventd.qcom.rc +++ b/init/ueventd.qcom.rc @@ -1,7 +1,5 @@ # Copyright (c) 2012-2015, 2017-2021, The Linux Foundation. All rights reserved. # -# Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. -# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright @@ -468,6 +466,11 @@ subsystem mem_buf_vm /sys/class/dual_role_usb/* power_role 0660 system system /sys/class/dual_role_usb/* mode 0660 system system +/sys/class/typec/port0 data_role 0660 system usb +/sys/class/typec/port0 power_role 0660 system usb +/sys/class/typec/port0 port_type 0660 system usb +/sys/class/typec/port0-partner accessory_mode 0440 system usb + # USB Dynamic Disable /sys/bus/platform/devices/a600000.ssusb dynamic_disable 0220 root usb