mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Bo Shen <voice.shen@atmel.com>
To: s.hauer@pengutronix.de, plagnioj@jcrosoft.com
Cc: barebox@lists.infradead.org
Subject: [PATCH] usb: at91_udc: pass the vbus initial value
Date: Wed, 4 Feb 2015 18:19:04 +0800	[thread overview]
Message-ID: <1423045144-25714-1-git-send-email-voice.shen@atmel.com> (raw)

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@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2015-02-04 10:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04 10:19 Bo Shen [this message]
2015-02-04 11:55 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423045144-25714-1-git-send-email-voice.shen@atmel.com \
    --to=voice.shen@atmel.com \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox