forked from mirrors/linux
		
	gpio: of: Make of_gpio_simple_xlate() private
Since commit 9a95e8d25a ("gpio: remove etraxfs driver"), there are
no more users of of_gpio_simple_xlate() outside gpiolib-of.c.
All GPIO drivers that need it now rely on of_gpiochip_add() setting it
up as the default translate function.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20190906084539.21838-3-geert+renesas@glider.be
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
			
			
This commit is contained in:
		
							parent
							
								
									c83d3c7733
								
							
						
					
					
						commit
						b0c7e73b51
					
				
					 2 changed files with 3 additions and 14 deletions
				
			
		| 
						 | 
					@ -637,8 +637,9 @@ static int of_gpiochip_scan_gpios(struct gpio_chip *chip)
 | 
				
			||||||
 * GPIO chips. This function performs only one sanity check: whether GPIO
 | 
					 * GPIO chips. This function performs only one sanity check: whether GPIO
 | 
				
			||||||
 * is less than ngpios (that is specified in the gpio_chip).
 | 
					 * is less than ngpios (that is specified in the gpio_chip).
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int of_gpio_simple_xlate(struct gpio_chip *gc,
 | 
					static int of_gpio_simple_xlate(struct gpio_chip *gc,
 | 
				
			||||||
			 const struct of_phandle_args *gpiospec, u32 *flags)
 | 
									const struct of_phandle_args *gpiospec,
 | 
				
			||||||
 | 
									u32 *flags)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * We're discouraging gpio_cells < 2, since that way you'll have to
 | 
						 * We're discouraging gpio_cells < 2, since that way you'll have to
 | 
				
			||||||
| 
						 | 
					@ -662,7 +663,6 @@ int of_gpio_simple_xlate(struct gpio_chip *gc,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return gpiospec->args[0];
 | 
						return gpiospec->args[0];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL(of_gpio_simple_xlate);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * of_mm_gpiochip_add_data - Add memory mapped GPIO chip (bank)
 | 
					 * of_mm_gpiochip_add_data - Add memory mapped GPIO chip (bank)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -61,10 +61,6 @@ static inline int of_mm_gpiochip_add(struct device_node *np,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc);
 | 
					extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern int of_gpio_simple_xlate(struct gpio_chip *gc,
 | 
					 | 
				
			||||||
				const struct of_phandle_args *gpiospec,
 | 
					 | 
				
			||||||
				u32 *flags);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#else /* CONFIG_OF_GPIO */
 | 
					#else /* CONFIG_OF_GPIO */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Drivers may not strictly depend on the GPIO support, so let them link. */
 | 
					/* Drivers may not strictly depend on the GPIO support, so let them link. */
 | 
				
			||||||
| 
						 | 
					@ -77,13 +73,6 @@ static inline int of_get_named_gpio_flags(struct device_node *np,
 | 
				
			||||||
	return -ENOSYS;
 | 
						return -ENOSYS;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline int of_gpio_simple_xlate(struct gpio_chip *gc,
 | 
					 | 
				
			||||||
				       const struct of_phandle_args *gpiospec,
 | 
					 | 
				
			||||||
				       u32 *flags)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return -ENOSYS;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif /* CONFIG_OF_GPIO */
 | 
					#endif /* CONFIG_OF_GPIO */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue