mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
3669e0e759
At present U-Boot sort-of supports the standard way of reading GPIOs from device tree nodes, but the support is incomplete, a bit clunky and only works for GPIO bindings where #gpio-cells is 2. Add new functions to request GPIOs, taking full account of the device tree binding. These permit requesting a GPIO with a simple call like: gpio_request_by_name(dev, "cd-gpios", 0, &desc, GPIOD_IS_IN); This will request the GPIO, looking at the device's node which might be this, for example: cd-gpios = <&gpio TEGRA_GPIO(B, 3) GPIO_ACTIVE_LOW>; The GPIO will be set to input mode in this case and polarity will be honoured by the GPIO calls. It is also possible to request and free a list of GPIOs. Signed-off-by: Simon Glass <sjg@chromium.org> |
||
---|---|---|
.. | ||
.gitignore | ||
bus.c | ||
cmd_dm.c | ||
core.c | ||
gpio.c | ||
i2c.c | ||
Makefile | ||
sf.c | ||
spi.c | ||
test-dm.sh | ||
test-driver.c | ||
test-fdt.c | ||
test-main.c | ||
test-uclass.c | ||
test.dts | ||
ut.c |