| efa677fb | 23-Jun-2015 |
Simon Glass <sjg@chromium.org> |
dm: gpio: Add dm_gpio_request() to manually request a GPIO
This function can be used for testing to manually request a GPIO for use, without resorting to the legacy GPIO API.
Signed-off-by: Simon G
dm: gpio: Add dm_gpio_request() to manually request a GPIO
This function can be used for testing to manually request a GPIO for use, without resorting to the legacy GPIO API.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 5d1c17e9 | 06-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: gpio: Mark the old GPIO API deprecated
Add a deprecation notice to each function so that it is more obvious that we are moving GPIOs to driver model.
Signed-off-by: Simon Glass <sjg@chromium.or
dm: gpio: Mark the old GPIO API deprecated
Add a deprecation notice to each function so that it is more obvious that we are moving GPIOs to driver model.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 3669e0e7 | 06-Jan-2015 |
Simon Glass <sjg@chromium.org> |
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 work
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>
show more ...
|
| 0dac4d51 | 06-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: gpio: Add a driver GPIO translation method
Only the GPIO driver knows about the full GPIO device tree binding used by a device. Add a method to allow the driver to provide this information to th
dm: gpio: Add a driver GPIO translation method
Only the GPIO driver knows about the full GPIO device tree binding used by a device. Add a method to allow the driver to provide this information to the uclass, including the GPIO offset within the device and flags such as the polarity.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|