diff options
author | Simon Glass | 2017-05-30 21:47:09 -0600 |
---|---|---|
committer | Simon Glass | 2017-06-01 07:03:10 -0600 |
commit | 150c5afe5bafa90e4fe398e59af32ad3cdbfe5b7 (patch) | |
tree | 15188b7974860d263fb7e5a0a19123a8897a63d4 /board/qualcomm/dragonboard410c/dragonboard410c.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/qualcomm/dragonboard410c/dragonboard410c.c')
-rw-r--r-- | board/qualcomm/dragonboard410c/dragonboard410c.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c index e923ddc2e27..37d0b85e0ea 100644 --- a/board/qualcomm/dragonboard410c/dragonboard410c.c +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c @@ -53,8 +53,8 @@ int board_prepare_usb(enum usb_init_type type) printf("Failed to find usb_hub_reset_pm dt node.\n"); return node; } - ret = gpio_request_by_name_nodev(gd->fdt_blob, node, "gpios", 0, - &hub_reset, 0); + ret = gpio_request_by_name_nodev(offset_to_ofnode(node), + "gpios", 0, &hub_reset, 0); if (ret < 0) { printf("Failed to request usb_hub_reset_pm gpio.\n"); return ret; @@ -69,8 +69,8 @@ int board_prepare_usb(enum usb_init_type type) printf("Failed to find usb_sw_sel_pm dt node.\n"); return 0; } - ret = gpio_request_by_name_nodev(gd->fdt_blob, node, "gpios", 0, - &usb_sel, 0); + ret = gpio_request_by_name_nodev(offset_to_ofnode(node), + "gpios", 0, &usb_sel, 0); if (ret < 0) { printf("Failed to request usb_sw_sel_pm gpio.\n"); return ret; @@ -121,8 +121,8 @@ int misc_init_r(void) return 0; } - if (gpio_request_by_name_nodev(gd->fdt_blob, node, "gpios", 0, &resin, - 0)) { + if (gpio_request_by_name_nodev(offset_to_ofnode(node), "gpios", 0, + &resin, 0)) { printf("Failed to request key_vol_down button.\n"); return 0; } |