u-boot/test/dm
Simon Glass 3669e0e759 dm: gpio: Add better functions to request GPIOs
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>
2015-01-29 17:09:51 -07:00
..
.gitignore dm: Add basic tests 2014-03-04 12:15:29 -05:00
bus.c dm: core: Add functions for iterating through device children 2014-10-22 10:36:45 -06:00
cmd_dm.c dm_test: improve the appearance shown by "dm tree" command 2014-12-11 13:18:41 -07:00
core.c test: dm: Support memory leak checking as a core feature 2014-10-23 19:29:53 -06:00
gpio.c dm: gpio: Add better functions to request GPIOs 2015-01-29 17:09:51 -07:00
i2c.c dm: i2c: Add tests for I2C 2014-12-11 13:18:43 -07:00
Makefile dm: i2c: Add tests for I2C 2014-12-11 13:18:43 -07:00
sf.c sandbox: Correct ordering of 'sb save' commands 2015-01-14 11:35:43 -05:00
spi.c dm: spi: Add tests 2014-10-22 10:36:51 -06:00
test-dm.sh dm: spi: Add tests 2014-10-22 10:36:51 -06:00
test-driver.c dm: Allow drivers to be marked 'before relocation' 2014-07-23 14:07:24 +01:00
test-fdt.c dm: Provide a function to scan child FDT nodes 2014-07-23 14:08:36 +01:00
test-main.c test: dm: Support memory leak checking as a core feature 2014-10-23 19:29:53 -06:00
test-uclass.c dm: rename device struct to udevice 2014-05-27 10:21:32 -04:00
test.dts dm: gpio: Add better functions to request GPIOs 2015-01-29 17:09:51 -07:00
ut.c dm: Add basic tests 2014-03-04 12:15:29 -05:00