On Tuesday 24 January 2012 16:35:00 Mike Frysinger wrote: > On Monday 23 January 2012 01:20:16 Simon Glass wrote: > > On Fri, Jan 20, 2012 at 10:59 AM, Mike Frysinger wrote: > > > On Tuesday 10 January 2012 19:45:47 Simon Glass wrote: > > >> --- /dev/null > > >> +++ b/arch/sandbox/include/asm/gpio.h > > >> > > >> +int sandbox_gpio_get_value(int gp); > > > > > > why bother with parallel sandbox gpio API ? why can't we just > > > implement the gpio API directly and throw away sandbox_gpio_xxx ? > > > then we can also stub out sandbox/include/asm/gpio.h ... > > > > Because the current state of the GPIOs needs to be stored somewhere. > > Test code which wants a GPIO to appear to be high to U-Boot can call > > sandbox_gpio_set_value() and that value will be recorded and provided > > to future gpio_get_value() calls. > > > > Without this virtualisation, the driver would have no purpose. > > i'm not seeing it. why does external code need to reach into the guts at > all when we have a gpio API for them to use ?
ok, you clarified it for me, so now we just need some comments in asm/gpio.h explaining the expected users of the internal API -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot