[patch 1/2] Add dt_compat field to struct gpio_chip

Grant Likely grant.likely at secretlab.ca
Thu Apr 7 13:17:04 EDT 2011


On Thu, Apr 07, 2011 at 06:39:30PM +0200, Domenico Andreoli wrote:
> From: Domenico Andreoli <cavokz at gmail.com>
> 
> This new field allows easy creation of GPIO chips in base of struct arrays.
> 
> Signed-off-by: Domenico Andreoli <cavokz at gmail.com>
> 
> ---
>  drivers/of/gpio.c          |    3 +++
>  include/asm-generic/gpio.h |    1 +
>  2 files changed, 4 insertions(+)
> 
> Index: b/drivers/of/gpio.c
> ===================================================================
> --- a/drivers/of/gpio.c	2011-04-07 18:19:20.000000000 +0200
> +++ b/drivers/of/gpio.c	2011-04-07 18:20:31.000000000 +0200
> @@ -212,6 +212,9 @@
>  
>  void of_gpiochip_add(struct gpio_chip *chip)
>  {
> +	if ((!chip->of_node) && (chip->dt_compat))
> +		chip->of_node = of_find_compatible_node(NULL, NULL, chip->dt_compat);
> +

Hi Domenico,

Thanks for looking at this.

However, I think there is a better way to solve this problem,



More information about the linux-arm-kernel mailing list