> +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

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to