As the USB hal service is the root user, so it is the same user as the dual role sysfs node, and it is OK to change the sysfs node access mode dynamicly for PD. Otherwise the sysfs node will lose sysfs node mode update. Revert "Revert "usb: phy: dual-role: update sysfs attrs when changed"" This reverts commit 4dabf448ae341dd492b45eb0f82fdd77ee5ef584. Change-Id: Id3651703b4e250ac6af6cb3dc94d3ca328a3a259 Reviewed-on: https://gerrit.mot.com/1257104 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Wentao Xu <xuwt2@motorola.com> Reviewed-by: Lu Chai <chailu1@motorola.com> Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1413206 Reviewed-by: Huosheng Liao <liaohs@motorola.com> Reviewed-on: https://gerrit.mot.com/1536373 Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>