diff options
| author | Naitik Bharadiya <bharad@codeaurora.org> | 2019-04-30 10:39:05 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-05-02 21:49:53 -0700 |
| commit | b5b335db32a154a02bf23f9cbb1814ea5ee289a8 (patch) | |
| tree | 86c66c4e7b4d51f26c2976cf6034777331ec2dc5 | |
| parent | 78a2fca7feace280b35c945280ca781c8658cc49 (diff) | |
drivers: qpnp-smbcharger: Fix USB3.0 device does not enumerate in SS mode
The max speed for the USB device is high speed. So
the device is always enumerated in high speed indpendent
of the connection. Fix this by setting the EXTCON_USB_SPEED
to 1 which in turn sets the max speed as super speed.
Change-Id: I9bf935add569f70c14bf9cd4197d6e86163da6f5
Signed-off-by: Naitik Bharadiya <bharad@codeaurora.org>
| -rw-r--r-- | drivers/power/supply/qcom/qpnp-smbcharger.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/power/supply/qcom/qpnp-smbcharger.c b/drivers/power/supply/qcom/qpnp-smbcharger.c index a31d4d0cb198..6abe0e021877 100644 --- a/drivers/power/supply/qcom/qpnp-smbcharger.c +++ b/drivers/power/supply/qcom/qpnp-smbcharger.c @@ -422,6 +422,7 @@ enum wake_reason { static const unsigned int smbchg_extcon_cable[] = { EXTCON_USB, EXTCON_USB_HOST, + EXTCON_USB_SPEED, EXTCON_NONE, }; @@ -4794,10 +4795,12 @@ static void handle_usb_insertion(struct smbchg_chip *chip) /* Only notify USB if it's not a charger */ if (usb_supply_type == POWER_SUPPLY_TYPE_USB || - usb_supply_type == POWER_SUPPLY_TYPE_USB_CDP) + usb_supply_type == POWER_SUPPLY_TYPE_USB_CDP) { extcon_set_cable_state_(chip->extcon, EXTCON_USB, chip->usb_present); - + extcon_set_cable_state_(chip->extcon, EXTCON_USB_SPEED, + chip->usb_present); + } /* Notify the USB psy if OV condition is not present */ if (!chip->usb_ov_det) { /* |
