power: supply: bq25700: change register notifier to EXTCON_USB_VBUS_EN

Generally, bq25700 is only source for USB VBUS, bq25700 should
respond all EXTCON_USB_VBUS_EN requests.

And at OTG mode, there may be no EXTCON_USB_HOST_EN changes,
in this case, USB always keeps vbus output even if it used
as device mode.

Signed-off-by: Zain Wang <wzz@rock-chips.com>
Change-Id: I0b50be90bfc70ad296c1ec67d5a39f2b1c26920d
This commit is contained in:
Zain Wang
2021-11-25 15:33:54 +08:00
committed by Tao Huang
parent ec6350b547
commit 1edbd29596

View File

@@ -1916,7 +1916,7 @@ static int bq25700_register_host_nb(struct bq25700_device *charger)
charger->cable_host_nb.notifier_call =
bq25700_host_evt_notifier;
ret = extcon_register_notifier(charger->cable_edev,
EXTCON_USB_HOST,
EXTCON_USB_VBUS_EN,
&charger->cable_host_nb);
if (ret < 0) {
dev_err(charger->dev,
@@ -1931,7 +1931,7 @@ static int bq25700_register_host_nb(struct bq25700_device *charger)
charger->cable_host_nb1.notifier_call =
bq25700_host_evt_notifier1;
ret = extcon_register_notifier(charger->cable_edev_1,
EXTCON_USB_HOST,
EXTCON_USB_VBUS_EN,
&charger->cable_host_nb1);
if (ret < 0) {
dev_err(charger->dev,