android_kernel_xiaomi_sm8450/drivers/usb/musb
Ivaylo Dimitrov 60184b1437 usb: musb: remove extra check in musb_gadget_vbus_draw
[ Upstream commit ecec4b20d29c3d6922dafe7d2555254a454272d2 ]

The checks for musb->xceiv and musb->xceiv->set_power duplicate those in
usb_phy_set_power(), so there is no need of them. Moreover, not calling
usb_phy_set_power() results in usb_phy_set_charger_current() not being
called, so current USB config max current is not propagated through USB
charger framework and charger drivers may try to draw more current than
allowed or possible.

Fix that by removing those extra checks and calling usb_phy_set_power()
directly.

Tested on Motorola Droid4 and Nokia N900

Fixes: a9081a008f ("usb: phy: Add USB charger support")
Cc: stable <stable@kernel.org>
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Link: https://lore.kernel.org/r/1669400475-4762-1-git-send-email-ivo.g.dimitrov.75@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-14 10:15:09 +01:00
..
am35x.c
cppi_dma.c
cppi_dma.h
da8xx.c
davinci.c
davinci.h
jz4740.c
Kconfig usb: musb: select GENERIC_PHY instead of depending on it 2021-11-18 14:04:18 +01:00
Makefile
mediatek.c usb: musb: Fix an error message 2021-05-19 10:13:13 +02:00
musb_core.c usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling 2021-06-16 12:01:41 +02:00
musb_core.h
musb_cppi41.c
musb_debug.h
musb_debugfs.c
musb_dma.h
musb_dsps.c usb: musb: dsps: Fix the probe error path 2021-10-20 11:45:00 +02:00
musb_gadget_ep0.c
musb_gadget.c usb: musb: remove extra check in musb_gadget_vbus_draw 2023-01-14 10:15:09 +01:00
musb_gadget.h
musb_host.c
musb_host.h
musb_io.h
musb_regs.h
musb_trace.c
musb_trace.h
musb_virthub.c
musbhsdma.c
omap2430.c usb: musb: Fix missing of_node_put() in omap2430_probe 2022-06-14 18:32:31 +02:00
omap2430.h
sunxi.c
tusb6010_omap.c
tusb6010.c usb: musb: tusb6010: check return value after calling platform_get_resource() 2021-11-26 10:39:08 +01:00
tusb6010.h
ux500_dma.c
ux500.c