]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: sunxi: Simplify dr_mode handling
authorHans de Goede <hdegoede@redhat.com>
Thu, 30 Jun 2016 17:12:32 +0000 (12:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Jul 2016 23:23:57 +0000 (08:23 +0900)
commit201d676055ca327a1668febf83c903a645342343
tree9a22ebc48dd5fc59fab92015a4994e8196baaf3a
parentf42ee4c5f0fbde11ee18767b675ea325c1126b70
usb: musb: sunxi: Simplify dr_mode handling

phy-sun4i-usb now has proper dr_mode handling, it always registers an
extcon, and sends a notify with the mode (even when in peripheral- /
host-only mode) at least once.

So we can simply the sunxi musb glue by always registering its extcon
notifier and relying on sunxi_musb_work() to enable vbus when in
host-only mode.

This also enables host- and peripheral-only mode with vbus monitoring.

Tested-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/sunxi.c