android_kernel_xiaomi_sm8450/drivers/usb
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
..
atm
c67x00
cdns3 usb: cdns3: Add support for DRD CDNSP 2022-12-02 17:40:03 +01:00
chipidea usb: chipidea: fix deadlock in ci_otg_del_timer 2022-11-25 17:45:51 +01:00
class USB: cdc-acm: Add Icom PMR F3400 support (0c26:0020) 2022-09-08 11:11:39 +02:00
common usb: common: debug: Check non-standard control requests 2022-10-26 13:25:31 +02:00
core usb: add NO_LPM quirk for Realforce 87U Keyboard 2022-11-25 17:45:51 +01:00
dwc2 usb: dwc2: fix wrong order of phy_power_on and phy_init 2022-09-08 11:11:39 +02:00
dwc3 usb: dwc3: gadget: Disable GUSB2PHYCFG.SUSPHY for End Transfer 2022-12-14 11:31:54 +01:00
early Revert "usb: early: convert to readl_poll_timeout_atomic()" 2021-12-22 09:30:56 +01:00
gadget usb: gadget: uvc: Prevent buffer overflow in setup handler 2022-12-21 17:32:06 +01:00
host xhci: Apply XHCI_RESET_TO_DEFAULT quirk to ADL-N 2022-12-21 17:32:07 +01:00
image
isp1760
misc usb: idmouse: fix an uninit-value in idmouse_open 2022-10-26 13:25:54 +02:00
mon usb: mon: make mmapped memory read only 2022-10-15 07:55:54 +02:00
mtu3 usb: mtu3: fix USB 3.0 dual-role-switch from device to host 2022-05-09 09:04:56 +02:00
musb usb: musb: remove extra check in musb_gadget_vbus_draw 2023-01-14 10:15:09 +01:00
phy usb: phy: generic: Get the vbus supply 2022-05-09 09:04:59 +02:00
renesas_usbhs usb: renesas: Fix refcount leak bug 2022-08-25 11:38:13 +02:00
roles usb: roles: Call try_module_get() from usb_role_switch_find_by_fwnode() 2021-05-14 09:49:55 +02:00
serial USB: serial: f81534: fix division by zero on line-speed change 2022-12-21 17:32:07 +01:00
storage Revert "usb: storage: Add quirk for Samsung Fit flash" 2022-10-26 13:25:54 +02:00
typec usb: typec: mux: Enter safe mode only when pins need to be reconfigured 2022-11-25 17:45:51 +01:00
usbip usb: usbip: add missing device lock on tweak configuration cmd 2022-06-14 18:32:31 +02:00
Kconfig
Makefile
usb-skeleton.c