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
..
2014-12-11 13:18:43 -07:00
2014-07-30 08:48:03 -04:00
2015-01-05 15:13:46 -05:00
2014-07-18 19:42:16 +01:00
2015-01-22 12:34:56 +01:00
2015-01-14 11:35:43 -05:00
2014-11-21 08:13:17 +01:00
2014-10-06 17:34:40 +02:00
2014-10-25 15:27:36 -04:00
2014-11-19 08:48:41 +01:00
2014-12-05 08:06:15 -08:00
2015-01-21 10:25:02 +01:00
2014-11-19 08:48:42 +01:00
2014-12-11 13:18:43 -07:00
2014-12-11 13:18:42 -07:00
2014-10-25 15:27:37 -04:00
2015-01-14 11:37:39 -05:00
2014-10-22 16:56:41 -06:00
2015-01-06 10:10:04 +02:00
2015-01-23 17:24:15 -07:00
2015-01-23 17:24:54 -07:00
2015-01-05 12:08:55 -05:00
2015-01-16 09:32:11 -08:00
2014-11-24 12:00:00 +01:00
2014-10-22 10:36:50 -06:00
2014-12-13 15:08:04 -07:00
2014-12-31 19:10:13 +01:00
2015-01-18 12:31:36 +01:00
2015-01-21 10:25:53 +01:00