u-boot-brain/arch/sandbox
Simon Glass 8a45b22057 gpio: Add a way to read 3-way strapping pins
Using the internal vs. external pull resistors it is possible to get
27 different combinations from 3 strapping pins. Add an implementation
of this.

This involves updating the sandbox GPIO driver to model external and
(weaker) internal pull resistors. The get_value() method now takes account
of what is driving a pin:

   sandbox: GPIOD_EXT_DRIVEN - in which case GPIO_EXT_HIGH provides the
          value
   outside source - in which case GPIO_EXT_PULL_UP/DOWN indicates the
          external state and we work the final state using those flags and
          the internal GPIOD_PULL_UP/DOWN flags

Of course the outside source does not really exist in sandbox. We are just
modelling it for test purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-03 15:40:47 -05:00
..
cpu sandbox: Write out bloblist when exiting 2021-03-02 15:53:37 -05:00
dts - adds adc-keys button driver 2021-02-22 12:37:02 -05:00
include/asm gpio: Add a way to read 3-way strapping pins 2021-03-03 15:40:47 -05:00
lib common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
config.mk sandbox: sdl: Move to use SDL2 2020-02-05 19:33:46 -07:00
Kconfig sandbox: add handler for exceptions 2020-12-13 07:58:17 -07:00
Makefile sandbox: Use 'extras' to specify 'head' files 2018-12-05 06:01:34 -07:00