[U-Boot] General gpio interface?

Hi List,
am I right that there is no standard gpio interface in u-boot or did I miss it?
Regards Simon

On Tue, Jul 12, 2011 at 04:48, Simon Schwarz wrote:
am I right that there is no standard gpio interface in u-boot or did I miss it?
in general you missed it, but probably not your fault as i dont think it's documented :P. and not everyone supports it (yet).
the API being adopted is the same as Linux. asm/gpio.h provides: int gpio_request(unsigned gpio, const char *label) void gpio_free(unsigned gpio) int gpio_direction_input(unsigned gpio) int gpio_direction_output(unsigned gpio, int value) int gpio_get_value(unsigned gpio) void gpio_set_value(unsigned gpio, int value) int gpio_is_valid(int number)
it also optionally provides magic defines specific to your CPU so you can do something like gpio_request(GPIO_PF10) rather than gpio_request(14). -mike
participants (2)
-
Mike Frysinger
-
Simon Schwarz