]> git.baikalelectronics.ru Git - uboot.git/commit
gpio: Add a simple GPIO API for SPL
authorSimon Glass <sjg@chromium.org>
Mon, 21 Jan 2019 21:53:21 +0000 (14:53 -0700)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Fri, 1 Feb 2019 15:59:12 +0000 (16:59 +0100)
commit2cffc2bb81a1695fb9b82b1baab51071e19ee59e
treeca8627bed692af68d73aa2bd5f9f3a6ffef9d071
parent6c20e64f241adddc985e2d2eab6b42b536b7bb1c
gpio: Add a simple GPIO API for SPL

In space-constrained environments or before driver model is available, it
is sometimes necessary to set GPIO values. Add an SPL API for this, to
allow early board code to change GPIOs. The caller must provide the
register address, so that the drivers can be fairly generic.

This API can be implemented by GPIO drivers, behind a suitable guard,
like #ifdef CONFIG_SPL_BUILD.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
include/spl_gpio.h [new file with mode: 0644]