Lines Matching refs:newRole
229 bool switchMode(const hidl_string &portName, const PortRole &newRole, struct Usb *usb) { in switchMode() argument
230 std::string filename = appendRoleNodeHelper(std::string(portName.c_str()), newRole.type); in switchMode()
247 int ret = fputs(convertRoletoString(newRole).c_str(), fp); in switchMode()
306 Return<void> Usb::switchRole(const hidl_string &portName, const V1_0::PortRole &newRole) { in switchRole() argument
307 std::string filename = appendRoleNodeHelper(std::string(portName.c_str()), newRole.type); in switchRole()
319 ALOGI("filename write: %s role:%s", filename.c_str(), convertRoletoString(newRole).c_str()); in switchRole()
321 if (newRole.type == PortRoleType::MODE) { in switchRole()
322 roleSwitch = switchMode(portName, newRole, this); in switchRole()
326 int ret = fputs(convertRoletoString(newRole).c_str(), fp); in switchRole()
331 if (written == convertRoletoString(newRole)) { in switchRole()
347 portName, newRole, roleSwitch ? Status::SUCCESS : Status::ERROR); in switchRole()