mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 10:26:10 +01:00 
			
		
		
		
	<common.h> pulls in a lot of bloat. <common.h> is unneeded in most of places. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
		
			
				
	
	
		
			31 lines
		
	
	
		
			580 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			580 B
		
	
	
	
		
			C
		
	
	
	
	
	
| // SPDX-License-Identifier: GPL-2.0+
 | |
| /*
 | |
|  * Copyright (C) 2016 Socionext Inc.
 | |
|  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
 | |
|  */
 | |
| 
 | |
| #include <linux/errno.h>
 | |
| #include <dm.h>
 | |
| #include <dm/pinctrl.h>
 | |
| 
 | |
| #include "init.h"
 | |
| 
 | |
| int uniphier_pin_init(const char *pinconfig_name)
 | |
| {
 | |
| 	struct udevice *pctldev, *config;
 | |
| 	int ret;
 | |
| 
 | |
| 	ret = uclass_first_device(UCLASS_PINCTRL, &pctldev);
 | |
| 	if (ret)
 | |
| 		return ret;
 | |
| 
 | |
| 	device_foreach_child(config, pctldev) {
 | |
| 		if (strcmp(config->name, pinconfig_name))
 | |
| 			continue;
 | |
| 
 | |
| 		return pinctrl_generic_set_state(pctldev, config);
 | |
| 	}
 | |
| 
 | |
| 	return -ENODEV;
 | |
| }
 |