drivers/usbhost/husbhost_max3421e.c: Corret how VBUS power is controlled.

This commit is contained in:
Gregory Nutt
2018-07-14 08:50:08 -06:00
parent 29474a2b08
commit 38073a523a
6 changed files with 50 additions and 12 deletions
+11 -2
View File
@@ -4705,7 +4705,8 @@ max3421e_usbhost_initialize(FAR const struct max3421e_lowerhalf_s *lower)
int ret;
DEBUGASSERT(lower != NULL && lower->spi != NULL && lower->attach != NULL &&
lower->attach != NULL && lower->acknowledge != NULL);
lower->attach != NULL && lower->acknowledge != NULL &&
lower->power != NULL);
/* Allocate and instance of the MAX4321E state structure */
@@ -4737,7 +4738,15 @@ max3421e_usbhost_initialize(FAR const struct max3421e_lowerhalf_s *lower)
goto errout_with_alloc;
}
/* Enable interrupts at the interrupt controller */
/* Drive Vbus +5V (the smoke test).
*
* REVISIT: Should be done elsewhere in order to support device self-
* powered mode? How does the MAX3421E VBUS detect logic work?
*/
lower->power(lower, true);
/* Enable host interrupts */
lower->enable(lower, true);
return &conn->conn;