From: Tom Rini Date: Thu, 4 Mar 2021 13:15:16 -0500 Subject: [PATCH v4 16/16] gpio: Add a way to read 3-way strapping pins In-Reply-To: <20210204212159.v4.16.Ie4275fd0feccfe9f875fc03df048c9d9d7effa0b@changeid> References: <20210205042210.2949365-1-sjg@chromium.org> <20210204212159.v4.16.Ie4275fd0feccfe9f875fc03df048c9d9d7effa0b@changeid> Message-ID: <20210304181516.GO1310@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Feb 04, 2021 at 09:22:09PM -0700, Simon Glass wrote: > 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 Applied to u-boot/next, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: