aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-vf.c
diff options
context:
space:
mode:
authorSimon Glass2017-05-30 21:47:09 -0600
committerSimon Glass2017-06-01 07:03:10 -0600
commit150c5afe5bafa90e4fe398e59af32ad3cdbfe5b7 (patch)
tree15188b7974860d263fb7e5a0a19123a8897a63d4 /drivers/usb/host/ehci-vf.c
parent95795ad6cef37b29fcba5365860a8fa9c2f43898 (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 'drivers/usb/host/ehci-vf.c')
-rw-r--r--drivers/usb/host/ehci-vf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index e52cd6ad328..a7f6f21fa2c 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -252,8 +252,9 @@ static int vf_usb_ofdata_to_platdata(struct udevice *dev)
}
if (priv->dr_mode == DR_MODE_OTG) {
- gpio_request_by_name_nodev(dt_blob, node, "fsl,cdet-gpio", 0,
- &priv->cdet_gpio, GPIOD_IS_IN);
+ gpio_request_by_name_nodev(offset_to_ofnode(node),
+ "fsl,cdet-gpio", 0, &priv->cdet_gpio,
+ GPIOD_IS_IN);
if (dm_gpio_is_valid(&priv->cdet_gpio)) {
if (dm_gpio_get_value(&priv->cdet_gpio))
priv->init_type = USB_INIT_DEVICE;