gpio: sandbox: Track whether a GPIO is driven
authorSimon Glass <sjg@chromium.org>
Fri, 5 Feb 2021 04:22:07 +0000 (21:22 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 3 Mar 2021 20:40:11 +0000 (15:40 -0500)
commitd638a183572dd58899250deb6b5ea2009ce05dc3
tree8f06253a12e4a364aa51092ca31423a6e97b3910
parentedab114775e91def9c1695518876e461f76a0e1f
gpio: sandbox: Track whether a GPIO is driven

Add a new flag to keep track of whether sandbox is driving the pin, or
whether it is expecting an input signal. If it is driving, then the value
of the pin is the value being driven (0 or 1). If not driving, then we
consider the value 0, since we don't currently handle things like pull-ups
yet.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
arch/sandbox/include/asm/gpio.h
drivers/gpio/sandbox.c