]> git.karo-electronics.de Git - karo-tx-uboot.git/commit
musb: Allow musb_platform_enable to return an error code
authorHans de Goede <hdegoede@redhat.com>
Wed, 17 Jun 2015 19:33:54 +0000 (21:33 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:48:57 +0000 (13:48 +0200)
commit0adaed329527afe0add3f40d9cd60ef68047710a
tree7a236b1ca456b28aa664315077df4d839b1f4c3e
parent93a474518e4a0cee259b8a382e7dcd34a6ba7526
musb: Allow musb_platform_enable to return an error code

Allow musb_platform_enable to return an error code and propagate it up to
usb_lowlevel_init().

This allows moving the checks for an external vbus being present to be
moved from platform_init to platform_enable, so that the user can unplug a
charger, plug in a host adapter with a usb-device, do a "usb reset" and
have things working.

This also allows adding a check for the id-pin to platform_enable, so that
it can short circuit the 1s delay in usb_lowlevel_init() when no host cable
is plugged in and thus waiting for a device to show up is useless.

Note that all the changes to code shared with the kernel are wrapped in
the kernel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/usb/musb-new/am35x.c
drivers/usb/musb-new/musb_core.c
drivers/usb/musb-new/musb_core.h
drivers/usb/musb-new/musb_dsps.c
drivers/usb/musb-new/musb_uboot.c
drivers/usb/musb-new/omap2430.c
drivers/usb/musb-new/sunxi.c