Subject: Re: [PATCH 1/4] [POWERPC] Implement GPIO API embryo

From: Segher Boessenkool <[email-masked]>
Date: Sun, 23 Dec 2007 03:49:30 +0100

> +int __of_parse_gpio_bank_pin(struct device_node *np, int index,
> +			     int bank_width, int max_bank)
> +{
> +	int bank;
> +	int pin;
> +	const u32 *gpios;
> +
> +	/*
> +	 * We can get there only if of_get_gpio() succeeded, thus
> +	 * no need checking for "gpios" existence.
> +	 */
> +	gpios = of_get_property(np, "gpios", NULL);
> +	bank = gpios[index * 2];
> +	pin = gpios[index * 2 + 1];

If you stick with the #gpio-cells plan, here is where you should use it.

Segher