diff options
author | Simon Glass <sjg@chromium.org> | 2017-05-30 21:47:09 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-06-01 07:03:10 -0600 |
commit | 150c5afe5bafa90e4fe398e59af32ad3cdbfe5b7 (patch) | |
tree | 15188b7974860d263fb7e5a0a19123a8897a63d4 /board/st/stm32f746-disco/stm32f746-disco.c | |
parent | 95795ad6cef37b29fcba5365860a8fa9c2f43898 (diff) |
dm: gpio: Add live tree support
Add support for requesting GPIOs with a live device tree.
This involves adjusting the function signature for the legacy function
gpio_request_by_name_nodev(), so fix up all callers.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes to stm32f746-disco.c:
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/st/stm32f746-disco/stm32f746-disco.c')
-rw-r--r-- | board/st/stm32f746-disco/stm32f746-disco.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c index aeaa31146a..7a6d93cb67 100644 --- a/board/st/stm32f746-disco/stm32f746-disco.c +++ b/board/st/stm32f746-disco/stm32f746-disco.c @@ -101,7 +101,7 @@ int board_late_init(void) if (node < 0) return -1; - gpio_request_by_name_nodev(gd->fdt_blob, node, "led-gpio", 0, &gpio, + gpio_request_by_name_nodev(offset_to_ofnode(node), "led-gpio", 0, &gpio, GPIOD_IS_OUT); if (dm_gpio_is_valid(&gpio)) { @@ -115,8 +115,8 @@ int board_late_init(void) if (node < 0) return -1; - gpio_request_by_name_nodev(gd->fdt_blob, node, "button-gpio", 0, &gpio, - GPIOD_IS_IN); + gpio_request_by_name_nodev(offset_to_ofnode(node), "button-gpio", 0, + &gpio, GPIOD_IS_IN); if (dm_gpio_is_valid(&gpio)) { if (dm_gpio_get_value(&gpio)) |