> Agreed. So we need an gpio_core.c / .h which defines the following > functions (just a proposal):
Yes. > typedef struct gpio_adapter { > int (*init_pin)(int pin); > int (*set)(int pin, value); > int (*get)(int pin); > int (*dir)(int pin, int direction); > int (*level)(int pin, int level); > } I don't understand the init_pin function, nor what "level" is. Actually, even "dir" can be dropped: a get configures as input, a set configures as output, the extra instruction is very little overhead. But an alternate function configuration is definitely needed: everybody has alternate functions associated to the pins. Just say "0" is gpio and 1...n is SoC-specific. So, are you going to write it? Or should someone else do that? thanks /alessandro _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot