linux/drivers/phy/ti
Tony Lindgren 20f795881f phy: phy-twl4030-usb: Fix cable state handling
With the recent regulator changes I noticed new warnings on doing rmmod of
phy-twl4030-usb:

WARNING: CPU: 0 PID: 1080 at drivers/regulator/core.c:2046 _regulator_put
...

Turns out we can currently miss disconnect at least for cases where status
is 0 and linkstat is 0. And in that case doing rmmod phy-twl4030-usb will
produce the regulator_put() warning.

This is because the missed disconnect causes unbalanced PM runtime calls
and the regulators will be on exit.

Let's fix the issue by using an atomic flag for the cable state to make
sure that PM runtime won't get out of sync with the cable state. That
way we can also simplify the code a bit.

Note that we can also drop the old comments, those relate to issues that
the battery charger driver and musb driver is dealing with rather than
the USB PHY driver.

Cc: NeilBrown <neilb@suse.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2019-04-17 10:29:49 +05:30
..
Kconfig phy: for 5.1 2019-02-12 14:59:43 +01:00
Makefile phy: ti: introduce phy-gmii-sel driver 2018-12-12 10:01:40 +05:30
phy-da8xx-usb.c phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30
phy-dm816x-usb.c
phy-gmii-sel.c phy: ti: ensure priv is not null before dereferencing it 2019-01-16 18:00:54 +05:30
phy-omap-control.c
phy-omap-usb2.c phy: ti: usb2: Add support for AM654 USB2 PHY 2019-02-07 11:10:41 +05:30
phy-ti-pipe3.c phy: ti-pipe3: Update pcie phy settings 2017-10-23 11:19:27 +05:30
phy-tusb1210.c phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30
phy-twl4030-usb.c phy: phy-twl4030-usb: Fix cable state handling 2019-04-17 10:29:49 +05:30