forked from mirrors/linux
		
	usb: cdns3: core: quit if it uses role switch class
If the board uses role switch class for switching the role, it should not depends on SoC OTG hardware siginal any more, so quit early. Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
This commit is contained in:
		
							parent
							
								
									a609ce2a13
								
							
						
					
					
						commit
						50642709f6
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -280,6 +280,10 @@ int cdns3_hw_role_switch(struct cdns3 *cdns) | ||||||
| 	enum usb_role real_role, current_role; | 	enum usb_role real_role, current_role; | ||||||
| 	int ret = 0; | 	int ret = 0; | ||||||
| 
 | 
 | ||||||
|  | 	/* Depends on role switch class */ | ||||||
|  | 	if (cdns->role_sw) | ||||||
|  | 		return 0; | ||||||
|  | 
 | ||||||
| 	pm_runtime_get_sync(cdns->dev); | 	pm_runtime_get_sync(cdns->dev); | ||||||
| 
 | 
 | ||||||
| 	current_role = cdns->role; | 	current_role = cdns->role; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Peter Chen
						Peter Chen