[PATCH] usb: at91_udc: pass the vbus initial value

Bo Shen voice.shen at atmel.com
Wed Feb 4 02:19:04 PST 2015


If without pass the vbus initial value, the vbus status alway
present as 0 even if the vbus is connected to 5v.

Signed-off-by: Bo Shen <voice.shen at atmel.com>
---

 drivers/usb/gadget/at91_udc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 60e1ff7..b36ef19 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1464,6 +1464,8 @@ static int __init at91udc_probe(struct device_d *dev)
 		DBG(udc, "VBUS detection: host:%s \n",
 			udc->vbus ? "present":"absent");
 
+		udc->gpio_vbus_val = udc->vbus;
+
 		dev_add_param_bool(dev, "vbus",
 			at91_udc_vbus_set, NULL, &udc->gpio_vbus_val, udc);
 	} else {
-- 
2.3.0.rc0




More information about the barebox mailing list