kernel/eka/drivers/usbcc/ps_usbc.cpp
branchRCL_3
changeset 21 e7d2d738d3c2
parent 19 4a8fed1c0ef6
child 22 2f92ad2dc5db
equal deleted inserted replaced
20:597aaf25e343 21:e7d2d738d3c2
   178 		// (If the hardware is NOT activated at this point, we can only be in
   178 		// (If the hardware is NOT activated at this point, we can only be in
   179 		//	state EUsbcDeviceStateAttached, so we don't have to move to it.)
   179 		//	state EUsbcDeviceStateAttached, so we don't have to move to it.)
   180 		}
   180 		}
   181 	DeActivateHardwareController();					 // turn off UDC altogether
   181 	DeActivateHardwareController();					 // turn off UDC altogether
   182 	iStackIsActive = EFalse;
   182 	iStackIsActive = EFalse;
       
   183 	// Notify registered clients on the user side about a USB device state
       
   184 	// change event and a transition to the "Undefined" state.
       
   185 	// Note: the state should be changed to "Undefined" before calling RunClientCallbacks(), 
       
   186 	//       otherwise the "Undefined" state will probably be lost.
       
   187 	NextDeviceState(EUsbcDeviceStateUndefined);
   183 	// Complete all pending requests, returning KErrDisconnected
   188 	// Complete all pending requests, returning KErrDisconnected
   184 	RunClientCallbacks();
   189 	RunClientCallbacks();
   185 	// Notify registered clients on the user side about a USB device state
       
   186 	// change event and a transition to the "Undefined" state.
       
   187 	NextDeviceState(EUsbcDeviceStateUndefined);
       
   188 	}
   190 	}
   189 
   191 
   190 
   192 
   191 /** To be called by the OTG/Host stack in an OTG setup to enable USB device
   193 /** To be called by the OTG/Host stack in an OTG setup to enable USB device
   192 	functionality.
   194 	functionality.