mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-03 21:48:15 +00:00 
			
		
		
		
	gpio: mxc_gpio: change gpio index for i.MX8
Since the i.MX8 GPIO banks are indexed from 0 not 1 on other i.MX platforms, so we have to adjust the index accordingly. Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com>
This commit is contained in:
		
							parent
							
								
									9959d0f679
								
							
						
					
					
						commit
						e168eacde1
					
				@ -281,7 +281,10 @@ static int mxc_gpio_probe(struct udevice *dev)
 | 
			
		||||
	char name[18], *str;
 | 
			
		||||
 | 
			
		||||
	banknum = plat->bank_index;
 | 
			
		||||
	sprintf(name, "GPIO%d_", banknum + 1);
 | 
			
		||||
	if (IS_ENABLED(CONFIG_ARCH_IMX8))
 | 
			
		||||
		sprintf(name, "GPIO%d_", banknum);
 | 
			
		||||
	else
 | 
			
		||||
		sprintf(name, "GPIO%d_", banknum + 1);
 | 
			
		||||
	str = strdup(name);
 | 
			
		||||
	if (!str)
 | 
			
		||||
		return -ENOMEM;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user